/* Languu interactive prototype. Tokens come straight from the Figma file (Final Design, 23-4-2026) */
:root {
  --p500: #3D02BE;
  --p300: #A08AE8;
  --p200: #CBBDF3;
  --p100: #E6DFFA;
  --p50: #F5F2FD;
  --logo: #3D02BE;
  --p600: #300197;
  --max: 1312px;
  --gutter-x: max(var(--pad-x), calc((100% - var(--max)) / 2));
  --white: #FFFFFF;
  --border: #E4E4E7;
  --subtle: #F2F2F3;
  --light-gray: #6B6B75; /* AA on white and on the gray panels */
  --gray: #52525B;
  --charcoal: #18181B;
  --rich-black: #0A0A0A;
  --danger: #EF4444;
  --footer: #2A2A2A;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad-x: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--charcoal); background: var(--white); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--p500); outline-offset: 2px; }
.m-show { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icons from the Figma file, used as masks so one asset can take any color */
.ic { display: inline-block; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.flag { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px var(--gutter-x); border-bottom: 1px solid transparent; transition: border-color .2s; }
.brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.logo { display: block; width: 108px; height: 20px; flex: none; }
.logo img { width: 108px; height: 20px; }
.divider { width: 1px; height: 51px; background: var(--border); flex: none; }
.nav { display: flex; gap: 16px; align-items: center; }
.nav button { height: 40px; padding: 0 16px; font-size: 14px; font-weight: 500; color: var(--gray); border-radius: 8px; white-space: nowrap; transition: background .2s, color .2s, border-radius .2s; }
.nav button:hover { color: var(--p500); background: var(--p50); border-radius: 8px 8px 8px 0; }
.nav button[aria-current="page"]:hover { color: #fff; background: var(--p600); }
.nav button[aria-current="page"] { background: var(--p500); color: var(--white); border-radius: 8px 8px 8px 0; }
.btn-login { width: 100px; flex: none; padding: 10px 16px; border: 1.5px solid var(--p500); border-radius: 8px; color: var(--p500); font-size: 14px; font-weight: 500; line-height: 20px; transition: background .2s; }
.btn-login:hover { background: var(--p50); }
.me { display: flex; align-items: center; gap: 10px; position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 500; }
.me-btn .av { width: 32px; height: 32px; border-radius: 50%; background: var(--p500); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.me-btn small { display: block; color: var(--light-gray); font-size: 12px; font-weight: 400; line-height: 1.1; }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.08); padding: 6px; min-width: 160px; }
.me-menu button { width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.me-menu button:hover { background: var(--subtle); }
.burger { display: none; width: 24px; height: 24px; flex: none; }
.burger span { display: block; width: 18px; height: 1.6px; background: var(--charcoal); margin: 4px auto; border-radius: 2px; }

/* Mobile menu */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,10,.35); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; inset: 0 auto 0 0; width: min(320px, 86%); background: #fff; padding: 24px 20px; transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; gap: 6px; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer-panel .navm { display: block; width: 100%; text-align: left; padding: 14px 16px; border-radius: 10px; font-size: 16px; font-weight: 500; color: var(--gray); }
.drawer-panel .navm[aria-current="page"] { background: var(--p500); color: #fff; }
.x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--gray); }
.x:hover { background: var(--subtle); }

/* ---------- Page shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 20px; padding: 4px var(--gutter-x) 0; align-items: start; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 24px; padding: 16px; }
.work { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin: 8px 0 0; color: var(--rich-black); }
.label { font-size: 14px; color: var(--charcoal); margin: 0 0 8px; }
.h-section { font-size: 20px; font-weight: 600; margin: 4px 0 0; color: var(--rich-black); letter-spacing: -.2px; }

/* Rail */
.rail { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 90px; }
.card.rail { border: 0; padding: 0; border-radius: 0; background: transparent; }
.tip { background: var(--subtle); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 16px; letter-spacing: -.5px; }
.tip b { display: block; font-size: 14px; font-weight: 600; color: var(--rich-black); margin-bottom: 8px; }
.tip span { font-size: 14px; color: var(--charcoal); }
.tip p { margin: 0; font-size: 14px; line-height: 23px; color: var(--gray); }
.tip .more { color: #000; text-decoration: underline; font-size: 14px; letter-spacing: -.5px; }
.tip p.open-more { display: block; }

/* ---------- Mode tabs ---------- */
.tabs { position: relative; align-self: center; display: flex; gap: 5px; border: 1px solid var(--border); border-radius: 12px; padding: 5px; max-width: 100%; background: #fff; }
.tab-ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: 0; border-radius: 8px; background: var(--p500); transition: transform .38s cubic-bezier(.3,.9,.25,1), width .38s cubic-bezier(.3,.9,.25,1); }
.tabs button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--gray); white-space: nowrap; transition: color .3s .05s, background .2s; }
.tabs button:not([aria-selected="true"]):hover { color: var(--rich-black); background: var(--subtle); }
.tabs button[aria-selected="true"] { color: var(--white); }
.tabs button .pipe { opacity: .7; margin: 0 1px; }

/* ---------- Language row ---------- */
.lang-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: 16px; min-height: 44px; }
.lang-row .l { grid-column: 1; grid-row: 1; }
.lang-row .r { grid-column: 2; grid-row: 1; }
.lang-row > .swap { grid-column: 1; grid-row: 1; justify-self: end; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 10px; height: 43px; padding: 8px 12px; border-radius: 8px; background: var(--subtle); font-size: 16px; color: #000; white-space: nowrap; transition: background .2s; }
.dd-btn:hover { background: #e9e9eb; }
.dd-btn.auto { color: var(--p500); font-weight: 500; }
.dd-btn .ic.chev { width: 11px; height: 7px; --m: url(assets/chev.svg); margin-left: 2px; }
.dd-btn.field { width: 100%; height: 48px; background: #fff; border: 1px solid var(--border); justify-content: flex-start; padding: 0 16px; font-size: 14px; color: var(--charcoal); }
.dd-btn.field:hover { border-color: var(--p300); }
.dd-btn.field .ic.chev { margin-left: auto; width: 14px; height: 8px; }
.dd-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-height: 400px; overflow: auto; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 34px rgba(17,12,46,.14); display: flex; flex-direction: column; gap: 4px; }
.dd-menu.right { left: auto; right: 0; }
.dd-menu button { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 12px; border-radius: 8px; font-size: 14px; text-align: left; min-width: 150px; }
.dd-menu button:hover { background: var(--subtle); }
.dd-menu button[aria-selected="true"] { background: var(--rich-black); color: #fff; }
.dd-menu button.auto { color: var(--p500); font-weight: 500; justify-content: flex-start; gap: 8px; }
.circle-btn { width: 44px; height: 44px; border-radius: 42px; background: var(--p500); color: #fff; display: grid; place-items: center; flex: none; transition: transform .25s, background .2s; }
.circle-btn:hover { background: var(--p600); }
.circle-btn:active { transform: scale(.94); }
.circle-btn .ic { width: 24px; height: 24px; }
.circle-btn.swap .ic { transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.circle-btn[aria-disabled="true"] { background: var(--p100); color: var(--p500); cursor: help; }
.circle-btn[aria-disabled="true"]:hover { background: var(--p100); }

/* ---------- Text panels ---------- */
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pane { position: relative; border: 1px solid var(--border); border-radius: 16px; background: #fff; min-height: 320px; display: flex; flex-direction: column; transition: border-color .2s; }
.pane:focus-within { border-color: var(--p500); }
.pane textarea { flex: 1; width: 100%; border: 0; resize: none; padding: 18px 48px 40px 18px; font-size: 16px; line-height: 23px; color: var(--charcoal); background: transparent; outline: none; border-radius: 16px; min-height: 300px; }
.pane textarea::placeholder { color: var(--light-gray); }
.pane .count { position: absolute; right: 16px; bottom: 12px; font-size: 12px; color: var(--light-gray); }
.pane .clear { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; color: var(--gray); display: grid; place-items: center; font-size: 18px; }
.pane .clear:hover { background: var(--subtle); }
.pane.out { padding: 19px; gap: 12px; }
.out-box { flex: 1; background: var(--subtle); border-radius: 10px; padding: 12px 16px; font-size: 16px; line-height: 23px; color: var(--charcoal); white-space: pre-wrap; overflow: auto; }
.out-box.empty { color: var(--light-gray); }
.out-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.out-row > :last-child:not(:first-child) { margin-left: auto; }
.out-row .btn-out + .btn-out { margin-left: 0; }
.btn-out { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1.5px solid var(--p500); border-radius: 8px; color: var(--p500); font-size: 12px; font-weight: 500; transition: background .2s; }
.btn-out:hover { background: var(--p50); }
.btn-out .ic { width: 18px; height: 18px; }
.ts { color: var(--p300); }

/* Loading + error */
.loading { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; color: var(--gray); font-size: 14px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--p100); border-top-color: var(--p500); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { color: var(--p500); font-weight: 500; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Dropzone ---------- */
.drop { border: 1.5px dashed var(--p300); border-radius: 16px; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; background-image: none; transition: background .2s, border-color .2s; }
.drop.over { background: var(--p50); border-color: var(--p500); }
.drop .cloud { width: 48px; height: 48px; color: var(--p300); }
.drop h3, .drop h2 { margin: 8px 0 0; font-size: 18px; font-weight: 500; color: var(--charcoal); letter-spacing: -.3px; }
.drop .or { font-size: 14px; color: var(--charcoal); }
.drop .fine { font-size: 13px; color: var(--light-gray); margin-top: 4px; }
.drop .acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-up { display: inline-flex; align-items: center; gap: 16px; height: 36px; padding: 0 12px; border: 1.5px solid var(--p500); border-radius: 8px; color: var(--p500); font-size: 14px; font-weight: 500; transition: background .2s; }
.btn-up:hover { background: var(--p50); }
.btn-up .ic { width: 16px; height: 16px; }
.btn-ghost-sm { height: 36px; padding: 0 12px; border-radius: 8px; color: var(--gray); font-size: 14px; font-weight: 500; }
.btn-ghost-sm:hover { background: var(--subtle); color: var(--p500); }
.file-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--subtle); font-size: 14px; }
.file-chip b { font-weight: 500; }
.file-chip small { color: var(--light-gray); }
.file-chip .x { margin-left: auto; width: 28px; height: 28px; font-size: 18px; }

/* ---------- Buttons ---------- */
.actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; height: 48px; padding: 12px; border-radius: 8px; background: var(--p500); color: #fff; font-size: 16px; font-weight: 500; line-height: 24px; transition: background .2s, transform .2s; white-space: nowrap; }
.btn-primary:hover { background: var(--p600); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: var(--p300); color: var(--p100); cursor: not-allowed; transform: none; }
.btn-primary .ic { width: 18px; height: 18px; }
.btn-outline { display: inline-flex; align-items: center; gap: 24px; height: 48px; padding: 12px; border-radius: 8px; border: 1.5px solid var(--p500); color: var(--p500); font-size: 16px; font-weight: 500; white-space: nowrap; transition: background .2s; }
.btn-outline:hover { background: var(--p50); }
.btn-outline:disabled { opacity: .5; cursor: not-allowed; }
.btn-danger { height: 48px; padding: 0 24px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 16px; font-weight: 500; }
.btn-danger:hover { background: #dc2626; }
.btn-square { width: 48px; height: 48px; border-radius: 8px; border: 1.5px solid var(--p500); color: var(--p500); display: grid; place-items: center; }
.btn-square.on { background: var(--p500); color: #fff; }
.btn-square .ic { width: 18px; height: 22px; }

/* Switch */
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--p100); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: transform .2s; }
.switch input:checked + i { background: var(--p500); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--p500); outline-offset: 2px; }
.switch.sm { width: 34px; height: 19px; }
.switch.sm i::after { width: 13px; height: 13px; }
.switch.sm input:checked + i::after { transform: translateX(15px); }

.human { display: flex; align-items: center; gap: 14px; }
.human b { display: block; font-size: 18px; font-weight: 500; color: var(--charcoal); letter-spacing: -.3px; }
.human span { font-size: 16px; color: var(--gray); }
.review { background: var(--p50); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.review .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; }
.review small { font-size: 10px; color: var(--charcoal); }
.review select { height: 30px; border: 0; border-radius: 6px; background: #fff; padding: 0 8px; font-size: 14px; }

/* ---------- Audio player ---------- */
.media { display: flex; flex-direction: column; gap: 16px; border: 1.5px dashed var(--p300); border-radius: 16px; padding: 20px; }
.wave { display: flex; align-items: center; gap: 3px; height: 160px; }
.wave i { flex: 1; min-width: 2px; max-width: 4px; border-radius: 4px; background: var(--p200); transition: background .15s; }
.wave i.on { background: var(--p500); }
.wave.slim { height: 44px; gap: 2px; }
.wave.slim i { max-width: 3px; }
.wave.live i { animation: bounce 1s ease-in-out infinite; }
@keyframes bounce { 50% { transform: scaleY(.35); } }
.scrub { display: flex; align-items: center; gap: 16px; font-size: 16px; color: var(--charcoal); }
.scrub .end { color: var(--p500); }
.bar { flex: 1; height: 8px; border-radius: 8px; background: #E4E4E7; position: relative; cursor: pointer; }
.bar b { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--p500); border-radius: 8px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 36px; color: var(--charcoal); }
.controls button { display: grid; place-items: center; }
.controls .pp { width: 30px; height: 30px; border-radius: 50%; border: 1.6px solid currentColor; }
.controls .pp .ic { width: 10px; height: 12px; }
.controls .speed { font-size: 15px; font-weight: 500; min-width: 28px; }
.media video { width: 100%; max-height: 260px; border-radius: 10px; background: #000; object-fit: contain; }

/* ---------- Conversation panels (Transcribe, AI) ---------- */
.talk { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.talk.one { grid-template-columns: 1fr; }
.bubble { background: var(--subtle); border-radius: 16px; padding: 16px; min-height: 230px; display: flex; flex-direction: column; gap: 16px; }
.who { display: flex; align-items: center; gap: 8px; }
.who img { width: 40px; height: 40px; }
.who b { display: block; font-size: 18px; font-weight: 500; color: var(--rich-black); letter-spacing: -.3px; line-height: 1.2; }
.who small { font-size: 14px; color: var(--light-gray); }
.bubble .txt { flex: 1; padding: 0 16px; font-size: 16px; line-height: 26px; color: var(--charcoal); }
.bubble .txt p { margin: 0 0 12px; }
.bubble .txt .ph { color: var(--light-gray); }
.bubble .txt .typing::after { content: '▍'; color: var(--p500); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.speak { align-self: flex-start; margin-left: 16px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--p500); }
.speak:hover { background: #fff; }
.speak.playing { background: var(--p500); color: #fff; }
.speak .ic { width: 16px; height: 14px; }
.recorder { display: flex; align-items: center; gap: 16px; }
.recorder .wave { flex: 1; min-width: 0; justify-content: space-between; }
.recorder .wave i { max-width: none; flex: 0 0 3px; }
.rec-btn { width: 38px; height: 38px; border-radius: 8px; background: var(--p500); color: #fff; display: grid; place-items: center; flex: none; }
.rec-btn .ic { width: 12px; height: 16px; }
.icon-sq { width: 28px; height: 28px; border-radius: 6px; border: 1.5px solid #000; display: grid; place-items: center; flex: none; }
.icon-sq .ic { width: 12px; height: 15px; }
.listening { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.listening .eq { display: flex; gap: 3px; align-items: center; height: 24px; }
.listening .eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--p500); animation: bounce .9s ease-in-out infinite; }
.listening .eq i:nth-child(2) { animation-delay: .15s; background: var(--p300); }
.listening .eq i:nth-child(3) { animation-delay: .3s; }
.listening .eq i:nth-child(4) { animation-delay: .45s; background: var(--p300); }
.listening.idle .eq i { animation: none; height: 40%; }
.pair { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: end; gap: 24px; }
.pair > .swap { position: absolute; z-index: 2; left: 50%; bottom: 2px; transform: translateX(-50%); box-shadow: 0 0 0 5px #fff; }
.pair > div:first-child .dd-btn.field { padding-right: 40px; }
.pair > div:last-child .dd-btn.field { padding-left: 34px; }
.pair .dd-btn.field { font-size: 16px; }

/* ---------- Captioning ---------- */
.chips { display: flex; gap: 24px; flex-wrap: wrap; }
.chip-fmt { width: 80px; height: 50px; border-radius: 34px; border: 1.5px solid var(--border); font-size: 16px; font-weight: 500; color: var(--charcoal); transition: all .2s; }
.chip-fmt:hover { border-color: var(--p300); }
.chip-fmt[aria-pressed="true"] { border-color: var(--p500); background: var(--p50); color: var(--p500); border-width: 2px; }
.box { border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }
.swatches { display: flex; gap: 10px; }
.swatches button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid transparent; transition: transform .15s; }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--p500); outline-offset: 2px; }
.radios { display: flex; gap: 20px; align-items: center; height: 40px; flex-wrap: wrap; }
.radios label { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; cursor: pointer; }
.radios input { appearance: none; width: 16px; height: 16px; margin: 0; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; cursor: pointer; }
.radios input:checked { border-color: var(--p500); }
.radios input:checked::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--p500); }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: radial-gradient(120% 90% at 20% 10%, #3b3b52 0%, #17171f 60%); }
.screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.screen .scene { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.18); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.cap { position: absolute; left: 50%; transform: translateX(-50%); max-width: 86%; text-align: center; padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,.55); font-weight: 600; line-height: 1.3; transition: all .2s; }
.cap.bottom { bottom: 8%; }
.cap.top { top: 8%; }
.cap.center { top: 50%; transform: translate(-50%, -50%); }
.cues { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.cue { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 12px; border-radius: 8px; background: var(--subtle); font-size: 14px; }
.cue time { color: var(--p500); font-variant-numeric: tabular-nums; }
.cue.on { background: var(--p50); box-shadow: inset 3px 0 0 var(--p500); }

/* ---------- Text to speech ---------- */
.studio { position: relative; }
.studio textarea { width: 100%; min-height: 150px; resize: vertical; border: 1.5px solid var(--border); border-radius: 16px; padding: 16px; font-size: 16px; line-height: 24px; outline: none; transition: border-color .2s; }
.studio textarea:focus { border-color: var(--p500); }
.studio textarea::placeholder { color: var(--light-gray); }
.studio .count { text-align: right; font-size: 14px; color: var(--light-gray); margin-top: 8px; }
.banner { background: var(--p50); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.banner b { display: block; font-size: 16px; font-weight: 500; color: var(--rich-black); }
.banner span { font-size: 14px; color: var(--gray); }
.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.voice { position: relative; text-align: left; border: 1.5px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color .2s, background .2s; cursor: pointer; }
.voice:hover { border-color: var(--p300); }
.voice[data-on="true"] { border-color: var(--p500); background: #fbfaff; }
.vpick { position: absolute; inset: 0; border-radius: 16px; }
.vpick:focus-visible { outline: 2px solid var(--p500); outline-offset: 2px; }
.voice .play { position: relative; z-index: 1; }
.voice b { font-size: 20px; font-weight: 500; color: var(--charcoal); letter-spacing: -.3px; }
.voice small { font-size: 16px; color: var(--light-gray); }
.voice .radio { position: absolute; top: 16px; right: 16px; width: 16px; height: 16px; }
.voice .play { display: inline-flex; align-items: center; gap: 10px; color: var(--p500); font-size: 14px; font-weight: 500; margin-top: 8px; width: fit-content; }
.voice .play .ic { width: 12px; height: 14px; }
.player { display: flex; align-items: center; gap: 14px; border-radius: 14px; background: var(--p50); padding: 12px 16px; }
.player .pbtn { width: 40px; height: 40px; border-radius: 50%; background: var(--p500); color: #fff; display: grid; place-items: center; flex: none; }
.player .pbtn .ic { width: 12px; height: 14px; }
.player .meta { font-size: 13px; color: var(--gray); white-space: nowrap; }

/* ---------- Trust + footer ---------- */
.trust { padding: 72px var(--gutter-x) 88px; display: flex; flex-direction: column; align-items: center; gap: 60px; }
.badges { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.badges li { display: flex; align-items: center; gap: 12px; padding: 14px 20px 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.badges span { display: flex; flex-direction: column; font-size: 13px; color: var(--gray); line-height: 1.3; }
.badges b { font-size: 15px; font-weight: 600; color: var(--rich-black); letter-spacing: -.2px; }
.trust h2 { margin: 0; text-align: center; font-size: 24px; line-height: 36px; font-weight: 500; letter-spacing: -.5px; color: #000; }
.trust h2 em { font-style: normal; color: var(--p500); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.stat { background: var(--subtle); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.stat b { font-size: 24px; font-weight: 600; letter-spacing: -.5px; color: #000; }
.stat span { font-size: 20px; color: var(--light-gray); }
.foot { background: var(--footer); color: #fff; padding: 48px var(--gutter-x); display: flex; align-items: flex-start; justify-content: space-between; gap: 64px; }
.foot .logo-w { width: 129px; height: 24px; flex: none; }
.foot nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 48px; flex: 0 1 880px; }
.foot h4, .foot h2.fh { margin: 0 0 16px; font-size: 16px; font-weight: 600; line-height: 24px; letter-spacing: -.5px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot li { font-size: 14px; line-height: 20px; color: #E4E4E7; letter-spacing: -.5px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; background: #F1EFFC; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(662px, 100%); background: #fff; border: 1px solid #8C6BFF; border-radius: 24px; padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.auth-card .back { width: 24px; height: 24px; display: grid; place-items: center; color: #000; }
.auth-card .back .ic { width: 20px; height: 17px; }
.auth-card h1 { margin: 16px 0 0; font-size: 32px; font-weight: 600; letter-spacing: -.6px; color: var(--rich-black); line-height: 1.15; }
.auth-card .sub { margin: -10px 0 8px; font-size: 16px; color: var(--gray); }
.fld { display: flex; flex-direction: column; gap: 12px; }
.fld label { font-size: 16px; font-weight: 500; color: var(--charcoal); }
.input { position: relative; }
.input input { width: 100%; height: 60px; border: 1px solid var(--border); border-radius: 8px; padding: 0 52px 0 10px; font-size: 16px; outline: none; transition: border-color .2s; }
.input input::placeholder { color: var(--light-gray); }
.input input:focus { border-color: var(--p500); }
.input.err input { border-color: var(--danger); }
.input .eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; color: #000; border-radius: 6px; }
.input .eye .ic { width: 22px; height: 20px; }
.input .eye.on::after { content: ''; position: absolute; width: 24px; height: 1.6px; background: #000; transform: rotate(-40deg); }
.err-msg { font-size: 13px; color: var(--danger); margin-top: -6px; }
.remember { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.remember label { display: flex; align-items: center; gap: 10px; color: var(--gray); cursor: pointer; }
.remember input { appearance: none; width: 18px; height: 18px; margin: 0; border: 1.2px solid var(--gray); border-radius: 5px; display: grid; place-items: center; cursor: pointer; }
.remember input:checked { background: var(--p500); border-color: var(--p500); }
.remember input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.remember a { color: var(--p500); text-underline-offset: 3px; }
.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 10px; margin-top: 8px; }
.socials button { height: 60px; border-radius: 8px; background: var(--subtle); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 500; color: var(--charcoal); transition: background .2s; }
.socials button:hover { background: #e8e8ea; }
.socials img { width: 20px; height: 20px; object-fit: contain; }
.btn-block { width: 100%; height: 48px; border-radius: 8px; background: var(--p500); color: #fff; font-size: 16px; font-weight: 500; margin-top: 10px; display: grid; place-items: center; transition: background .2s; }
.btn-block:hover { background: var(--p600); }
.role { display: flex; align-items: center; gap: 28px; padding: 32px 44px; border-radius: 4px; background: var(--subtle); border: 1px solid transparent; text-align: left; width: 100%; transition: all .2s; }
.role:hover { border-color: var(--p300); }
.role[aria-checked="true"] { background: #F6F3FF; border-color: var(--p500); }
.role[aria-checked="true"] b { color: var(--p500); }
.role .glyph { width: 44px; height: 56px; display: grid; place-items: center; flex: none; }
.role b { display: block; font-size: 20px; font-weight: 600; color: var(--rich-black); letter-spacing: -.3px; }
.role span { font-size: 14px; color: var(--gray); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--rich-black); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 80; max-width: calc(100% - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.fade { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
  :root { --pad-x: 32px; }
  .nav { gap: 2px; }
  .nav button { padding: 0 12px; }
}
@media (max-width: 1180px) {
  .nav, .divider { display: none; }
  .burger { display: block; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; display: grid; grid-template-columns: repeat(3, 1fr); }
  .foot { flex-direction: column; align-items: flex-start; gap: 32px; padding: 40px 32px; }
  .foot nav { grid-template-columns: repeat(2, 1fr); row-gap: 32px; width: 100%; }
}
@media (max-width: 760px) {
  :root { --pad-x: 20px; }
  .top { padding: 16px 20px; }
  .brand { gap: 12px; }
  .btn-login { width: auto; padding: 6px 20px; font-size: 13px; }
  .shell { padding: 0 16px; }
  .work.card { padding: 16px; border-radius: 24px; }
  .tabs { align-self: stretch; }
  .lang-row { grid-template-columns: auto 44px auto; justify-content: space-between; column-gap: 6px; }
  .lang-row > .swap { position: static; transform: none; grid-column: 2; grid-row: 1; }
  .lang-row .r { grid-column: 3; justify-self: end; }
  .lang-row .dd-btn { max-width: 100%; }
  .dd-btn { padding: 8px; gap: 6px; font-size: 15px; }
  .panes, .talk, .grid2 { grid-template-columns: 1fr; }
  .pane { min-height: 200px; }
  .pane textarea { min-height: 180px; }
  .rail { grid-template-columns: 1fr; }
  .voices { grid-template-columns: 1fr 1fr; gap: 12px; }
  .voice b { font-size: 17px; }
  .voice small { font-size: 13px; }
  .chips { gap: 12px; }
  .chip-fmt { width: 60px; height: 40px; font-size: 14px; }
  .pair { grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); gap: 8px; }
  .pair > .swap { position: static; transform: none; }
  .pair .label { font-size: 13px; }
  .pair .dd-btn.field { padding: 0 10px; gap: 8px; }
  .pair .dd-btn.field .ic.chev { display: none; }
  .wave { height: 110px; }
  .controls { gap: 26px; }
  .actions .btn-primary, .actions .btn-outline { flex: 1 1 auto; }
  .human b { font-size: 16px; }
  .human span { font-size: 13px; }
  .trust { padding: 48px 20px 56px; gap: 36px; }
  .badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .badges li { padding: 12px; gap: 10px; }
  .badges b { font-size: 14px; }
  .badges span { font-size: 12px; }
  .trust h2 { font-size: 19px; line-height: 28px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 16px; gap: 8px; }
  .stat b { font-size: 20px; }
  .stat span { font-size: 15px; }
  .foot { padding: 32px 20px; }
  .auth-card { padding: 24px 20px; border-radius: 20px; }
  .auth-card h1 { font-size: 26px; }
  .role { padding: 22px 18px; gap: 18px; }
  .role b { font-size: 17px; }
  .socials button { height: 52px; font-size: 15px; }
  .input input { height: 52px; }
  .bubble { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.select { width: 100%; height: 48px; border: 1px solid var(--border); border-radius: 8px; padding: 0 44px 0 16px; font-size: 16px; color: var(--charcoal); background: #fff url(assets/chev.svg) right 18px center / 13px 7px no-repeat; -webkit-appearance: none; appearance: none; cursor: pointer; transition: border-color .2s; }
.select:hover { border-color: var(--p300); }
.select:focus { border-color: var(--p500); outline: none; }

.panes > *, .talk > *, .pair > *, .grid2 > * { min-width: 0; }
.dd-btn .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dd-btn .short { display: none; }
@media (max-width: 760px) {
  .dd-btn .long { display: none; }
  .dd-btn .short { display: inline; }
  .media { padding: 14px; }
}
.wave { overflow: hidden; }
@media (max-width: 760px) { .media .wave { gap: 2px; } .media .wave i { min-width: 1.5px; } }

.dd-menu button.auto[aria-selected="true"] { background: var(--p50); color: var(--p500); }
@media (max-width: 760px) {
  .m-hide { display: none; }
  .m-show { display: inline; }
  .tabs { justify-content: space-between; }
  .tabs button { flex: 1 1 auto; padding: 0 10px; gap: 6px; }
}

/* Option card (human translation) */
.opt { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color .2s, background .2s; min-width: 0; }
.opt:hover { border-color: var(--p300); }
.opt.on { border-color: var(--p500); background: var(--p50); }
.opt-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--subtle); color: var(--gray); transition: background .2s, color .2s; }
.opt.on .opt-ic { background: var(--p500); color: #fff; }
.opt-t { display: flex; flex-direction: column; min-width: 0; margin-right: 6px; }
.opt-t b { font-size: 15px; font-weight: 600; color: var(--rich-black); letter-spacing: -.2px; }
.opt-t small { font-size: 13px; color: var(--gray); }
.opt .switch { margin-left: auto; }
.top.scrolled { box-shadow: 0 1px 0 var(--border); }
@media (max-width: 760px) { .opt { flex: 1 1 100%; } .opt-t small { white-space: normal; } }

/* Switching modes: content settles in */
.mode-body { display: flex; flex-direction: column; gap: 16px; }
.mode-body.enter, .talk.enter { animation: settle .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } }
.rec-area { display: flex; flex-direction: column; gap: 16px; }

.actions .btns { display: flex; gap: 12px; flex-wrap: wrap; }
.opt-t small.turn { display: flex; align-items: center; gap: 6px; }
.opt-t select { height: 24px; border: 0; border-radius: 6px; padding: 0 22px 0 8px; font: 500 13px/1 var(--font); color: var(--p500); background: #fff url(assets/chev.svg) right 7px center / 9px 5px no-repeat; -webkit-appearance: none; appearance: none; cursor: pointer; box-shadow: inset 0 0 0 1px var(--p200); }
@media (max-width: 760px) { .actions .btns { width: 100%; } .actions .btns > * { flex: 1 1 100%; justify-content: space-between; } }

/* Output panel: one soft fill, no box inside a box (input white, output gray) */
.pane.out { background: var(--subtle); border-color: transparent; padding: 18px 18px 14px; gap: 14px; }
.pane.out:focus-within { border-color: transparent; }
.pane.out .out-box { background: none; border-radius: 0; padding: 0; overflow: visible; }
.pane.out .out-box.empty { color: var(--light-gray); }
.pane.out .btn-out { background: #fff; border-color: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--p500); }
.pane.out .btn-out:hover { box-shadow: inset 0 0 0 1px var(--p300); background: #fff; }
.pane.out .loading { color: var(--gray); }
.pane.out .loading .spinner { border-color: var(--p100); border-top-color: var(--p500); }
.pane .clear { background: none; }

/* ---------- Type scale ----------
   Controls 14/500 · Content 16/400 · Meta 12–13 · Primary action 15/500
   Controls that share a row share a 40px height */
.dd-btn { height: 40px; font-size: 14px; font-weight: 500; padding: 0 12px; gap: 8px; }
.dd-btn .flag { width: 15px; height: 15px; }
.dd-btn.field { height: 44px; font-size: 14px; font-weight: 500; }
.pair .dd-btn.field { font-size: 14px; }
.circle-btn { width: 40px; height: 40px; }
.circle-btn .ic { width: 20px !important; height: 20px !important; }
.lang-row { min-height: 40px; }
.dd-menu button { font-size: 14px; }
.btn-primary, .btn-outline { height: 44px; padding: 0 16px; gap: 16px; font-size: 15px; font-weight: 500; }
.btn-danger { height: 44px; font-size: 15px; }
.btn-square { width: 44px; height: 44px; }
.btn-out { height: 32px; font-size: 13px; font-weight: 500; }
.btn-up, .btn-ghost-sm { font-size: 14px; }
.label, .pair .label { font-size: 13px; font-weight: 500; color: var(--gray); }
.studio .label { font-size: 13px !important; }
.drop h3, .drop h2 { font-size: 16px; font-weight: 500; }
.drop .or { font-size: 13px; color: var(--gray); }
.drop .fine { font-size: 12px; }
.chip-fmt { width: auto; min-width: 64px; height: 40px; padding: 0 18px; font-size: 14px; border-radius: 999px; }
.chips { gap: 8px; }
.radios label { font-size: 14px; }
.select { height: 44px; font-size: 14px; font-weight: 500; }
.opt-t b { font-size: 14px; font-weight: 600; }
.opt-t small { font-size: 12px; }
.who b { font-size: 15px; font-weight: 600; }
.who small { font-size: 12px; }
.who img { width: 36px; height: 36px; }
.voice b { font-size: 16px; font-weight: 600; }
.voice small { font-size: 13px; }
.voice .play { font-size: 13px; }
.banner b { font-size: 14px; font-weight: 600; }
.banner span { font-size: 13px; }
.h-section { font-size: 16px; font-weight: 600; }
.listening { font-size: 13px; }
.file-chip b { font-size: 14px !important; font-weight: 500; }
.scrub { font-size: 13px; font-variant-numeric: tabular-nums; }
.controls .speed { font-size: 13px; }
.pane .count, .studio .count { font-size: 12px; }
.nav button, .tabs button { font-size: 14px; }
@media (max-width: 760px) { .dd-btn { padding: 0 10px; gap: 6px; } }

/* Consistent action rows: context on the left, the primary action on the right */
.meta-note { font-size: 13px; color: var(--gray); }
.opt-x { margin-left: auto; }
.opt-x + .switch { margin-left: 0; }
.box { border: 0; padding: 0; border-radius: 0; }
.work > .actions { margin-top: 4px; }
.sec { margin: 6px 0 -2px; font-size: 14px; font-weight: 600; color: var(--rich-black); letter-spacing: -.1px; }

/* Recorder */
.rec-btn { width: 44px; height: 44px; border-radius: 50%; position: relative; transition: background .2s, transform .2s; }
.rec-btn:hover { background: var(--p600); }
.rec-btn.live::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--p300); animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.icon-ghost { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--gray); flex: none; transition: background .2s, color .2s; }
.icon-ghost:hover { background: var(--subtle); color: var(--danger); }

/* Caption screens */
.screen { background: linear-gradient(160deg, #2E2F45 0%, #16171F 70%); }
.screen .scene i { position: absolute; border-radius: 50%; filter: blur(30px); opacity: .5; }
.screen .scene i:first-child { width: 45%; height: 60%; left: 8%; top: 10%; background: #5B4BA8; }
.screen .scene i:last-child { width: 35%; height: 45%; right: 10%; bottom: 15%; background: #2D6B8F; }
.screen.big { max-height: 440px; width: 100%; }
.screen .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.15); }
.screen .prog b { display: block; height: 100%; width: 0; background: #fff; }
.style-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px; align-items: start; }
.style-ctrls { display: flex; flex-direction: column; gap: 16px; }
.screen.mini { aspect-ratio: 16 / 10; border-radius: 12px; }
.screen.mini .cap { max-width: 92%; }
.drop { padding: 28px 20px; gap: 6px; }
.drop .acts { margin-top: 8px; }
@media (max-width: 760px) { .style-grid { grid-template-columns: 1fr; } .screen.mini { max-width: 100%; } }
.cap { width: max-content; max-width: 86%; }
.screen.mini .cap { max-width: 90%; }
@media (max-width: 760px) { .pair > div:last-child .dd-btn.field, .pair > div:first-child .dd-btn.field { padding: 0 10px; } .pair > .swap { box-shadow: none; } }
