:root {
    --navy-950: #061322;
    --navy-900: #081a2f;
    --navy-800: #0d2946;
    --navy-700: #123a5d;
    --cyan: #42e8df;
    --cyan-strong: #10cfc7;
    --blue: #5aa8ff;
    --violet: #8778ff;
    --ink: #10243a;
    --muted: #66778a;
    --paper: #f4f8fb;
    --white: #ffffff;
    --border: rgba(21, 55, 83, .12);
    --danger: #ec5b70;
    --success: #1f9d72;
    --shadow: 0 22px 65px rgba(7, 28, 49, .14);
    --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(66, 232, 223, .12), transparent 28rem),
        radial-gradient(circle at 100% 5%, rgba(135, 120, 255, .11), transparent 30rem),
        var(--paper);
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.site-header {
    height: 74px;
    padding: 0 clamp(18px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(8, 26, 47, .08);
    background: rgba(244, 248, 251, .82);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 30;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 850; letter-spacing: -.03em; font-size: 1.18rem; }
.brand-mark { width: 34px; height: 34px; position: relative; border-radius: 12px; background: linear-gradient(135deg, var(--navy-800), var(--navy-950)); box-shadow: 0 8px 20px rgba(8, 26, 47, .22); }
.brand-mark span { position: absolute; top: 9px; width: 8px; height: 16px; border: 2px solid var(--cyan); border-radius: 6px; }
.brand-mark span:first-child { left: 7px; border-right: 0; border-radius: 6px 0 0 6px; }
.brand-mark span:last-child { right: 7px; border-left: 0; border-radius: 0 6px 6px 0; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-link, .text-link { text-decoration: none; color: #39536c; font-weight: 700; }
.icon-link { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.7); border: 1px solid var(--border); }
.site-footer { margin-top: auto; min-height: 64px; padding: 18px clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: .82rem; }

.eyebrow { color: #176f7b; text-transform: uppercase; letter-spacing: .13em; font-weight: 850; font-size: .76rem; }
.button { border: 0; border-radius: 14px; padding: 13px 19px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: linear-gradient(135deg, #0d7d91, #1357c7); box-shadow: 0 13px 30px rgba(19, 87, 199, .24); }
.button.ghost { color: var(--navy-800); background: rgba(255,255,255,.74); border: 1px solid var(--border); }
.button.large { min-height: 54px; padding-inline: 25px; }
.button.full { width: 100%; min-height: 52px; }
.button.preview-button { margin-top: 18px; color: var(--navy-800); background: #edf6fb; border: 1px solid #d7e7f0; }
.button:disabled { opacity: .62; cursor: wait; transform: none; }

.landing-grid { width: min(1160px, calc(100% - 36px)); margin: 0 auto; min-height: calc(100dvh - 138px); display: grid; grid-template-columns: 1.07fr .93fr; gap: clamp(40px, 8vw, 100px); align-items: center; padding: 52px 0 70px; }
.hero-copy h1 { margin: 17px 0 22px; font-size: clamp(3rem, 6vw, 5.6rem); line-height: .95; letter-spacing: -.065em; color: var(--navy-950); }
.hero-copy h1 span { background: linear-gradient(95deg, #0c8797, #4c62d2); -webkit-background-clip: text; color: transparent; }
.hero-copy > p { max-width: 620px; margin: 0; color: #566b7f; font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 27px; color: #607489; font-size: .84rem; font-weight: 750; }
.trust-row span::before { content: '✓'; color: #0b9b79; margin-right: 7px; }
.phone-demo { width: min(410px, 100%); margin-inline: auto; min-height: 640px; border: 9px solid #091a2b; border-radius: 48px; padding: 28px 25px; background: linear-gradient(180deg, #0a2038, #071526); box-shadow: 0 42px 90px rgba(6, 20, 35, .28), inset 0 0 0 1px rgba(255,255,255,.12); color: white; position: relative; overflow: hidden; }
.phone-demo::before { content: ''; position: absolute; inset: -30% -50% auto; height: 380px; background: radial-gradient(circle, rgba(66,232,223,.22), transparent 62%); }
.phone-top { height: 18px; display: flex; justify-content: space-between; opacity: .8; position: relative; }
.phone-top span:first-child { width: 52px; height: 8px; border-radius: 10px; background: rgba(255,255,255,.22); }
.phone-top span:last-child { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.demo-language-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 30px; position: relative; }
.demo-language-row div:last-child { text-align: right; }
.demo-language-row small { display: block; color: #8fa8c0; margin-bottom: 5px; }
.demo-language-row strong { font-size: 1.18rem; }
.swap-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--cyan); }
.demo-orb { width: 180px; height: 180px; margin: 72px auto 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(circle at 40% 30%, #35efe3, #166cb3 65%, #132451); box-shadow: 0 0 0 18px rgba(66,232,223,.06), 0 0 0 38px rgba(66,232,223,.025), 0 28px 65px rgba(0,0,0,.3); position: relative; }
.demo-orb span { width: 7px; height: 42px; border-radius: 12px; background: white; animation: wave 1.1s ease-in-out infinite; }
.demo-orb span:nth-child(2) { height: 75px; animation-delay: -.2s; }.demo-orb span:nth-child(3) { height: 58px; animation-delay: -.4s; }.demo-orb span:nth-child(4) { height: 30px; animation-delay: -.6s; }
.demo-status { text-align: center; color: #a7c5d8; font-weight: 700; margin-bottom: 37px; }
.demo-message { padding: 15px 18px; border-radius: 17px; margin: 11px 0; position: relative; font-size: .96rem; line-height: 1.4; }
.demo-message.original { margin-right: 46px; background: rgba(255,255,255,.1); }
.demo-message.translated { margin-left: 46px; background: linear-gradient(135deg, rgba(66,232,223,.22), rgba(74,104,235,.27)); border: 1px solid rgba(66,232,223,.2); }

.auth-layout { min-height: calc(100dvh - 138px); display: grid; place-items: center; padding: 46px 18px; }
.auth-card { width: min(480px, 100%); background: rgba(255,255,255,.84); backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,.85); border-radius: 28px; box-shadow: var(--shadow); padding: clamp(27px, 6vw, 46px); }
.auth-card h1 { margin: 11px 0 8px; color: var(--navy-950); font-size: clamp(2rem, 5vw, 2.65rem); letter-spacing: -.045em; }
.muted { color: var(--muted); line-height: 1.55; }
.stack-form { display: grid; gap: 18px; margin-top: 26px; }
.stack-form label, .settings-card > label { display: grid; gap: 8px; font-weight: 780; color: #294158; }
input[type="text"], input[type="email"], input[type="password"], select { width: 100%; height: 52px; border-radius: 13px; border: 1px solid #ccdbe4; background: rgba(255,255,255,.92); padding: 0 15px; outline: none; color: var(--ink); transition: border-color .18s ease, box-shadow .18s ease; }
input:focus, select:focus { border-color: #2e91b4; box-shadow: 0 0 0 4px rgba(46,145,180,.12); }
label small { color: #8493a1; font-weight: 550; }
.auth-switch { text-align: center; color: var(--muted); margin: 22px 0 0; }
.auth-switch a { color: #176d97; font-weight: 800; }
.alert { border-radius: 13px; padding: 13px 15px; margin: 18px 0; font-weight: 700; }
.alert.error { background: #fff0f2; color: #9d3044; border: 1px solid #ffd2da; }
.alert.success { background: #eaf9f3; color: #1a7457; border: 1px solid #c4ecd9; }

.setup-layout { width: min(980px, calc(100% - 34px)); margin: 0 auto; padding: 52px 0 78px; }
.setup-header { max-width: 680px; margin-bottom: 30px; }
.step-pill, .privacy-pill { display: inline-flex; border-radius: 999px; padding: 7px 11px; background: #e0f7f4; color: #147269; font-weight: 850; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.setup-header h1, .settings-heading h1 { font-size: clamp(2.25rem, 5vw, 3.7rem); letter-spacing: -.055em; margin: 15px 0 10px; color: var(--navy-950); }
.setup-header p, .settings-heading p { color: var(--muted); font-size: 1.04rem; }
.setup-card { background: rgba(255,255,255,.9); border: 1px solid white; box-shadow: var(--shadow); border-radius: 28px; overflow: hidden; }
.setup-section { display: grid; grid-template-columns: 50px 1fr; gap: 20px; padding: clamp(24px, 5vw, 42px); border-bottom: 1px solid var(--border); }
.section-number { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, #0d7d91, #4a5fd0); font-weight: 900; box-shadow: 0 9px 20px rgba(43,97,178,.22); }
.section-content h2 { margin: 3px 0 8px; font-size: 1.35rem; color: var(--navy-900); }
.section-content > p { margin: 0 0 18px; color: var(--muted); }
.language-select { max-width: 470px; }
.choice-grid { display: grid; gap: 13px; }
.choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice-card { position: relative; min-height: 135px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; border: 1px solid #d9e4eb; border-radius: 18px; background: white; cursor: pointer; transition: .18s ease; }
.choice-card:hover, .choice-chip:hover { border-color: #57a8bd; transform: translateY(-2px); }
.choice-card:has(input:checked), .choice-chip:has(input:checked) { border-color: #1593a1; box-shadow: 0 0 0 3px rgba(21,147,161,.11); background: linear-gradient(180deg, #f3fffd, #f7fbff); }
.choice-card input, .choice-chip input { position: absolute; opacity: 0; pointer-events: none; }
.choice-icon { font-size: 1.5rem; color: #176f91; }
.choice-card strong { font-size: 1.06rem; }.choice-card small { color: var(--muted); }
.choice-chip { position: relative; height: 48px; display: grid; place-items: center; border-radius: 14px; background: white; border: 1px solid #d9e4eb; font-weight: 790; cursor: pointer; transition: .18s ease; }
.toggle-row { margin-top: 24px; display: flex; align-items: center; gap: 13px; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-ui { flex: 0 0 46px; height: 26px; border-radius: 999px; background: #b9c7d1; position: relative; transition: .2s ease; }
.toggle-ui::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: .2s ease; }
.toggle-row input:checked + .toggle-ui { background: #16a497; }.toggle-row input:checked + .toggle-ui::after { transform: translateX(20px); }
.toggle-row > span:last-child { display: grid; gap: 3px; }.toggle-row small { display: block; color: var(--muted); font-weight: 520; }
.setup-footer { padding: 24px clamp(24px, 5vw, 42px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #f8fbfd; }
.setup-footer p { margin: 0; color: var(--muted); font-size: .86rem; }
.wide-alert { max-width: 650px; }

.settings-layout { width: min(760px, calc(100% - 34px)); margin: 0 auto; padding: 46px 0 74px; }
.back-link { color: #327390; font-weight: 800; text-decoration: none; }
.settings-card { background: white; border-radius: 24px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 40px); display: grid; gap: 24px; }
.settings-card fieldset { border: 0; padding: 0; margin: 0; }.settings-card legend { font-weight: 780; margin-bottom: 10px; color: #294158; }
.inline-radios { display: flex; gap: 11px; }.inline-radios label { padding: 12px 17px; border: 1px solid #d6e1e8; border-radius: 12px; background: #f8fbfd; }
.toggle-row.simple { margin: 0; }

.interpreter-page { width: min(980px, calc(100% - 30px)); margin: 0 auto; padding: 30px 0 68px; }
.interpreter-topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.interpreter-topline h1 { margin: 8px 0 0; font-size: clamp(1.7rem, 5vw, 2.65rem); letter-spacing: -.045em; color: var(--navy-950); }
.interpreter-topline h1 span { color: #16909a; font-weight: 500; }
.session-timer { min-width: 78px; padding: 9px 12px; border-radius: 12px; background: white; border: 1px solid var(--border); font-variant-numeric: tabular-nums; text-align: center; font-weight: 850; color: #52697e; }
.interpreter-card { border-radius: 30px; background: linear-gradient(160deg, #0b2845, #071728 72%); color: white; padding: clamp(20px, 5vw, 42px); box-shadow: 0 35px 80px rgba(5,24,43,.26); position: relative; overflow: hidden; }
.interpreter-card::before { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; left: -230px; top: -290px; background: rgba(55,224,215,.11); filter: blur(15px); }
.interpreter-card::after { content: ''; position: absolute; width: 430px; height: 430px; border-radius: 50%; right: -260px; bottom: -270px; background: rgba(103,91,255,.15); filter: blur(15px); }
.interpreter-card > * { position: relative; z-index: 1; }
.speaker-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 13px; align-items: stretch; }
.speaker-panel { min-height: 104px; padding: 17px; border-radius: 18px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.055); color: #9fb3c5; transition: .22s ease; }
.speaker-panel.active { color: white; border-color: rgba(66,232,223,.42); background: linear-gradient(145deg, rgba(66,232,223,.13), rgba(255,255,255,.06)); box-shadow: inset 0 0 24px rgba(66,232,223,.06); }
.speaker-badge { float: right; border-radius: 999px; padding: 5px 8px; background: rgba(66,232,223,.12); color: #72f4eb; text-transform: uppercase; letter-spacing: .08em; font-size: .62rem; font-weight: 900; }.speaker-badge.guest { color: #b7b0ff; background: rgba(135,120,255,.13); }
.speaker-panel small { display: block; margin-bottom: 5px; opacity: .72; }.speaker-panel strong { font-size: 1.16rem; }
.direction-center { align-self: center; color: #56e5dc; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.07); }
.mini-wave { display: flex; gap: 3px; align-items: center; height: 22px; margin-top: 12px; opacity: .35; }.speaker-panel.active .mini-wave { opacity: 1; }
.mini-wave i { width: 3px; height: 7px; border-radius: 5px; background: currentColor; }.speaker-panel.active .mini-wave i { animation: wave .9s ease-in-out infinite; }.mini-wave i:nth-child(2){height:14px;animation-delay:-.1s}.mini-wave i:nth-child(3){height:20px;animation-delay:-.2s}.mini-wave i:nth-child(4){height:12px;animation-delay:-.3s}.mini-wave i:nth-child(5){height:6px;animation-delay:-.4s}
.voice-stage { text-align: center; padding: 48px 0 35px; }
.voice-orb { width: clamp(145px, 28vw, 195px); aspect-ratio: 1; border: 0; border-radius: 50%; color: white; background: radial-gradient(circle at 35% 28%, #4ff4e8 0%, #148aa6 38%, #1a4a9f 70%, #152252 100%); box-shadow: 0 0 0 16px rgba(57,230,218,.055), 0 0 0 34px rgba(57,230,218,.025), 0 25px 55px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.2); position: relative; transition: transform .22s ease, filter .22s ease; }
.voice-orb:hover:not(:disabled) { transform: scale(1.035); filter: brightness(1.08); }.voice-orb:disabled { cursor: default; opacity: 1; }
.orb-icon { font-size: 2.1rem; position: relative; z-index: 2; text-shadow: 0 4px 15px rgba(0,0,0,.3); }
.orb-rings i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); opacity: 0; }
.is-running .orb-rings i { animation: pulse-ring 2.8s ease-out infinite; }.is-running .orb-rings i:nth-child(2){animation-delay:.8s}.is-running .orb-rings i:nth-child(3){animation-delay:1.6s}
.interpreter-card[data-stage="translating"] .voice-orb { animation: orb-breathe 1.05s ease-in-out infinite; }
.status-line { margin-top: 32px; font-size: 1.17rem; font-weight: 850; }.status-detail { margin: 7px auto 0; max-width: 550px; color: #9eb2c4; font-size: .9rem; line-height: 1.5; }
.live-caption { min-height: 102px; padding: 18px 20px; border-radius: 18px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.1); }
.caption-label { color: #5de7df; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 900; margin-bottom: 8px; }.caption-text { font-size: clamp(1.08rem, 3vw, 1.38rem); line-height: 1.45; color: #f7fbff; }
.control-row { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.control-button { min-width: 106px; min-height: 45px; border-radius: 13px; border: 1px solid rgba(255,255,255,.11); color: #c8d8e5; background: rgba(255,255,255,.07); font-weight: 800; }.control-button:hover:not(:disabled) { background: rgba(255,255,255,.12); }.control-button:disabled { opacity: .35; cursor: not-allowed; }.control-button.danger:not(:disabled) { color: #ffb1bc; }.control-button.active { color: white; background: rgba(236,91,112,.2); border-color: rgba(236,91,112,.35); }
.transcript-section { margin-top: 25px; background: rgba(255,255,255,.82); border: 1px solid white; border-radius: 24px; box-shadow: 0 17px 50px rgba(13,43,72,.08); padding: clamp(20px, 4vw, 30px); }
.transcript-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; border-bottom: 1px solid var(--border); padding-bottom: 18px; }.transcript-heading h2 { margin: 0 0 4px; }.transcript-heading p { margin: 0; color: var(--muted); font-size: .86rem; }
.transcript-empty { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 7px; text-align: center; color: var(--muted); }.transcript-empty span { font-size: 2.1rem; }.transcript-empty strong { color: var(--ink); }.transcript-empty p { margin: 0; }
.transcript-list { display: grid; gap: 14px; padding-top: 18px; }.transcript-turn { border-radius: 17px; border: 1px solid #dde7ed; padding: 16px 18px; background: white; }.transcript-turn.from-partner { background: #f5f3ff; border-color: #e3ddff; }
.turn-meta { display: flex; gap: 7px; align-items: center; color: #7790a1; text-transform: uppercase; letter-spacing: .07em; font-size: .64rem; font-weight: 900; }.turn-meta i { font-style: normal; color: #1b9a9f; }.turn-original { color: #66798a; margin-top: 8px; font-size: .9rem; }.turn-translation { margin-top: 7px; font-size: 1.08rem; font-weight: 760; line-height: 1.45; }
.permission-note { margin: 18px auto 0; max-width: 780px; padding: 13px 17px; border-radius: 14px; color: #647789; background: rgba(255,255,255,.55); text-align: center; font-size: .84rem; line-height: 1.5; }

@keyframes wave { 0%,100%{transform:scaleY(.55)}50%{transform:scaleY(1)} }
@keyframes pulse-ring { 0%{transform:scale(.82);opacity:.48}100%{transform:scale(1.6);opacity:0} }
@keyframes orb-breathe { 0%,100%{filter:brightness(1);transform:scale(1)}50%{filter:brightness(1.16);transform:scale(1.035)} }

@media (max-width: 820px) {
    .landing-grid { grid-template-columns: 1fr; text-align: center; padding-top: 42px; }
    .hero-copy > p { margin-inline: auto; }.hero-actions, .trust-row { justify-content: center; }
    .phone-demo { min-height: 590px; }
    .choice-grid.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .site-header { height: 64px; padding-inline: 15px; }.text-link { display: none; }
    .site-footer { flex-direction: column; text-align: center; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
    .landing-grid { width: min(100% - 24px, 1160px); min-height: auto; padding: 38px 0 45px; }.hero-copy h1 { font-size: 3.1rem; }.hero-actions { flex-direction: column; }.hero-actions .button { width: 100%; }
    .phone-demo { border-width: 6px; border-radius: 38px; padding-inline: 18px; min-height: 550px; }.demo-orb { width: 155px; height: 155px; margin-top: 58px; }
    .setup-layout, .settings-layout { width: min(100% - 22px, 980px); padding-top: 28px; }.setup-section { grid-template-columns: 1fr; }.section-number { width: 36px; height: 36px; }.choice-grid.two, .choice-grid.four { grid-template-columns: 1fr 1fr; }.setup-footer { align-items: stretch; flex-direction: column; }.setup-footer .button { width: 100%; }
    .interpreter-page { width: min(100% - 18px, 980px); padding-top: 20px; }.interpreter-topline { align-items: center; }.session-timer { min-width: 67px; }.interpreter-card { border-radius: 23px; padding: 15px; }.speaker-panel { min-height: 95px; padding: 13px; }.speaker-badge { float: none; display: inline-flex; margin-bottom: 8px; }.speaker-panel strong { font-size: 1rem; }.direction-center { width: 26px; height: 26px; font-size: .8rem; }.voice-stage { padding: 40px 0 27px; }.live-caption { min-height: 112px; }.control-button { flex: 1; min-width: 0; padding-inline: 8px; }.transcript-heading { flex-direction: column; }.permission-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}


/* PWA installation */
.interpreter-top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.install-app-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: 13px; border: 1px solid #c9dce4; color: #123b56; background: rgba(255,255,255,.88); box-shadow: 0 8px 22px rgba(15,54,81,.08); font-weight: 850; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.install-app-button:hover { transform: translateY(-1px); background: white; box-shadow: 0 12px 26px rgba(15,54,81,.13); }
.install-app-button span:first-child { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: white; background: linear-gradient(145deg, #168f9c, #223c80); font-size: 1rem; line-height: 1; }
.install-modal[hidden] { display: none; }
.install-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; opacity: 0; transition: opacity .18s ease; }
.install-modal.open { opacity: 1; }
.install-modal-backdrop { position: absolute; inset: 0; background: rgba(3,16,28,.68); backdrop-filter: blur(8px); }
.install-dialog { width: min(440px, 100%); position: relative; z-index: 1; padding: 30px; border-radius: 28px; background: #fff; box-shadow: 0 34px 100px rgba(0,0,0,.32); text-align: center; transform: translateY(16px) scale(.98); transition: transform .18s ease; }
.install-modal.open .install-dialog { transform: translateY(0) scale(1); }
.install-close { position: absolute; top: 12px; right: 13px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef4f7; color: #526b7c; font-size: 1.45rem; }
.install-icon { width: 82px; height: 82px; margin: 0 auto 17px; border-radius: 24px; overflow: hidden; box-shadow: 0 15px 34px rgba(24,68,101,.22); }
.install-icon img { width: 100%; height: 100%; display: block; }
.install-dialog h2 { margin: 8px 0 10px; color: var(--navy-950); font-size: clamp(1.55rem, 6vw, 2rem); letter-spacing: -.035em; }
.install-dialog > p { margin: 0 auto; max-width: 350px; color: var(--muted); line-height: 1.55; }
.install-instructions { margin: 20px 0; padding: 15px 16px; border-radius: 15px; background: #eef8f8; border: 1px solid #d2ecec; color: #35576a; font-size: .9rem; line-height: 1.5; text-align: left; transition: box-shadow .2s ease, transform .2s ease; }
.install-instructions.attention { box-shadow: 0 0 0 4px rgba(24,154,159,.16); transform: scale(1.015); }
.install-dialog-actions { display: grid; gap: 9px; }
.install-dialog > small { display: block; margin-top: 15px; color: #8293a0; line-height: 1.4; }
@media (max-width: 620px) {
    .interpreter-topline { align-items: flex-start; }
    .interpreter-top-actions { flex-direction: column-reverse; align-items: flex-end; }
    .install-app-button { min-height: 38px; padding: 8px 10px; font-size: .78rem; }
    .install-app-button span:first-child { width: 19px; height: 19px; }
    .install-dialog { padding: 27px 21px 23px; border-radius: 24px; }
}
@media (display-mode: standalone) {
    .install-app-button { display: none !important; }
}
.install-app-button[hidden] { display: none !important; }
.install-decline { min-height: 42px; border: 0; background: transparent; color: #7a4650; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.install-decline:hover { color: #a12f45; }
.install-decline:disabled { opacity: .6; cursor: wait; }

/* BridgeTalk voice safety and persistent controls — v1.3.0 */
.session-control-dock {
    position: sticky;
    top: 86px;
    z-index: 26;
    margin-top: 14px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(7, 23, 40, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 16px 42px rgba(5, 24, 43, .24);
    backdrop-filter: blur(16px);
}
.session-control-dock .control-row { margin-top: 0; flex-wrap: nowrap; }
.session-control-dock .control-button { flex: 1 1 0; min-width: 0; }
.session-control-dock .start-control:not(:disabled) { color: #bffcf6; border-color: rgba(66, 232, 223, .25); }
.session-notice {
    margin-bottom: 9px;
    padding: 9px 12px;
    border-radius: 11px;
    text-align: center;
    font-size: .82rem;
    line-height: 1.35;
    font-weight: 800;
    color: #fff2c5;
    background: rgba(217, 151, 30, .18);
    border: 1px solid rgba(255, 207, 91, .28);
}
.session-notice[hidden] { display: none !important; }
.session-notice[data-type="info"] { color: #d8fbff; background: rgba(49, 163, 179, .18); border-color: rgba(66, 232, 223, .24); }
.transcript-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.clear-transcript-button {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #d5e1e8;
    color: #50697c;
    background: rgba(255, 255, 255, .9);
    font-size: .78rem;
    font-weight: 850;
}
.clear-transcript-button:hover { background: #fff; }
.transcript-section,
.transcript-list,
.transcript-turn { overflow-anchor: none; }

@media (max-width: 560px) {
    .interpreter-page {
        padding-bottom: calc(126px + env(safe-area-inset-bottom));
    }
    .session-control-dock {
        position: fixed;
        top: auto;
        left: 9px;
        right: 9px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 60;
        margin: 0;
        border-radius: 17px;
        padding: 9px;
    }
    .session-control-dock .control-row { gap: 7px; }
    .session-control-dock .control-button {
        min-height: 48px;
        padding-inline: 7px;
        font-size: .86rem;
    }
    .transcript-heading { align-items: stretch; }
    .transcript-actions { justify-content: space-between; width: 100%; }
    body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
}
