:root {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #153332;
  background: #f5f7f3;
  font-synthesis: none;
  --ink: #143332;
  --muted: #6c7b78;
  --green: #0b6b61;
  --green-dark: #074a44;
  --mint: #dff3eb;
  --cream: #fffdf8;
  --line: #dfe5df;
  --coral: #f67861;
  --shadow: 0 18px 50px rgba(31, 62, 57, .09);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 50% 12%, #fff 0, #f5f7f3 38%, #edf1eb 100%); }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #e8a130; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -50px; left: 20px; z-index: 99; padding: 12px 18px; background: white; color: var(--ink); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.topbar { height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 3.5vw; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 11px; align-items: center; color: #082a28; text-decoration: none; font: 800 21px 'Manrope', sans-serif; letter-spacing: -.5px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--green); display: flex; align-items: center; justify-content: center; gap: 3px; transform: rotate(-2deg); }
.brand-mark span { display: block; width: 8px; height: 17px; border-radius: 7px 7px 3px 3px; background: #fff; transform: rotate(-18deg); }
.brand-mark span + span { transform: rotate(18deg); }
.session-chip, .language-button { border: 1px solid var(--line); background: #f8faf7; border-radius: 99px; padding: 8px 13px; font-size: 13px; font-weight: 600; }
.status-dot, .ready-tag span { width: 7px; height: 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: #29a45b; box-shadow: 0 0 0 3px #daf1df; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.top-actions button { height: 37px; }
.icon-button { width: 37px; border-radius: 50%; border: 1px solid var(--line); background: white; color: var(--ink); }
.language-button { color: var(--ink); }
.end-button { padding: 0 16px; border-radius: 99px; border: 1px solid #e5c5bf; background: #fff7f4; color: #a33a29; font-weight: 700; }
main { max-width: 1320px; margin: 0 auto; padding: 42px 30px 70px; }
.welcome { display: flex; align-items: end; justify-content: space-between; margin: 0 auto 30px; max-width: 1180px; }
.eyebrow, .panel-label { color: var(--green); font-weight: 800; letter-spacing: 1.6px; font-size: 11px; margin: 0 0 10px; }
h1, h2 { font-family: 'Manrope', sans-serif; }
h1 { font-size: clamp(30px, 3vw, 44px); letter-spacing: -1.7px; line-height: 1.12; margin: 0 0 9px; color: #102f2e; }
.welcome p:last-child { color: #304b47; margin: 0; font-size: 16px; font-weight: 600; }
.help-button { border: 0; background: transparent; color: var(--green); font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 10px; }
.help-button span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #9fcac0; border-radius: 50%; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 64px minmax(0,1fr); align-items: center; max-width: 1180px; margin: 0 auto; }
.person-panel { min-width: 0; background: var(--cream); border: 1px solid rgba(204,214,205,.8); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.panel-heading { min-height: 52px; display: flex; justify-content: space-between; align-items: start; margin-bottom: 18px; }
.panel-label { margin-bottom: 3px; }
.panel-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.45px; }
.language-tag, .ready-tag { font-size: 11px; background: #eef4f0; color: #55716b; border-radius: 99px; padding: 7px 10px; }
.ready-tag { color: var(--green); background: #e9f6ee; font-weight: 700; }
.ready-tag span { width: 6px; height: 6px; margin-right: 5px; }
.camera-stage, .avatar-stage { position: relative; height: 285px; border-radius: 15px; overflow: hidden; }
.camera-stage { background: linear-gradient(135deg, #173a38, #0b2524); }
#cameraFeed { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; color: white; background: radial-gradient(circle at 50% 30%, #315a55, #102f2e 70%); }
.camera-placeholder[hidden] { display: none; }
.hand-illustration { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 36px; margin-bottom: 12px; }
.camera-placeholder p { margin: 0 0 4px; font-weight: 700; font-size: 17px; }
.camera-placeholder span { color: #bed0cc; font-size: 12px; }
.frame-corners i { position: absolute; width: 22px; height: 22px; border-color: rgba(255,255,255,.55); border-style: solid; }
.frame-corners i:nth-child(1) { left: 16px; top: 16px; border-width: 2px 0 0 2px; }
.frame-corners i:nth-child(2) { right: 16px; top: 16px; border-width: 2px 2px 0 0; }
.frame-corners i:nth-child(3) { left: 16px; bottom: 16px; border-width: 0 0 2px 2px; }
.frame-corners i:nth-child(4) { right: 16px; bottom: 16px; border-width: 0 2px 2px 0; }
.live-badge, .recognising { display: none; position: absolute; font-size: 11px; color: white; background: rgba(9,39,37,.78); backdrop-filter: blur(4px); padding: 7px 10px; border-radius: 99px; }
.live-badge { top: 13px; left: 13px; }
.live-badge span { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #f66754; margin-right: 4px; }
.recognising { bottom: 14px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.recognising span { display: inline-block; width: 3px; height: 9px; margin: 0 1px; background: #72d2b9; border-radius: 2px; animation: wave .8s ease-in-out infinite alternate; }
.recognising span:nth-child(2) { animation-delay: .2s; }.recognising span:nth-child(3) { animation-delay: .4s; }
.visible { display: block; }
@keyframes wave { to { height: 3px; } }
.camera-actions { display: flex; gap: 10px; margin: 13px 0; }
.primary-button, .secondary-button { border: 0; border-radius: 10px; padding: 11px 15px; font-weight: 700; font-size: 13px; }
.primary-button { background: var(--green); color: white; flex: 1; }.primary-button.stop { background: #7d3028; }
.secondary-button { background: #eaf1ed; color: var(--green); }
.translation-card { background: #f1f6f2; border: 1px solid #e0e9e2; border-radius: 13px; padding: 14px 16px; min-height: 115px; }
.translation-topline { display: flex; justify-content: space-between; color: #7b8b86; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.confidence { color: var(--green); letter-spacing: 0; }
.translation-card p { margin: 8px 0 4px; min-height: 42px; line-height: 1.45; color: #39504c; }
.translation-card p.typing::after { content: ''; display: inline-block; width: 2px; height: 16px; background: var(--green); margin-left: 2px; animation: blink .6s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.translation-actions { display: none; gap: 8px; align-items: center; border-top: 1px solid #dde7df; padding-top: 9px; }
.translation-actions.visible { display: flex; }
.translation-actions button { border: 0; background: transparent; color: var(--green); padding: 2px; font-size: 11px; font-weight: 700; }
.translation-actions .send-translation { margin-left: auto; }
.translation-edit { width: 100%; margin: 8px 0; min-height: 52px; border: 1px solid var(--green); border-radius: 7px; resize: vertical; padding: 8px; }
.direction { display: grid; justify-items: center; gap: 6px; color: #8ba39e; }
.direction span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #d7e0db; border-radius: 50%; background: white; font-size: 20px; }
.direction small { font-size: 8px; font-weight: 800; letter-spacing: 1px; writing-mode: vertical-rl; }
.avatar-stage { display: grid; place-items: center; background: linear-gradient(160deg, #e3f3ed, #c9e6dc); }
.avatar-halo { position: absolute; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.18); }
.avatar { position: relative; width: 190px; height: 240px; top: 26px; }
.avatar-head { position: absolute; z-index: 4; left: 70px; top: 20px; width: 58px; height: 74px; background: #b97652; border-radius: 48% 48% 43% 43%; }
.avatar-head .hair { position: absolute; inset: -9px -4px 35px -5px; background: #322b2a; border-radius: 50% 50% 25% 25%; transform: rotate(-4deg); }
.avatar-head i { position: absolute; top: 34px; width: 4px; height: 4px; background: #2b2321; border-radius: 50%; }.avatar-head i:nth-of-type(1){left:17px}.avatar-head i:nth-of-type(2){right:17px}
.avatar-head b { position: absolute; width: 18px; height: 7px; left: 20px; bottom: 15px; border-bottom: 2px solid #5e392b; border-radius: 50%; }
.avatar-neck { position: absolute; z-index: 2; left: 84px; top: 82px; width: 30px; height: 30px; background: #a76444; }
.avatar-body { position: absolute; z-index: 1; left: 37px; top: 102px; width: 124px; height: 146px; background: #126b62; border-radius: 50px 50px 12px 12px; clip-path: polygon(17% 0, 83% 0, 100% 100%, 0 100%); }
.avatar-body::after { content:''; position: absolute; left: 59px; top: 24px; height: 100px; border-left: 1px solid rgba(255,255,255,.25); }
.arm { position: absolute; z-index: 5; width: 30px; height: 105px; top: 110px; background: #b97652; border-radius: 20px; transform-origin: 15px 12px; }
.arm-left { left: 40px; transform: rotate(-20deg); }.arm-right { right: 37px; transform: rotate(20deg); }
.hand { position: absolute; bottom: -13px; left: -4px; width: 38px; height: 40px; border-radius: 50% 50% 42% 42%; background: #b97652; }
.avatar.signing .arm-left { animation: sign-left .75s ease-in-out infinite alternate; }.avatar.signing .arm-right { animation: sign-right .62s ease-in-out infinite alternate; }.avatar.signing .avatar-head { animation: nod 1.1s ease-in-out infinite; }
@keyframes sign-left { to { transform: translate(48px,-30px) rotate(-90deg); } } @keyframes sign-right { to { transform: translate(-45px,-48px) rotate(85deg); } } @keyframes nod { 50% { transform: rotate(3deg) translateY(2px); } }
.avatar-caption { position: absolute; left: 20px; right: 20px; bottom: 12px; margin: 0; padding: 7px 12px; background: rgba(255,255,255,.88); border-radius: 7px; text-align: center; font-size: 11px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 7; }
.response-tabs { display: flex; gap: 18px; height: 47px; align-items: end; border-bottom: 1px solid var(--line); }
.response-tabs button { height: 38px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #778782; font-weight: 700; font-size: 12px; }
.response-tabs button[aria-selected="true"] { border-color: var(--green); color: var(--green); }.response-tabs button.listening { color: #b33d2d; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.reply-box { border: 1px solid var(--line); border-radius: 10px; margin: 12px 0; overflow: hidden; background: white; }
#replyInput { display: block; width: 100%; height: 64px; resize: none; border: 0; padding: 12px; color: var(--ink); outline: none; font-size: 13px; }
.reply-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 8px; color: #9aa6a3; font-size: 10px; }
.suggestion { border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; }
.sign-button { width: 100%; height: 45px; border: 0; border-radius: 10px; background: var(--green); color: white; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; }
.sign-button:disabled { background: #cbd6d0; cursor: not-allowed; }
.safety-note { margin: 9px 0 0; color: #788681; text-align: center; font-size: 10px; }
.transcript-section { max-width: 1180px; margin: 18px auto 0; background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.transcript-head { display: flex; align-items: center; padding-right: 14px; }
.transcript-toggle { flex: 1; min-width: 0; min-height: 64px; border: 0; background: transparent; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; text-align: left; color: var(--ink); }
.transcript-toggle span:first-child { display: grid; gap: 3px; }.transcript-toggle small { color: var(--muted); }
.export-transcript { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #bfd4cc; border-radius: 9px; background: #eef6f1; color: var(--green); padding: 9px 12px; font-size: 11px; font-weight: 800; }
.export-transcript:disabled { opacity: .45; cursor: not-allowed; }
.export-transcript span { font-size: 15px; line-height: 1; }
.transcript { border-top: 1px solid var(--line); padding: 16px 20px; max-height: 260px; overflow: auto; }
.message { max-width: 76%; padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; background: #eaf3ef; }.message.team { margin-left: auto; background: #fff0e8; }
.message div { display: flex; gap: 10px; font-size: 11px; color: var(--green); }.message time { color: var(--muted); }.message p { margin: 5px 0 0; }
footer { min-height: 64px; padding: 14px 4vw; display: flex; gap: 28px; justify-content: center; align-items: center; border-top: 1px solid var(--line); background: white; color: #687975; font-size: 11px; }
.shield { display: inline-grid; place-items: center; width: 19px; height: 22px; margin-right: 5px; background: var(--green); color: white; clip-path: polygon(50% 0, 92% 17%, 84% 77%, 50% 100%, 16% 77%, 8% 17%); }
footer button { border: 0; background: transparent; color: var(--green); text-decoration: underline; font-weight: 700; }
dialog { width: min(520px, calc(100% - 32px)); border: 0; border-radius: 18px; padding: 30px; color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.25); } dialog::backdrop { background: rgba(8,32,30,.55); backdrop-filter: blur(3px); }
dialog h2 { margin-top: 0; }.dialog-close { position: absolute; right: 16px; top: 14px; border: 0; background: transparent; font-size: 26px; color: var(--muted); }
dialog ol { padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } dialog li { background: #eff5f1; padding: 13px; border-radius: 10px; display: grid; gap: 3px; } dialog li span { color: var(--muted); font-size: 12px; }
.dialog-note { border-left: 3px solid var(--coral); padding: 10px 13px; background: #fff5f0; font-size: 12px; line-height: 1.45; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 25px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #0e302e; color: white; border-radius: 99px; padding: 12px 18px; font-size: 13px; box-shadow: 0 12px 35px rgba(0,0,0,.2); transition: .25s ease; }.toast.show { opacity: 1; transform: translate(-50%,0); }
.high-contrast { --ink:#000; --muted:#303030; --green:#004c45; --line:#777; filter: contrast(1.18); }
@media (max-width: 900px) { .topbar { grid-template-columns: 1fr auto; }.session-chip { display:none; }.workspace { grid-template-columns: 1fr; gap: 14px; }.direction { grid-auto-flow: column; justify-content: center; }.direction small { writing-mode: initial; align-self:center; }.person-panel { padding:20px; }.welcome { align-items:start; }.camera-stage,.avatar-stage { height: 320px; } }
@media (max-width: 560px) { .topbar { height:64px; padding:0 14px; }.brand { font-size:18px; }.brand-mark { width:30px;height:30px;}.icon-button,.language-button { display:none; }.end-button { padding:0 11px; }.welcome { display:block; }.help-button { padding-left:0; margin-top:12px; } main { padding:28px 12px 50px; }.person-panel { border-radius:17px;padding:16px;}.panel-heading { display:block; }.language-tag,.ready-tag { display:inline-block;margin-top:8px; }.camera-stage,.avatar-stage{height:265px}.direction small{display:none}.transcript-section{margin-top:14px}.transcript-head{align-items:stretch;padding-right:0;flex-wrap:wrap}.transcript-toggle{min-height:58px}.export-transcript{width:100%;justify-content:center;border-width:1px 0 0;border-radius:0;padding:10px}footer{flex-direction:column;gap:8px;padding:18px}dialog ol{grid-template-columns:1fr} }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
