/* One shared homepage; expand content without replacing media/session nodes. */
.inline-error{color:#a4362e;background:#fbefea;border-radius:10px;padding:12px;font-size:16px}
:root{--accent:#194e3d;--ink:#20352b;--muted:#596c60;--line:#dce4da;--soft:#edf2ec;--bg:#f6f7f2}
body[data-page=assistant]{background:var(--bg)}
body[data-page=assistant] main{max-width:1120px;height:var(--app-height);min-height:0;padding:calc(18px + env(safe-area-inset-top)) 28px calc(12px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;overflow:hidden}
body[data-page=assistant] .page-header{display:flex;min-height:50px;padding-right:60px;gap:10px;flex:none}
.unified-brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--accent);color:white;font-size:19px;flex:none}body[data-page=assistant] h1{font-size:25px;letter-spacing:.05em;line-height:1.2}.unified-brand p{font-size:11px;color:var(--muted);margin:4px 0 0}
.header-tools{display:flex;gap:7px}.header-tools button{font-size:16px;padding:8px 12px;min-height:44px}.header-tools #open-accessibility{border:0;background:transparent}.unified-status{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;color:var(--muted);flex:none}.scene-picker select{min-height:40px;font-size:14px;width:auto;max-width:125px;padding:5px 10px;background:transparent}
body[data-page=assistant] .session{display:flex;flex-direction:column;flex:1;min-height:0;gap:12px;margin:0;position:relative}.home-content{display:grid;grid-template-columns:1.25fr 1fr;gap:26px;align-items:start;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-bottom:16px}
body[data-page=assistant] .camera-panel{height:min(60svh,560px);min-height:200px;max-height:none;border:1px solid var(--line);border-radius:23px;background:#e9eee5;display:flex;flex-direction:column;overflow:hidden;flex:none}
.camera-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:5px 12px;flex:none}.camera-heading h2{font-size:13px;color:var(--muted)}.camera-heading button{border:0;background:transparent;padding:6px 8px;font-size:13px;min-height:38px}
body[data-page=assistant] .preview{aspect-ratio:auto;max-height:none;width:100%;height:auto;flex:1;min-height:0;margin:0;border-radius:0;background:#142b22;position:relative;overflow:hidden}body[data-page=assistant] .preview video{width:100%;height:100%;position:absolute;inset:0;object-fit:contain}body[data-page=assistant] #camera-empty{color:#e8f0e8;padding:18px;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}#camera-empty p{font-size:16px;margin:0}
body[data-page=assistant] .camera-panel.collapsed{height:auto;min-height:0}body[data-page=assistant] .camera-panel.collapsed .preview{display:none!important}
.answer-column{padding-top:9px;min-width:0}.task-heading p{font-size:13px;color:var(--muted);margin:0 0 8px}.task-heading h2{font-size:27px;line-height:1.5;letter-spacing:-.035em;margin:0 0 18px;overflow-wrap:anywhere}
body[data-page=assistant] .answer-card{display:block;margin:0;padding:19px 21px;min-height:0;max-height:none;border:1px solid var(--line);border-radius:22px;background:white;overflow:visible;flex:none}body[data-page=assistant] #answer-title{font-size:13px;color:var(--accent);margin:0 0 10px}body[data-page=assistant] .answer-card p{font-size:calc(var(--answer-size) + 2px);line-height:1.75;margin:0;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}body[data-page=assistant] .answer-card.full-answer p{-webkit-line-clamp:unset;display:block;overflow:visible}
#answer-detail,#return-chat{font-size:13px;min-height:40px;padding:7px 0;border:0;color:var(--accent);background:transparent;margin-top:8px}#return-chat{float:right}.home-hint{font-size:12px;line-height:1.8;color:var(--muted);margin:15px 0}
.conversation-footer{flex:none;background:var(--bg);border-top:1px solid var(--line);padding-top:7px;display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:8px;position:relative}.footer-status,#text-tools{grid-column:1/-1}#dialogue-state{font-size:13px;margin:0;text-align:left;min-height:20px;max-height:44px;overflow:auto;display:block}
body[data-page=assistant] .main-actions{display:contents}body[data-page=assistant] .main-button,body[data-page=assistant] .replay-button,#end-conversation{min-height:56px;font-size:17px;padding:10px 7px;border-radius:14px;position:static;margin:0;display:block;width:100%}#end-conversation{color:#a4362e;background:#fbf0ec;border-color:#f0e0d7}
#text-tools{margin:0;border:0}#text-tools summary{min-height:35px;font-size:13px;padding:5px 0;color:var(--accent)}#text-tools form{padding:3px 0 7px;margin:0}#text-tools input{min-width:0;font-size:18px;min-height:48px;padding:9px}#text-tools button{font-size:16px;min-height:48px;padding:8px 12px}
body[data-page=assistant] .more-tools{right:22px;top:calc(21px + env(safe-area-inset-top));margin:0;z-index:5}body[data-page=assistant] .more-tools>summary{min-height:44px;padding:8px;font-size:13px;line-height:28px}body[data-page=assistant] .more-content{width:min(480px,calc(100vw - 28px));border-radius:18px;padding:18px}
body[data-page=assistant] .pending{top:0;left:0;right:0;z-index:6;max-height:80%;margin:0;box-shadow:0 10px 35px #173d3026}body[data-page=assistant] .notice{bottom:calc(135px + env(safe-area-inset-bottom));z-index:20}
#records-dialog{width:520px;max-width:calc(100vw - 24px);height:min(88svh,880px);max-height:94svh;margin:auto 16px 16px auto;padding:0;border-radius:25px;overflow:hidden;background:white;box-shadow:0 20px 80px #142b2526}#records-dialog[open]{display:flex;flex-direction:column}.sheet-handle{width:38px;height:4px;background:#c8d1c8;border-radius:4px;margin:10px auto 0;flex:none}
.records-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 22px 12px;flex:none}.records-heading h2{font-size:25px}.records-heading button{min-height:44px;padding:7px 8px;font-size:15px;background:transparent;border:0}.records-task{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 22px 14px;background:var(--soft);border-radius:12px;padding:8px 11px;color:var(--accent);font-size:13px;flex:none}.records-task button{border:0;background:transparent;color:var(--accent);min-height:36px;padding:4px;font-size:13px;white-space:nowrap}
.record-tabs{display:flex;gap:4px;background:#eff3ec;border-radius:15px;padding:4px;margin:0 22px 12px;flex:none}.record-tabs button{flex:1;min-height:48px;padding:9px 5px;font-size:17px;border:0;border-radius:11px;background:transparent}.record-tabs button[aria-selected=true]{background:var(--accent);color:white}
#record-panel-chat{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:0 22px}#conversation-panel{display:flex;flex-direction:column;flex:1;min-height:0;position:relative;overflow:hidden}.chat-heading{display:flex;justify-content:flex-end;flex:none}.chat-heading button{font-size:13px;min-height:38px;padding:5px 8px;border:0;background:transparent}.chat-history-tools{display:flex;gap:8px;margin:0 0 10px}.chat-history-tools select{font-size:13px;min-height:44px;padding:5px 8px;border:1px solid var(--line);background:white}.chat-history-tools button{min-height:44px;padding:5px 8px;font-size:13px;border:0;background:transparent;color:#9c3d31}
body[data-page=assistant] #chat{display:flex;flex-direction:column;align-items:stretch;gap:18px;padding:4px 0 20px}.chat-turn{width:fit-content;max-width:88%;min-width:125px;margin:0 auto 0 0}.chat-turn.user{margin-right:0;margin-left:auto;align-self:flex-end}.chat-bubble{padding:14px 16px;border:1px solid var(--line);border-radius:18px 18px 18px 4px;background:#f0f4ee}.chat-turn.user .chat-bubble{background:var(--accent);border-color:var(--accent);color:white;border-radius:18px 18px 4px 18px}.chat-speaker{font-size:12px;margin:0 0 9px}.chat-turn.user .chat-speaker{color:#e2eee4}.chat-bubble p{line-height:1.8}.message-replay{min-height:40px;padding:6px 10px;font-size:13px;color:var(--accent);background:white;border:1px solid var(--line);margin-top:7px;border-radius:10px}
#record-panel-memory{padding:0 22px 20px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}#memory-search{font-size:16px;min-height:48px;margin-bottom:12px}#home-memory-section>p{font-size:13px;line-height:1.8;color:var(--muted);margin:8px 0 15px}.memory-item{border:1px solid var(--line);border-radius:18px;padding:16px;margin:12px 0;background:white}.memory-item h3{font-size:calc(var(--answer-size) + 1px);line-height:1.5;margin:0 0 8px}.memory-item p{font-size:var(--answer-size);line-height:1.8}.memory-item .memory-appearance{font-size:13px;color:var(--muted)}.memory-item time{font-size:12px}.memory-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.memory-actions button{font-size:13px;min-height:40px;padding:7px 11px;background:var(--soft);border:0;border-radius:10px;color:var(--accent)}.memory-actions button:first-child{background:var(--accent);color:white}
.records-footer{padding:10px 22px max(14px,env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;font-size:12px;color:var(--muted);border-top:1px solid var(--line);background:white}.records-footer button{font-size:13px;min-height:44px;padding:7px 11px;background:#fbefea;color:#a4362e;border-color:#f2e5df}#records-dialog.expanded{width:min(860px,100vw);height:96svh;max-height:96svh}
#memory-editor textarea{font:inherit;width:100%;min-height:100px;resize:vertical;border:1px solid #aebeb4;border-radius:12px;padding:12px;color:var(--ink)}#memory-editor .two-buttons{margin-top:20px}#memory-editor .section-heading button{font-size:14px;min-height:44px;padding:6px 10px}#memory-delete{color:#a4362e}#memory-delete-confirm{background:#a4362e;color:white}
body[data-layout=video] .home-content{display:flex;flex-direction:column;overflow:hidden}body[data-layout=video] .camera-panel{height:auto;min-height:0;flex:1;width:100%;max-height:none}body[data-layout=video] .answer-column{display:none}
@media(max-width:799px){body[data-page=assistant] main{max-width:590px;padding:calc(12px + env(safe-area-inset-top)) 16px calc(10px + env(safe-area-inset-bottom));gap:8px}.unified-brand p{display:none}.brand-mark{width:34px;height:34px;font-size:17px}body[data-page=assistant] h1{font-size:23px}.header-tools{gap:3px}.header-tools button{font-size:15px;padding:7px 10px}body[data-page=assistant] .page-header{padding-right:49px;min-height:46px}body[data-page=assistant] .more-tools{right:12px;top:calc(15px + env(safe-area-inset-top))}.unified-status{font-size:12px}.scene-picker select{font-size:13px;min-height:38px}.home-content{display:flex;flex-direction:column;gap:18px;padding-bottom:15px}.answer-column{width:100%;padding:0}body[data-page=assistant] .camera-panel{height:clamp(165px,27svh,280px);min-height:165px;width:100%;border-radius:20px}.camera-heading{min-height:42px;padding:3px 10px}.camera-heading button{font-size:12px;min-height:36px}.camera-heading h2{font-size:12px}.task-heading p{font-size:12px;margin-bottom:5px}.task-heading h2{font-size:23px;margin-bottom:12px}body[data-page=assistant] .answer-card{padding:16px 18px;border-radius:20px}.home-hint{display:none}.conversation-footer{gap:6px;padding-top:6px}body[data-page=assistant] .main-button,body[data-page=assistant] .replay-button,#end-conversation{min-height:54px;font-size:16px;padding:9px 5px}.records-task{margin:0 18px 12px}.record-tabs{margin:0 18px 10px}#records-dialog{width:100%;max-width:100%;height:85svh;max-height:95svh;margin:auto 0 0;border-radius:24px 24px 0 0;border-bottom:0}.records-heading{padding:13px 18px 10px}.records-heading h2{font-size:24px}#record-panel-chat,#record-panel-memory{padding-left:18px;padding-right:18px}.records-footer{padding-left:18px;padding-right:18px}#records-dialog.expanded{width:100%;height:97svh;max-height:97svh}}
@media(max-width:350px){body[data-page=assistant] main{padding-left:12px;padding-right:12px}.brand-mark{display:none}.header-tools button{padding:7px 9px}.scene-picker select{max-width:110px}.record-tabs button{font-size:16px}.chat-turn{max-width:90%}.chat-bubble{padding:12px}.task-heading h2{font-size:21px}.records-footer{font-size:11px}.records-footer button{font-size:12px}body[data-page=assistant] .main-button,body[data-page=assistant] .replay-button,#end-conversation{font-size:15px}}
@media(max-height:570px){body[data-page=assistant] main{padding-top:8px;padding-bottom:6px;gap:4px}.unified-status{display:none}.conversation-footer{gap:4px}.footer-status{display:none}#text-tools summary{min-height:30px;padding:3px 0}.home-content{gap:10px}body[data-page=assistant] .camera-panel{height:120px;min-height:120px}.records-task{display:none}body[data-layout=video] .camera-panel{height:auto;min-height:0}}
