/* A single camera-like scene. Phone and tablet paths occupy opposite sides. */
.booth-screen { background:var(--brand-bg); color:var(--brand-ink); overflow:hidden; }
.booth-screen > header,.booth-screen > footer { display:none; }
main.booth { position:relative; isolation:isolate; display:block; width:100%; height:100svh; min-height:560px; max-width:none; margin:0; overflow:hidden; background:var(--brand-bg); }
.call-portrait { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; object-position:center top; z-index:-3; }
.call-identity { position:absolute; bottom:max(20px,env(safe-area-inset-bottom)); left:28px; color:var(--brand-ink); }
.call-name { display:flex; align-items:center; gap:8px; font-size:24px; font-weight:600; letter-spacing:-.4px; line-height:1.1; }
.ai-mark { border:1px solid var(--brand-line); border-radius:4px; font-size:14px; padding:3px 5px; letter-spacing:1px; font-weight:700; }
.call-maker { display:block; margin-top:6px; font-size:clamp(18px,1.5vw,22px); line-height:1.3; color:inherit; text-decoration:underline; text-underline-offset:3px; } a.call-maker:hover { color:var(--brand-primary); }
#maker-credit { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.welcome-bubble { position:absolute; top:max(24px,env(safe-area-inset-top)); left:28px; max-width:min(440px,36vw); padding:22px 28px; margin:0; color:var(--brand-ink); background:var(--brand-surface); border:1px solid var(--brand-line); box-shadow:0 8px 32px var(--brand-shadow); border-radius:24px 24px 5px 24px; letter-spacing:0; }
.welcome-intro { display:block; font-size:clamp(22px,2vw,28px); line-height:1.2; font-weight:400; }
.welcome-brand { display:block; font-size:clamp(40px,4.3vw,68px); line-height:1.08; font-weight:750; letter-spacing:-2px; margin-top:8px; color:var(--brand-primary); }
.welcome-logo { display:block; width:100%; height:auto; margin-top:12px; object-fit:contain; }
.welcome-bubble.has-logo { width:clamp(260px,29vw,420px); max-width:90%; background:white; }
.header-logo { display:block; width:220px; max-width:45vw; height:auto; }
.call-options { position:absolute; left:36px; bottom:110px; width:clamp(248px,24vw,310px); display:grid; gap:16px; }
.call-qr { padding:14px; background:var(--brand-surface); border:1px solid var(--brand-line); border-radius:20px; box-shadow:0 12px 40px var(--brand-shadow); text-align:center; }
.call-qr img { display:block; width:132px; max-width:100%; height:auto; margin:0 auto; aspect-ratio:1; border-radius:8px; background:white; }
.call-qr p { font-size:18px; font-weight:500; margin:12px 0 0; line-height:1.3; white-space:nowrap; }
.questionnaire-button { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:64px; padding:12px; border:2px solid var(--brand-line); border-bottom-width:4px; border-radius:14px; background:var(--brand-card); color:var(--brand-ink); box-shadow:0 4px 10px var(--brand-shadow); text-align:center; text-decoration:none; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.questionnaire-button svg { width:24px; height:24px; flex:none; fill:none; stroke:var(--brand-primary); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.questionnaire-button-content { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.questionnaire-title { font-size:22px; line-height:1.2; font-weight:600; white-space:nowrap; }
.questionnaire-button:hover,.questionnaire-button:active { background:var(--brand-accent-soft); border-color:var(--brand-primary); }
.questionnaire-button:active { box-shadow:inset 0 3px 8px #0003; }
.questionnaire-button:focus-visible { outline:3px solid var(--brand-focus); outline-offset:4px; }
.tablet-form-link { padding:12px 8px; gap:8px; }
.tablet-form-link .questionnaire-title { font-size:18px; }
/* Fixed outer geometry: text scrolls inside reserved rows, never moves the mic. */
.call-controls { position:absolute; right:24px; top:86px; bottom:76px; width:min(38vw,640px); display:grid; grid-template-rows:clamp(80px,12svh,112px) minmax(0,1fr) 36px 100px; gap:12px; }
.question-frame,.answer-frame { display:flex; flex-direction:column; min-height:0; overflow:hidden; border:1px solid var(--brand-line); border-radius:20px; background:var(--brand-surface); box-shadow:0 8px 28px var(--brand-shadow); padding:18px 20px; }
.question-frame { padding:12px 16px; }.question-frame .dialogue-label { margin-bottom:4px; }
.answer-frame { border-radius:5px 20px 20px 20px; background:var(--brand-primary-soft); border-color:var(--brand-accent-line); }
.dialogue-label { flex:none; margin:0 0 8px; font-size:16px; line-height:1.3; font-weight:600; color:var(--brand-muted); }
.call-transcript,.call-answer { flex:1; min-height:0; margin:0; overflow:auto; overflow-wrap:anywhere; white-space:pre-wrap; font-size:clamp(21px,1.8vw,28px); line-height:1.4; color:var(--brand-ink); }
.call-transcript:empty::before { content:'Hold the button below to ask.'; color:var(--brand-muted); }
.call-answer:empty::before { content:'Your answer will appear here.'; color:var(--brand-muted); }
html[lang="zh-CN"] .call-transcript:empty::before { content:'按住下方按钮提问。'; }
html[lang="zh-CN"] .call-answer:empty::before { content:'回答会显示在这里。'; }
.kiosk-lang { position:absolute; top:max(22px,env(safe-area-inset-top)); right:24px; z-index:3; display:flex; border:1px solid var(--brand-line); border-radius:24px; overflow:hidden; background:var(--brand-card); }
.kiosk-lang .lang-button { min-height:44px; padding:0 14px; border:0; background:transparent; color:var(--brand-ink); font:inherit; font-size:16px; font-weight:600; cursor:pointer; }
.kiosk-lang .lang-button[aria-pressed="true"] { background:var(--brand-ink); color:#fff; }
.booth .model-status { right:168px; }
.call-status { min-height:0; overflow:auto; font-size:16px; line-height:1.3; margin:0; padding:0 4px; }
.call-speak { height:100%; min-height:0; width:100%; display:flex; align-items:center; justify-content:center; gap:15px; padding:20px; margin:0; border:1px solid #ffffff20; border-radius:24px; background:var(--brand-primary); color:white; box-shadow:0 8px 24px var(--brand-shadow); cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none; transform:none; }
.call-speak:hover { background:var(--brand-primary-hover); }.call-speak:active { transform:none; }.call-speak.recording { background:var(--brand-recording,var(--brand-danger)); }.call-speak:disabled { opacity:.7; }
.call-speak svg { width:40px; height:40px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.speak-label { display:flex; flex-direction:column; gap:8px; text-align:left; }
.speak-label strong { font-size:clamp(24px,2vw,32px); font-weight:600; line-height:1.15; }.voice-availability { font-size:15px; color:rgba(255,255,255,.88); }
.call-stop { position:absolute; right:0; bottom:-54px; min-height:44px; max-height:48px; border:0; border-radius:12px; padding:10px 16px; background:var(--brand-surface); color:var(--brand-ink); font-size:18px; cursor:pointer; }.call-stop[hidden] { display:none; }
.welcome-bubble { border-top:2px solid var(--brand-accent); }
.answer-frame .dialogue-label { color:var(--brand-primary); }
.call-speak { border-color:var(--brand-primary); }
/* Change emphasis without moving targets while a visitor is using the tablet. */
.booth[data-reply-mode="basic"][data-form-available="true"] .tablet-form-link { background:var(--brand-primary); border-color:var(--brand-primary-hover); color:var(--brand-on-primary,#fff); box-shadow:0 6px 20px var(--brand-shadow); }
.booth[data-reply-mode="basic"] .tablet-form-link svg { stroke:currentColor; }
.booth[data-reply-mode="basic"] .tablet-form-link .questionnaire-title { font-weight:700; }
.booth[data-reply-mode="basic"][data-form-available="true"] .tablet-form-link:hover { background:var(--brand-primary-hover); }
.booth[data-reply-mode="basic"][data-form-available="true"] .call-speak:not(.recording) { background:var(--brand-card); color:var(--brand-ink); border:1px solid var(--brand-line); box-shadow:none; }
.booth[data-reply-mode="basic"][data-form-available="true"] .call-speak:not(.recording):hover { background:var(--brand-accent-soft); border-color:var(--brand-primary); }
.booth[data-reply-mode="basic"][data-form-available="true"] .call-speak:not(.recording) .voice-availability { color:var(--brand-muted); }
.call-stop { border:1px solid var(--brand-accent-line); }
.booth button:focus-visible,.review-page button:focus-visible { outline:3px solid var(--brand-focus); outline-offset:4px; }
.review-page input:focus,.review-page textarea:focus,.review-page select:focus { border-color:var(--brand-focus); outline:none; box-shadow:0 0 0 3px var(--brand-focus-ring); }
.call-portrait.tracking { transform:translate(var(--track-x,0),var(--track-y,0)); transition:transform .25s ease-out; }
.staff-settings { position:absolute; bottom:18px; right:22px; width:44px; height:44px; border:1px solid var(--brand-line); border-radius:50%; background:rgba(255,255,255,.8); color:var(--brand-muted); font-size:23px; cursor:pointer; }
.setup-dialog { border:1px solid var(--brand-line); padding:30px; border-radius:20px; max-width:480px; color:var(--brand-ink); background:var(--brand-card); }.setup-dialog::backdrop { background:rgba(26,35,50,.4); }.setup-dialog p { font-size:17px; }.setup-dialog button { margin:8px 8px 0 0; }
.model-status { position:absolute; top:max(22px,env(safe-area-inset-top)); right:24px; display:flex; align-items:center; gap:10px; min-height:44px; padding:9px 16px; border:1px solid var(--brand-line); border-radius:24px; background:var(--brand-card); color:var(--brand-ink); font-size:20px; font-weight:600; line-height:1.25; }
.model-status::before { content:''; width:10px; height:10px; border-radius:50%; background:var(--brand-muted); }
.model-status[data-mode="smart"]::before { background:#37694a; }.model-status[data-mode="basic"] { border-color:var(--brand-accent-line); }.model-status[data-mode="basic"]::before { background:var(--brand-primary); }
.mode-dialog { width:min(520px,calc(100% - 40px)); padding:30px; border:1px solid var(--brand-line); border-radius:22px; background:var(--brand-card); color:var(--brand-ink); }
.mode-dialog::backdrop { background:rgba(26,35,50,.4); }.mode-dialog h2 { font-size:30px; }.mode-dialog p { font-size:22px; line-height:1.5; margin:18px 0 24px; }.mode-dialog .mode-actions { display:flex; flex-direction:column; gap:12px; }.mode-dialog button { width:100%; min-height:56px; font-size:21px; border-radius:12px; }.mode-dialog .secondary { background:transparent; color:inherit; border:1px solid var(--brand-line); }
.review-page { max-width:1000px; }.review-page h1 { font-size:42px; letter-spacing:-1px; }.review-record { border:1px solid var(--brand-line); border-radius:12px; background:var(--brand-card); padding:24px; margin:24px 0; }.review-record h2 { font-size:24px; margin:15px 0; }.review-record pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; }.review-page form { display:grid; gap:12px; }.review-page input,.review-page select,.review-page textarea { border:1px solid var(--brand-line); padding:12px; background:white; font:inherit; border-radius:5px; width:100%; }.review-page button { border:0; padding:12px 18px; background:var(--brand-ink); color:white; border-radius:5px; cursor:pointer; }.review-record small { overflow-wrap:anywhere; }
@media(orientation:portrait) {
  .call-portrait { height:66%; object-position:center top; mask-image:linear-gradient(#000 88%,transparent); }
  .welcome-bubble { left:4%; max-width:90%; padding:18px 24px; }.welcome-intro { font-size:24px; }.welcome-brand { font-size:clamp(42px,7vw,60px); }
  .call-controls { right:24px; top:auto; bottom:78px; width:calc(100% - 308px); height:54svh; min-height:430px; max-height:690px; grid-template-rows:84px minmax(0,1fr) 36px 100px; gap:12px; }
  .call-options { left:24px; bottom:130px; width:236px; }
  .call-transcript,.call-answer { font-size:22px; }.question-frame,.answer-frame { padding:16px; }
  .question-frame { padding:10px 16px; }
  .call-identity { left:24px; bottom:18px; }.call-name { font-size:22px; }.call-maker { font-size:18px; }
  .model-status { top:210px; }
}
@media(max-width:600px) and (orientation:portrait) {
  .booth-screen { overflow:auto; }main.booth { height:auto; min-height:100svh; display:flex; flex-direction:column; gap:24px; padding:340px 16px 100px; }
  .call-portrait { height:360px; }.welcome-bubble { padding:14px 18px; top:20px; }.welcome-brand { font-size:42px; }.welcome-intro { font-size:21px; }
  .call-controls { position:relative; right:auto; top:auto; width:100%; height:560px; flex:none; min-height:0; bottom:auto; order:1; grid-template-rows:80px minmax(0,1fr) 42px 100px; gap:10px; }
  .call-options { position:relative; left:auto; bottom:auto; width:min(100%,310px); align-self:center; order:2; }.call-qr { padding:14px; }
  .question-frame,.answer-frame { padding:12px; border-radius:15px; }.dialogue-label { font-size:12px; margin-bottom:7px; }.call-transcript,.call-answer { font-size:19px; }
  .call-speak { padding:14px 10px; gap:9px; border-radius:18px; }.call-speak svg { width:26px; height:26px; }.speak-label strong { font-size:22px; }.voice-availability { font-size:12px; }.call-status { font-size:14px; }
  .model-status { top:210px; right:16px; font-size:18px; }
}
@media(max-height:650px) and (orientation:landscape) {
  main.booth { min-height:440px; }.welcome-bubble { top:20px; padding:16px 22px; }.welcome-brand { font-size:42px; }.welcome-intro { font-size:22px; }
  .call-controls { top:78px; bottom:60px; height:auto; min-height:0; width:38%; grid-template-rows:76px minmax(0,1fr) 30px 88px; gap:10px; }
  .question-frame,.answer-frame { padding:12px 16px; }.call-transcript,.call-answer { font-size:20px; }.dialogue-label { font-size:12px; margin-bottom:6px; }.call-status { font-size:14px; }
  .call-options { width:248px; bottom:90px; gap:12px; }.call-qr img { width:96px; }.call-speak { padding:16px; }.speak-label strong { font-size:24px; }.call-speak svg { width:30px; height:30px; }.voice-availability { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) { .call-portrait.tracking { transform:none; transition:none; } }
.questionnaire-entry { padding:22px; border-top:1px solid var(--brand-accent-line); background:var(--brand-card); }
.questionnaire-entry h2 { font-size:23px; margin:0 0 14px; }
.questionnaire-entry .button { width:100%; text-align:center; }
.questionnaire-entry p { font-size:13px; color:var(--brand-muted); margin:12px 0 0; }
.phone-modes { display:flex; gap:8px; padding:14px 20px; border-bottom:1px solid var(--brand-line); }
.mode-button { flex:1; min-height:48px; border:1px solid var(--brand-line); background:var(--brand-card); color:var(--brand-ink); border-radius:10px; font:inherit; cursor:pointer; }
.mode-button[aria-pressed="true"] { background:var(--brand-primary); border-color:var(--brand-primary); color:white; }
.phone-voice { padding:0 20px 20px; }.phone-voice[hidden],.phone-text[hidden] { display:none; }
.phone-voice-guide { color:var(--brand-muted); font-size:14px; }
.phone-voice-question,.phone-voice-answer { padding:16px; border:1px solid var(--brand-line); border-radius:12px; font-size:18px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.phone-voice-question:empty,.phone-voice-answer:empty { display:none; }.phone-voice-answer { background:var(--brand-primary-soft); border-color:var(--brand-accent-line); }
.phone-voice-status { color:var(--brand-muted); font-size:14px; }
.phone-speak { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; width:100%; min-height:100px; border:0; border-radius:14px; background:var(--brand-primary); color:white; touch-action:none; user-select:none; -webkit-user-select:none; cursor:pointer; }
.phone-speak strong { font-size:24px; }.phone-speak span { font-size:14px; }.phone-speak.recording { background:var(--brand-recording,var(--brand-danger)); }
.phone-stop { display:block; margin:12px auto 0; min-height:44px; padding:10px 18px; border:1px solid var(--brand-line); border-radius:10px; background:var(--brand-card); color:var(--brand-ink); cursor:pointer; }.phone-stop[hidden] { display:none; }
.manage-page { max-width:760px; }.manage-page h1 { font-size:42px; letter-spacing:-1px; }.manage-page section { border:1px solid var(--brand-line); border-radius:16px; background:var(--brand-card); padding:28px; }.manage-page form { display:grid; gap:22px; }.manage-page label { display:grid; gap:10px; font-size:18px; font-weight:600; }.manage-page select,.manage-page input { width:100%; min-height:52px; padding:12px; border:1px solid var(--brand-line); border-radius:10px; background:var(--brand-card); color:var(--brand-ink); font:inherit; }.manage-page button { min-height:56px; padding:14px 20px; border:0; border-radius:12px; background:var(--brand-primary); color:var(--brand-on-primary,#fff); font:inherit; font-weight:600; cursor:pointer; }.manage-page a { color:var(--brand-primary); overflow-wrap:anywhere; }.manage-page p { color:var(--brand-muted); }
