/* Retro pixel SVG artwork is shared with designs/retro-pixel-ui.svg. */
:root{--accent:#1552e8;--ink:#0c1c50;--muted:#62728e;--line:#88b0ed;--soft:#dff0ff;--bg:#fffbed}
body[data-page=assistant]{background:#fffdf5;color:var(--ink);font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;padding:8px}
.pixel-icon{width:24px;height:24px;flex:none;display:inline-block;vertical-align:middle;pointer-events:none}.pixel-frame{border:12px solid transparent;border-image:url('/static/retro-frame.svg') 12 fill / 12px / 0 stretch}
body[data-page=assistant] main{background:transparent;max-width:1080px;height:calc(var(--app-height) - 16px);padding:14px 14px 12px;gap:14px;filter:drop-shadow(3px 5px 0 #e9e5d5)}
body[data-page=assistant] button,body[data-page=assistant] select,body[data-page=assistant] input,body[data-page=assistant] textarea{font-family:inherit;color:var(--ink);border-color:var(--line);border-radius:8px;background:#ecf6ff}
body[data-page=assistant] button{font-weight:700;box-shadow:none}body[data-page=assistant] button:focus-visible,body[data-page=assistant] summary:focus-visible,body[data-page=assistant] [tabindex]:focus-visible{outline:3px solid #d76b23;outline-offset:3px}body[data-page=assistant] button:disabled{opacity:.52}
body[data-page=assistant] .page-header{padding:0;min-height:48px;gap:8px;align-items:center}.unified-brand{gap:8px}.brand-mark{width:32px;height:32px;background:transparent;border-radius:0}.brand-mark .pixel-icon{width:32px;height:32px}.unified-brand p{display:none}body[data-page=assistant] h1{font-size:29px;font-weight:900;letter-spacing:0;line-height:1.3}
.unified-brand>div{min-width:0}body[data-page=assistant] h1.pixel-wordmark{display:flex;align-items:center;width:147px;max-width:100%;height:1.3em}.pixel-wordmark-art{display:block;width:100%;height:auto;flex:none}
.header-tools{gap:9px;margin-left:auto;align-items:center}.header-tools button{min-height:42px;padding:6px 10px;font-size:16px;border:1px solid var(--line);background:#e8f3ff}.header-tools #open-accessibility{border:1px solid var(--line);background:#e8f3ff}.header-tools #open-records{display:flex;align-items:center;gap:6px}.header-tools .pixel-icon{width:20px;height:20px}
.unified-status{flex:none;min-height:44px;padding:8px 12px;background:#dff0ff;border:1px solid var(--line);border-radius:8px;gap:9px;justify-content:flex-start;font-size:14px;font-weight:700;color:var(--ink)}.unified-status>.pixel-icon:first-child{width:25px;height:25px;color:var(--accent)}.voice-wave{margin-left:auto;width:28px;height:25px;color:#789eef}.is-listening .voice-wave{color:var(--accent)}
body[data-page=assistant] .session{gap:8px}.home-content{gap:17px;padding-bottom:5px;grid-template-columns:1.1fr 1fr}.answer-column{padding:0;display:flex;flex-direction:column;gap:10px}
body[data-page=assistant] .camera-panel{border:7px solid transparent;border-image:url('/static/retro-frame.svg') 12 fill / 7px / 0 stretch;border-radius:0;background:none;overflow:visible;min-height:190px;height:clamp(220px,51svh,520px);position:relative}
.camera-heading{position:absolute;left:5px;top:5px;padding:0;min-height:0;z-index:3}.camera-heading button{background:#fffbeded;color:var(--ink);border:1px solid #afc2db;font-size:11px;min-height:30px;padding:3px 6px;border-radius:5px}
body[data-page=assistant] .preview{background:#e1ebf3;border-radius:0;width:100%;min-height:0;overflow:hidden}body[data-page=assistant] .preview video{object-fit:contain}body[data-page=assistant] #camera-empty{color:var(--ink);font-weight:500;text-align:center;padding:35px 15px 55px;background:#e8f1f6}#camera-empty::before{content:'';width:34px;height:34px;background:url('/static/retro-logo.svg') center/contain no-repeat;opacity:.7}#camera-empty p{font-size:15px}
body[data-page=assistant] #expand-video{display:flex;align-items:center;gap:6px;position:absolute;bottom:6px;right:6px;background:#12285ccf;color:#fff;border:1px solid #e5edff;min-height:36px;font-size:13px;padding:5px 8px;border-radius:7px;box-shadow:none}#expand-video .pixel-icon{width:19px;height:19px}
.task-heading{border:6px solid transparent;border-image:url('/static/retro-task.svg') 12 fill / 6px / 0 stretch;padding:8px 15px 9px;flex:none}.task-heading p{font-size:12px;color:var(--ink);font-weight:600;margin:0 0 3px}.task-heading h2{font-size:25px;color:var(--ink);font-weight:900;line-height:1.45;margin:0;letter-spacing:0}
body[data-page=assistant] .answer-card{border:6px solid transparent;border-image:url('/static/retro-card.svg') 12 fill / 6px / 0 stretch;border-radius:0;background:transparent;padding:10px 12px 7px;position:relative;overflow:visible}
body[data-page=assistant] #answer-title{display:flex;align-items:center;gap:7px;color:var(--ink);font-size:14px;margin:0 0 7px;font-weight:800}#answer-title .pixel-icon{width:20px;height:20px}body[data-page=assistant] .answer-card p{font-size:calc(var(--answer-size) + 1px);font-weight:600;line-height:1.65;-webkit-line-clamp:3}#answer-detail,#return-chat{font-size:12px;min-height:31px;margin-top:2px;display:inline-flex;align-items:center;gap:4px;padding:2px 0;color:#17448c}#answer-detail .pixel-icon{width:15px;height:15px}#return-chat{float:left;margin-right:8px}#answer-detail{float:right}.answer-card::after{content:'';display:block;clear:both}.home-hint{display:none}
.conversation-footer{background:transparent;border:0;padding:0;display:grid;grid-template-columns:1fr 1.65fr 1fr;column-gap:8px;row-gap:4px}.footer-status{display:none}#text-tools{grid-column:1/-1;grid-row:1}#text-tools summary{margin-left:auto;min-height:24px;font-size:11px;padding:0;color:#506581;display:flex;align-items:center;gap:4px;width:fit-content}#text-tools summary .pixel-icon{width:14px;height:14px}#text-tools[open] summary{margin-left:0}#text-tools form{padding:4px 0 9px}#text-tools button{background:var(--accent);color:#fff}
body[data-page=assistant] .main-button,body[data-page=assistant] .replay-button,body[data-page=assistant] #end-conversation{display:flex;align-items:center;justify-content:center;gap:7px;min-height:58px;font-size:17px;font-weight:800;padding:8px 5px;border-radius:8px;grid-row:2}
body[data-page=assistant] .main-button{grid-column:2;border:6px solid transparent;border-image:url('/static/retro-primary.svg') 12 fill / 6px / 0 stretch;background:transparent;color:white;filter:drop-shadow(0 2px 0 #87cdd8)}body[data-page=assistant] .main-button.active{background:transparent;color:white}.main-button .pixel-icon{width:24px;height:24px}body[data-page=assistant] .replay-button{grid-column:1;background:#e8f3ff;border:1px solid var(--line)}body[data-page=assistant] #end-conversation{grid-column:3;background:#e8f3ff;border:1px solid var(--line);color:var(--ink)}.conversation-footer .pixel-icon{width:21px;height:21px}
body[data-page=assistant] .more-tools{position:static;margin:18px 0}.more-tools>summary{font-weight:700}body[data-page=assistant] .more-content{position:static;width:100%;max-height:none;overflow:visible;box-shadow:none;border:0;padding:12px 0;background:transparent}.scene-picker{display:block}.scene-picker .sr-only{position:static;width:auto;height:auto;clip:auto;clip-path:none}.scene-picker select{margin-left:10px;background:#fff}
body[data-page=assistant] dialog{background:var(--bg);border:8px solid transparent;border-image:url('/static/retro-frame.svg') 12 fill / 8px / 0 stretch;border-radius:0;color:var(--ink)}
#records-dialog{width:480px;height:min(94svh,880px);max-height:calc(100svh - 16px);max-width:calc(100vw - 16px);margin:auto 8px 8px auto;background:none;border:10px solid transparent;border-image:url('/static/retro-frame.svg') 12 fill / 10px / 0 stretch;border-radius:0;box-shadow:none;padding:10px 8px;overflow:hidden}
.records-heading{padding:2px 4px 12px;min-height:50px}.records-heading h2{font-size:29px;line-height:1.2;font-weight:900}.records-heading button{font-size:14px;background:#e9f3ff;border:1px solid var(--line);border-radius:6px;padding:5px 10px;min-height:38px}.records-task.sr-only{position:absolute;margin:0;padding:0;min-height:0}
.record-tabs{margin:0 0 8px;padding:0;gap:0;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#e4eaf3;min-height:44px}.record-tabs button{border-radius:0;min-height:44px;font-size:16px;padding:8px 4px;background:transparent;color:var(--ink)}.record-tabs button[aria-selected=true]{background:var(--accent);color:#fff}
#record-panel-chat,#record-panel-memory{padding:0 3px;min-height:0}#conversation-panel{background:white;border-radius:10px;padding:0 7px;overflow:hidden}.record-history{flex:none;margin:0;padding:0;border:0}.record-history>summary{font-size:11px;color:var(--muted);text-align:right;min-height:24px;padding:5px 0;cursor:pointer}.record-history[open]{padding-bottom:8px}.chat-heading{float:right}.chat-history-tools{clear:both}.chat-history-tools select{background:white;font-size:12px}.chat-heading button{font-size:12px}.chat-history-tools button{color:#9d352c}#chat-empty{font-size:15px;line-height:1.8}
body[data-page=assistant] #chat{padding:8px 0 12px;gap:19px;scrollbar-width:thin}.chat-turn{max-width:88%;min-width:0;margin:0 auto 0 0;position:relative}.chat-turn.user{margin-left:auto;margin-right:0}.chat-bubble{border:0;background:#dff0ff;border-radius:12px 12px 12px 2px;padding:12px 13px}.chat-turn.user .chat-bubble{background:var(--accent);border:0;color:white;border-radius:13px 13px 2px 13px}.chat-bubble p{font-size:var(--answer-size);font-weight:600;line-height:1.65}.chat-speaker{font-size:11px;color:#415a83;font-weight:600;margin:0 0 6px}.chat-turn.assistant .chat-speaker::before{content:'';display:inline-block;width:14px;height:14px;vertical-align:-2px;margin-right:5px;background:url('/static/retro-logo.svg') center/contain no-repeat}.chat-turn.user .chat-speaker{color:#e1eaff}.chat-tag{font-size:10px;background:#f0f7ff;color:#214c91;border-radius:3px;padding:2px 4px}.message-replay{display:inline-flex;align-items:center;gap:3px;padding:3px 7px;min-height:30px;font-size:12px;margin-top:4px;background:#f1f8ff;border:1px solid var(--line);border-radius:5px;color:#1549bd}.message-replay .pixel-icon{width:14px;height:14px}
.records-footer{padding:10px 0 0;margin:0;border:0;background:transparent;display:flex;flex-direction:column;align-items:stretch;gap:2px}.records-footer #pixel-records-home{border:5px solid transparent;border-image:url('/static/retro-card.svg') 12 fill / 5px / 0 stretch;min-height:50px;background:none;color:var(--ink);display:flex;align-items:center;justify-content:center;gap:9px;font-size:17px;padding:5px}.records-footer #records-end{font-size:11px;background:transparent;border:0;min-height:26px;padding:3px;color:#80454c}.records-footer #records-end:disabled{display:none}
.memory-item{border:5px solid transparent;border-image:url('/static/retro-card.svg') 12 fill / 5px / 0 stretch;border-radius:0;background:transparent;padding:13px;margin:12px 0}.memory-actions button{background:#fffbed;border:1px solid var(--line);border-radius:5px}.memory-actions button:first-child{background:var(--accent);color:white}#memory-delete-confirm,body[data-page=assistant] .primary{color:white}.inline-error{background:#fff0e3;color:#942900}.notice{background:#0c1c50;color:#fff}#records-dialog.expanded{max-width:calc(100vw - 16px);height:calc(100svh - 16px);max-height:calc(100svh - 16px)}
@media(max-width:799px){body[data-page=assistant] main{max-width:480px;padding:10px 7px 8px;gap:10px}.home-content{display:flex;flex-direction:column;gap:10px;padding-bottom:4px}.answer-column{gap:8px;width:100%}body[data-page=assistant] .camera-panel{width:100%;height:clamp(155px,27svh,245px);min-height:155px;border-radius:0}.task-heading{padding:6px 12px 8px}.task-heading h2{font-size:23px}.task-heading p{font-size:11px}body[data-page=assistant] .answer-card{padding:8px 10px 5px;border-radius:0}body[data-page=assistant] .page-header{min-height:43px;padding:0}body[data-page=assistant] h1{font-size:28px}.brand-mark,.brand-mark .pixel-icon{width:29px;height:29px}.header-tools{gap:7px}.header-tools button{padding:5px 9px;font-size:15px;min-height:38px}.header-tools .pixel-icon{width:17px;height:17px}.unified-status{font-size:12px;min-height:42px;padding:7px 10px}.task-heading h2{margin:0}#records-dialog{width:calc(100vw - 16px);height:calc(var(--app-height) - 16px);max-height:calc(100svh - 16px);max-width:calc(100vw - 16px);margin:8px;border-radius:0;padding:8px}.records-heading{padding:3px 4px 10px}.record-tabs{margin:0 0 7px}#record-panel-chat,#record-panel-memory{padding:0 1px}.records-footer{padding:8px 0 0}.chat-bubble p{line-height:1.65}body[data-page=assistant] .main-button,body[data-page=assistant] .replay-button,body[data-page=assistant] #end-conversation{min-height:54px;font-size:16px;padding:7px 4px}.conversation-footer{gap:4px 7px}.conversation-footer .pixel-icon{width:20px;height:20px}}
@media(max-width:350px){body[data-page=assistant]{padding:5px}body[data-page=assistant] main{height:calc(var(--app-height) - 10px);padding:8px 4px 7px;gap:8px;border-width:9px;border-image-width:9px}.brand-mark{display:grid}.brand-mark,.brand-mark .pixel-icon{width:24px;height:24px}body[data-page=assistant] h1{font-size:24px}.header-tools{gap:5px}.header-tools button{padding:5px 7px;font-size:13px}.header-tools .pixel-icon{display:none}.unified-status{font-size:11px;padding:5px 7px;gap:5px}.unified-status>.pixel-icon:first-child{width:21px}.voice-wave{width:20px}.task-heading h2{font-size:21px}.task-heading{padding:5px 9px}.chat-bubble{padding:10px}.chat-bubble p{font-size:var(--answer-size)}.conversation-footer .pixel-icon{width:16px;height:16px}body[data-page=assistant] .main-button,body[data-page=assistant] .replay-button,body[data-page=assistant] #end-conversation{gap:4px;font-size:14px}.records-heading h2{font-size:26px}}
@media(max-height:570px){body[data-page=assistant] main{padding-top:5px;padding-bottom:4px;gap:6px}.unified-status{display:flex;min-height:34px;padding-top:3px;padding-bottom:3px}.home-content{gap:8px}body[data-page=assistant] .camera-panel{height:120px;min-height:120px}.conversation-footer{gap:2px 5px}#text-tools summary{min-height:20px}body[data-page=assistant] .main-button,body[data-page=assistant] .replay-button,body[data-page=assistant] #end-conversation{min-height:48px}.records-heading{min-height:44px;padding-bottom:5px}}
body[data-layout=video] .camera-panel{height:auto;min-height:0;flex:1}body[data-layout=video] .answer-column{display:none}body[data-page=assistant] .camera-panel.collapsed{height:auto;min-height:38px}.camera-panel.collapsed .camera-heading{position:static;margin:0 0 0 auto}.camera-panel.collapsed .camera-heading button{font-size:13px;min-height:30px}
/* Speaker names sit above the bubbles, matching the selected SVG composition. */
.chat-turn.user .chat-speaker{color:var(--ink)}.chat-speaker{margin-bottom:6px}.chat-bubble p{font-weight:600}
@media(min-height:700px) and (max-width:799px){body[data-page=assistant] .camera-panel{height:clamp(220px,38svh,350px);min-height:220px}}
/* The idle preview is a second start entry; existing overlay controls stay above it. */
body[data-page=assistant] #camera-start-target{position:absolute;inset:0;z-index:1;width:100%;height:100%;min-height:0;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:pointer}
body[data-page=assistant] #camera-start-target:focus-visible{outline-offset:-5px}
#camera-empty #video-again{position:relative;z-index:3}
/* Keep the layout in the visible window when mobile keyboards pan the page. */
html{height:100%;overflow:hidden}body[data-page=assistant]{position:fixed;inset:0;height:100%;overflow:hidden}
body[data-page=assistant] main{position:absolute;top:calc(var(--visible-top,0px) + 8px);left:50%;transform:translateX(-50%);width:calc(100% - 16px);margin:0}
.unified-status{gap:7px}.unified-status #input-source{flex:1;min-width:0;line-height:1.4}.unified-status .voice-wave{margin-left:0}
.unified-status .scene-picker{margin:0;flex:none}.unified-status .scene-picker .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%)}
.unified-status .scene-picker select{min-height:40px;width:112px;max-width:112px;font-size:14px;margin:0;padding:6px 8px;background:#fffbed;border:1px solid var(--line);border-radius:6px;font-weight:700;color:var(--ink)}
body[data-page=assistant] #text-tools summary{min-height:38px;padding:5px 10px;border:1px solid var(--line);border-radius:6px;background:#e8f3ff;color:var(--ink);font-size:14px;font-weight:700;gap:5px}
#text-tools summary .pixel-icon{width:18px;height:18px}#text-tools summary::marker{content:''}
body[data-page=assistant] #text-composer{position:fixed;inset:auto;margin:0;left:50%;top:var(--visible-top,0px);transform:translateX(-50%);width:min(460px,calc(var(--visible-width,100vw) - 20px));max-width:none;max-height:calc(var(--visible-height,100dvh) - 16px);padding:12px 14px 14px;overflow:auto;overscroll-behavior:contain;background:#fffbed;box-shadow:0 12px 40px #0c1c5026}
.composer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.composer-heading h2{font-size:21px;font-weight:800}.composer-heading button{min-height:40px;padding:5px 10px;font-size:14px}#composer-hint{font-size:13px;line-height:1.6;color:#526581;margin:8px 0 12px}
body[data-page=assistant] #message{display:block;width:100%;font:18px/1.6 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;min-height:82px;max-height:128px;resize:none;border:1px solid #7eabea;border-radius:7px;background:#edf6ff;padding:10px 12px;color:var(--ink);scroll-margin:12px}
#message:focus{outline:3px solid #1552e8;outline-offset:2px}#message::placeholder{color:#697c96}.composer-send-row{display:flex;align-items:center;gap:12px;margin-top:12px}.composer-send-row #composer-status{flex:1;font-size:13px;line-height:1.5;color:#9a3821;min-width:0}.composer-send-row #text-send{min-height:46px;min-width:82px;padding:8px 14px;background:#1552e8;color:white;border:1px solid #0c1c50;border-radius:6px;font-size:17px}
@media(max-width:480px){.unified-status .voice-wave{display:none}.unified-status{padding:5px 8px}.unified-status>.pixel-icon:first-child{width:23px;height:23px}.unified-status #input-source{font-size:11px}.unified-status .scene-picker select{width:103px;max-width:103px;font-size:13px;min-height:40px}}
@media(max-width:350px){body[data-page=assistant] main{top:calc(var(--visible-top,0px) + 5px);width:calc(100% - 10px)}.unified-status{gap:5px;padding:4px 5px}.unified-status #input-source{font-size:10px}.unified-status>.pixel-icon:first-child{width:19px}.unified-status .scene-picker select{width:97px;max-width:97px;font-size:12px;padding:5px}.composer-heading h2{font-size:19px}}
@media(max-height:480px){body[data-page=assistant] #text-composer{padding:8px 10px}#composer-hint{margin:4px 0 8px;font-size:12px}body[data-page=assistant] #message{min-height:60px;height:60px}.composer-send-row{margin-top:8px}}
body[data-page=assistant].viewport-zoomed main{top:8px;height:calc(100dvh - 16px)}
