.translation-panel{margin:14px 0;padding:20px;border:1px solid #ccd8e4;border-radius:10px;background:#f7f9fb;color:#152b43;font:14px/1.5 Inter,'Segoe UI',sans-serif}.translation-panel h2{font-size:19px;letter-spacing:-.02em;margin:0 0 8px}.translation-panel p{margin:10px 0}.translation-panel textarea,.translation-panel select{background:#fff;color:#152b43;border:1px solid #98acc0;border-radius:6px;padding:10px;min-height:44px;font:inherit;width:100%;box-sizing:border-box}.translation-panel textarea{resize:vertical;min-height:78px}.translation-languages{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:12px 0}.translation-panel label{display:block;font-size:13px;line-height:1.6}.translation-panel .translation-check{display:flex;gap:9px;align-items:flex-start;margin:10px 0}.translation-check input{margin-top:4px;accent-color:#195fb7}.translation-actions{display:flex;gap:8px;flex-wrap:wrap}.translation-panel button{min-height:42px;border:1px solid #98acc0;border-radius:6px;padding:9px 13px;background:#fff;color:#152b43;font:600 13px/1.4 Inter,'Segoe UI',sans-serif;cursor:pointer}.translation-panel button:disabled{opacity:.45;cursor:not-allowed}.translation-panel button:first-child{background:#195fb7;color:white;border-color:#195fb7}.translation-panel :focus-visible{outline:3px solid #1e75de;outline-offset:2px}.translated-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:20px;min-height:32px;margin:14px 0}.translation-note{font-size:12px!important;color:#516477}
#settingsDialog{margin:auto;width:min(780px,94vw);max-height:88dvh;padding:0;border:1px solid #dce3e7;border-radius:16px;background:#f8fafc;color:#162332;box-shadow:0 20px 70px #0004;font:14px/1.5 Inter,sans-serif;overflow:hidden}
#settingsDialog::backdrop{background:#10203099}
.camera-placeholder{background:radial-gradient(ellipse at 20% 10%,#174d49 0%,#142e35 38%,#14222e 80%);padding:32px;overflow:auto}
.placeholder-inner{max-width:760px;width:100%;color:#e4eeed}
.workspace-kicker{font:600 10px/1.4 Inter,sans-serif;letter-spacing:.18em;color:#93c6b8}
.signing-symbol{font-size:52px;line-height:1;margin:22px auto 18px;width:94px;height:94px;border-radius:28px;display:grid;place-items:center;background:#ffffff0a;border:1px solid #ffffff20}
.placeholder-inner h1{font:600 clamp(27px,3vw,44px)/1.15 Inter,sans-serif;letter-spacing:-.045em;color:#f1faf7;margin:0 0 14px}
.placeholder-inner .workspace-description{font:400 15px/1.7 Inter,sans-serif;color:#b7cbcf;letter-spacing:0;margin:0}
.workspace-start{display:inline-flex;gap:30px;align-items:center;margin:24px 0 0;padding:14px 24px;border:0;border-radius:10px;background:#64e1b3;color:#113b31;font:600 14px/1.2 Inter,sans-serif;cursor:pointer;min-height:46px}
.workspace-start:hover{background:#8aebc8}.workspace-start:focus-visible{outline:3px solid white;outline-offset:4px}
.placeholder-inner .workspace-privacy{font:400 11px/1.4 Inter,sans-serif;letter-spacing:0;color:#91a9ad;margin:12px 0 0}
.workspace-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));text-align:left;gap:14px;margin-top:38px}
.workspace-steps article{border:1px solid #ffffff16;background:#ffffff06;border-radius:12px;padding:18px}
.workspace-steps article>span{color:#76d9b7;font:500 11px/1.4 Inter,sans-serif}.workspace-steps h2{font:600 13px/1.4 Inter,sans-serif;color:#e6f3ef;margin:12px 0 5px}
.workspace-steps p{font:400 12px/1.55 Inter,sans-serif!important;color:#9fb6bc;letter-spacing:0;margin:0}
.camera-idle .prediction-overlay{display:none}
@media(max-width:720px){.camera-idle .camera-placeholder{position:relative;min-height:520px;overflow:visible;width:100%}}
@media(max-width:480px){.status-bar .profile-button{padding:8px;min-width:0;min-height:36px;font-size:10px}.status-bar .status-left{min-width:0}.status-bar .status-right{flex:0 0 auto}}
.conversation-hint,.library-tip p{font:400 12px/1.6 Inter,sans-serif;color:#64748b;margin:0}
.conversation-panel h3{font-size:16px;letter-spacing:-.02em}.conversation-panel #sentenceText{font-family:Inter,sans-serif;letter-spacing:0;text-shadow:none;background:#f6f9f8;border-radius:8px;padding:12px}
.library-tip{padding-top:12px;border-top:1px solid #e5ece9}.library-tip button{margin-top:14px;width:100%;padding:10px;border:1px solid #a7d7c5;border-radius:8px;color:#047857;background:#f0fdf7;font:600 12px/1.4 Inter,sans-serif;cursor:pointer}
@media(max-height:760px) and (min-width:721px){.signing-symbol{width:64px;height:64px;font-size:36px;margin:14px auto}.workspace-steps{margin-top:24px}.workspace-steps article{padding:12px}.workspace-start{margin-top:16px}.camera-placeholder{padding:20px}}
@media(max-width:720px){.camera-container.camera-idle{height:auto;min-height:520px}.camera-placeholder{padding:24px 16px}.workspace-steps{gap:8px;margin-top:26px}.workspace-steps article{padding:10px}.workspace-steps h2{font-size:11px}.workspace-steps p{font-size:10px!important}.placeholder-inner .workspace-description{font-size:13px}.signing-symbol{width:70px;height:70px;font-size:42px;margin:18px auto}.workspace-kicker{font-size:9px}}
#brandAccountButton{display:flex;align-items:center;gap:10px;background:none;border:0;padding:0;color:inherit;cursor:pointer;text-align:left}
#brandAccountButton:focus-visible{outline:3px solid #059669;outline-offset:4px;border-radius:6px}
.conversation-panel{flex-shrink:0}.conversation-panel .sentence-strip{height:auto;min-height:0;backdrop-filter:none;-webkit-backdrop-filter:none;z-index:auto}
.conversation-panel .sentence-strip{position:static;display:flex;flex-wrap:wrap;gap:8px;padding:12px 0;background:transparent;border:0;color:#162332}
.conversation-panel .sentence-label{width:100%;color:#64748b}
.conversation-panel #sentenceText{width:100%;flex:1 0 100%;min-height:72px;max-height:220px;overflow:auto;overflow-wrap:anywhere;white-space:pre-wrap;font-size:18px;color:#162332;user-select:text}
.conversation-panel .sentence-strip button{min-width:40px;min-height:40px;border:1px solid #cbd5e1;border-radius:8px;color:#047857;background:#fff}
.conversation-panel .history-bar{display:flex;flex-wrap:wrap;height:auto;gap:10px;padding:14px 0 0;background:transparent;border-top:1px solid #e2e8f0;color:#162332}
.conversation-panel .history-label{width:100%;color:#64748b}.conversation-panel .history-chips{width:100%;flex:1 0 100%;flex-wrap:wrap;max-height:180px;overflow:auto}
.conversation-panel .clear-btn{min-height:36px;color:#475569;border:1px solid #cbd5e1;border-radius:6px;padding:8px}
@media(min-width:721px){.right-panel{width:250px;flex-shrink:0}}
@media(max-width:480px){.status-bar .version-tag{display:none}.status-left .logo-text{font-size:13px}#brandAccountButton{gap:6px}.status-bar{gap:8px}.status-right{gap:6px}}
.translated-text{user-select:text}
.username-settings{padding:16px 0;border-bottom:1px solid #dce3e7;margin-bottom:16px}.username-settings label{display:block;font-weight:600}.username-settings input{display:block;width:100%;padding:12px;margin:8px 0;border:1px solid #b8c8d2;border-radius:8px;background:white;color:#162332;font:inherit}.username-settings button{padding:10px 14px;border:1px solid #b8c8d2;border-radius:8px;background:white;color:#162332;font:inherit}
.stt-interim-wrap{background:#f8fafc;border-color:#dce3e7;padding:0}
.settings-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;background:white;border-bottom:1px solid #dde3e8;gap:16px}
.settings-heading h2{margin:0;font-size:23px}.settings-heading p{color:#64748b}
.settings-content{padding:12px 24px 24px;overflow:auto;max-height:calc(88dvh - 100px)}
.settings-content>details{border-bottom:1px solid #dce3e7;padding:12px 0}
.settings-content>details>summary{font-size:16px;font-weight:600;cursor:pointer;padding:8px 0}
#settingsDialog .panel-section{margin:12px 0;width:100%;max-width:none}
#settingsDialog button{cursor:pointer}#settingsClose,#accountSignOut,#deleteAccount{padding:10px 14px;border:1px solid #b8c8d2;border-radius:8px;background:white;color:#162332;font:inherit}
#settingsDialog label[for=deleteConfirmation]{display:block;margin-top:20px}#deleteConfirmation{display:block;width:100%;padding:12px;margin:8px 0;border:1px solid #b8c8d2;border-radius:8px;background:white;color:#162332}
#settingsDialog .danger{color:#b91c1c;border-color:#fca5a5}#accountMessage{margin-top:12px}
#settingsDialog p{margin-bottom:12px}#settingsDialog :focus-visible{outline:3px solid #059669;outline-offset:3px}
.translation-panel{margin:0;padding:12px 0;border:0;background:transparent}.translation-check input{width:18px;height:18px;min-height:18px;flex-shrink:0}.translated-text:empty{display:none}.translation-panel .translation-note:empty{display:none}
#settingsDialog .stt-lang-group{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}#settingsDialog .stt-lang-btn{color:#24504b;background:white;border-color:#b8c8d2}#settingsDialog .stt-lang-btn.active{background:#ecfdf5;color:#047857;border-color:#10b981}
body[data-app-state=ready] .main-layout{padding-bottom:12px}
.stt-inline-panel{flex:0 0 auto;border:1px solid #dce3e7;border-radius:10px;background:white;margin-top:8px;overflow:hidden}
.stt-inline-header{padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:white}
.stt-inline-title-group{display:flex;align-items:center;gap:8px}.stt-inline-title{color:#12614f;letter-spacing:.06em;font-size:12px}.stt-inline-controls{display:flex;gap:8px;flex-wrap:wrap}
.stt-inline-panel .stt-btn{font:600 12px/1.2 Inter,sans-serif;min-height:38px;padding:8px 12px;border-radius:8px;box-shadow:none}
.stt-output-area{background:#f8fafc;max-height:40vh;overflow:auto}.stt-interim{background:#f8fafc;color:#162332;font:600 clamp(24px,2.4vw,36px)/1.4 Inter,sans-serif;padding:18px 22px;min-height:104px;border:0;text-shadow:none;overflow-wrap:anywhere;font-style:normal}.stt-interim:empty:before{content:'Your words will stay here for the other person to read.';color:#637383;font-size:18px;font-weight:400}.stt-message{margin:0;padding:0 14px 8px;color:#536577;font:12px/1.5 Inter,sans-serif}.stt-history-details>summary{cursor:pointer;padding:10px 14px;color:#24504b;font-size:13px}.stt-history{background:#f8fafc}.stt-history:empty{display:none}
.stt-history-item{background:#fff;border:1px solid #dce3e7;color:#162332}.stt-item-text{color:#162332;text-shadow:none}
.left-panel .stt-inline-panel{width:100%;margin-top:0;min-width:0}
.left-panel .stt-inline-header{padding:12px;gap:10px}
.left-panel .stt-inline-title-group{flex-wrap:wrap;gap:6px}
.left-panel .stt-inline-controls{width:100%;gap:6px}
.left-panel .stt-inline-panel .stt-btn{padding:8px;font-size:11px}
.left-panel .stt-interim{font-size:28px;padding:16px;min-height:170px;white-space:pre-wrap;user-select:text}
.left-panel .stt-output-area{max-height:48vh}
.left-panel .stt-history-item{flex-wrap:wrap;overflow-wrap:anywhere}
@media(min-width:801px){.left-panel{width:clamp(260px,22vw,330px)}}
.status-right{gap:8px}#settingsButton{white-space:nowrap;border:1px solid #dce3e7;border-radius:7px;background:white;color:#047857}
@media(max-width:1100px){.status-right .stat-item{display:none}.status-center{gap:5px}.status-pill{font-size:9px;padding:4px 6px}}
@media(max-width:800px){.status-center{display:none}.left-panel,.right-panel{width:180px}}
@media(max-width:720px){html,body{height:auto;overflow:auto}.main-layout{height:auto;min-height:0;flex-direction:column;overflow:visible;padding:12px 14px}.viewport-wrapper{order:1;overflow:visible}.left-panel{order:0;width:100%;max-height:none;flex-direction:row;flex-wrap:wrap;overflow:visible}.left-panel>.panel-section{flex:1;min-width:130px}.right-panel{order:2;width:100%;max-height:none;flex-direction:column;overflow:visible}.camera-container{height:48vh;min-height:260px;max-height:none;flex:none}.status-bar{position:sticky;height:auto;min-height:56px;flex-wrap:wrap}.status-left{gap:6px}.status-right{margin-left:auto}.settings-content{padding:10px 16px 20px}.settings-heading{padding:16px}.translation-languages{grid-template-columns:1fr}.stt-inline-header{align-items:flex-start}.stt-inline-controls{width:100%}}

/* Phone workspace: camera, controls, captions, then the complete library.
   Only layout boxes change; the original elements and handlers stay intact. */
@media(max-width:720px){
  html,body{min-width:0}
  .status-bar{min-height:64px;padding:10px 12px;gap:8px;flex-wrap:nowrap}
  .status-left{flex:1;min-width:0}.status-left .logo-text{font-size:12px;white-space:nowrap}
  #brandAccountButton{gap:6px}.status-bar .version-tag{display:none}
  .status-bar .profile-button,#settingsButton{min-height:42px;padding:9px 10px;font-size:11px;border:1px solid #dce3e7;border-radius:9px;background:#fff;color:#165f50}
  .status-right{gap:6px;flex:0 0 auto}
  .main-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;height:auto;min-height:0;padding:12px;align-items:start}
  .main-layout>.left-panel,.main-layout>.viewport-wrapper,.main-layout>.right-panel{display:contents}
  .main-layout .panel-section{min-width:0;width:100%;max-height:none;overflow:visible;margin:0;box-sizing:border-box}
  .left-panel>.panel-section{order:1;grid-column:auto;padding:12px;gap:10px;align-self:stretch}
  .left-panel>.panel-section h3{font-size:12px;margin:0;padding-bottom:8px}
  .left-panel>.panel-section button{min-height:44px}
  .left-panel>.panel-section .mode-switch{flex-wrap:nowrap;gap:0}
  .left-panel>.panel-section .mode-btn{min-width:0;padding:10px 6px;font-size:11px}
  .main-layout .camera-container,.main-layout .camera-container.camera-idle{order:0;grid-column:1/-1;position:relative;width:100%;height:clamp(300px,48svh,390px);min-height:300px;max-height:none;overflow:hidden;border-radius:16px;margin:0}
  .camera-idle .camera-placeholder{position:absolute;inset:0;min-height:0;height:100%;padding:22px 18px;overflow:auto;box-sizing:border-box}
  .workspace-kicker{font-size:9px}.signing-symbol{width:56px;height:56px;font-size:34px;margin:14px auto}
  .placeholder-inner h1{font-size:29px;margin-bottom:10px}.placeholder-inner .workspace-description{font-size:13px;line-height:1.6}
  .workspace-start{margin-top:18px;min-height:46px;padding:12px 22px}.placeholder-inner .workspace-privacy{font-size:10px;margin-top:10px}
  .workspace-steps{display:none}
  .left-panel .stt-inline-panel{order:2;grid-column:1/-1;width:100%;margin:0;border-radius:12px}
  .left-panel .stt-inline-header{padding:12px;gap:10px;align-items:center}
  .left-panel .stt-inline-title{font-size:11px}.left-panel .stt-inline-controls{width:auto;gap:6px}
  .left-panel .stt-inline-panel .stt-btn{min-height:42px;font-size:10px;padding:9px}
  .left-panel .stt-output-area{max-height:none}.left-panel .stt-interim{min-height:98px;max-height:240px;overflow:auto;padding:14px 16px;font-size:26px;line-height:1.4;box-sizing:border-box}
  .stt-interim:empty:before{font-size:16px;line-height:1.5}.stt-message{padding:0 12px 10px;font-size:11px;line-height:1.5}
  .stt-history-details>summary{padding:12px 16px}.stt-history-details .stt-history{max-height:240px;overflow:auto}
  .right-panel>.panel-section{order:4;grid-column:1/-1;padding:16px;border-radius:12px}
  .right-panel>.conversation-panel{order:3}
  .right-panel>#trainSection{order:1;grid-column:1/-1;scroll-margin-top:84px}
  .conversation-panel .history-bar{position:static;margin:0;max-height:none;padding:12px 0 0}
  .conversation-panel #sentenceText{min-height:72px;max-height:200px;font-size:22px}
  .conversation-panel .history-chips{max-width:100%;max-height:160px}
  .conversation-panel .sentence-strip button,.conversation-panel .clear-btn{min-width:44px;min-height:44px}
  #trainSection input{min-height:46px;font-size:16px}#trainSection .train-actions{flex-wrap:wrap}
  .creator-footer{padding:20px 12px calc(20px + env(safe-area-inset-bottom));font-size:11px;line-height:1.7;overflow-wrap:anywhere}
  #settingsDialog .panel-section{max-height:none;overflow:visible;min-width:0}
}
@media(max-width:360px){
  .status-left .logo-text{font-size:10px}.status-bar .profile-button,#settingsButton{padding:8px;font-size:10px}
  .left-panel .stt-inline-controls{width:100%}.left-panel .stt-inline-header{gap:8px}
}
.training-help{margin:0;color:#526677;font:400 12px/1.6 Inter,sans-serif}
#trainingStartCamera[hidden]{display:none}
@media(max-width:720px){
  .training-mode .camera-container,.training-mode .camera-container.camera-idle{height:300px;min-height:300px}
  .training-mode .camera-idle .signing-symbol{display:none}
  .training-mode .camera-idle .workspace-kicker{margin-bottom:14px}
  .creator-footer{color:#526677;background:#f8fafc}
}
