/* LingoFizz premium web translator v2.4 — aligned with the main website. */
:root{font-family:Inter,ui-rounded,system-ui,-apple-system,'Segoe UI',sans-serif;color:#342358;background:#f7f5ff}
body{margin:0;min-width:320px;background:#f7f5ff;color:#342358;overflow-x:hidden}
#app{max-width:none;margin:0;padding:0}
.app-content{width:min(1120px,calc(100% - 48px));margin-inline:auto;position:relative;z-index:1}
.app-hero{position:relative;overflow:hidden;background:linear-gradient(114deg,#5c25d1 0%,#8040ef 56%,#a064ef 100%);color:#fff;padding-bottom:110px}
.hero-glow{pointer-events:none;position:absolute;border-radius:50%}.hero-glow-one{width:510px;height:510px;right:-70px;top:-170px;background:radial-gradient(circle,#cc8ff657,transparent 68%)}.hero-glow-two{width:600px;height:440px;bottom:-290px;left:-140px;background:radial-gradient(circle,#72c4ff44,transparent 72%)}
.topbar{display:flex;align-items:center;justify-content:space-between;margin:0;padding:26px 0 17px;border-bottom:1px solid #ffffff35;gap:16px}
.branding{text-decoration:none;display:flex;align-items:center;gap:13px;color:#fff}
.logo.logo-image{display:block;width:53px;height:53px;border-radius:18px;transform:none;overflow:hidden;box-shadow:0 12px 20px #331a793e}
.logo.logo-image img{width:100%;height:100%;object-fit:cover}
.brand{display:flex;flex-direction:column}.brand-word{font-size:28px;line-height:1.03;letter-spacing:-.06em;font-weight:1000;color:#fff}.brand-word span{color:#ffd46c}.brand small{margin-top:6px;font-size:9px;letter-spacing:.19em;font-weight:800;color:#efe4ff}
.back-link{display:inline-flex;align-items:center;gap:8px;border:1px solid #ffffff5e;background:#ffffff17;color:white;text-decoration:none;border-radius:100px;padding:12px 19px;font-weight:750;font-size:13px;white-space:nowrap;transition:background .2s}.back-link:hover{background:#ffffff31}
.intro{padding:43px 0 2px;margin:0;max-width:800px}.intro-kicker{color:#ffdb75;font-size:11px;font-weight:900;letter-spacing:.20em}.intro h1{font-size:clamp(49px,6.6vw,79px);line-height:1;letter-spacing:-.075em;margin:18px 0 15px;font-weight:1000}.intro h1 span{color:#ffd46c}.intro p{font-size:18px;color:#f4eaff;max-width:640px;margin:0;line-height:1.48}.hero-trust{display:flex;gap:12px;margin:22px 0 0;flex-wrap:wrap}.hero-trust span{font-size:10px;font-weight:900;letter-spacing:.08em;padding:9px 13px;border-radius:99px;background:#ffffff14;border:1px solid #ffffff35;color:#fff}
.app-main{margin-top:-82px}
.translator-shell{position:relative;padding:20px 24px 26px;border-radius:30px;background:#ffffff;border:1px solid #eee8ff;box-shadow:0 22px 64px #37207027}
.workspace-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:17px}
.status{display:inline-flex;margin:0;background:#f4f1ff;color:#4b3a76;border:1px solid #ebe4ff;border-radius:99px;box-shadow:none;padding:11px 15px;font-weight:750;font-size:12px}
.status-dot{box-shadow:0 0 0 4px #e1fff5}.live-pill{background:#e8fff6;border:1px solid #ceefdf;padding:10px 13px;letter-spacing:.09em;color:#009a82;font-size:10px}
.alert{margin:0 0 14px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr);gap:4px;align-items:stretch}
.panel{min-width:0;min-height:316px;padding:23px 22px 18px;border-radius:25px;box-shadow:none;display:flex;flex-direction:column}
.source-panel{background:#fff;border:1px solid #eae3ff;border-left:5px solid #7945ed}
.target-panel{background:linear-gradient(145deg,#effffe,#ecf9ff);border:1px solid #cbeff0;border-left:5px solid #30d1b4}
.panel-head{align-items:center;justify-content:space-between;gap:10px;margin-bottom:19px}.lang-info{gap:10px;min-width:0}
.flag{display:block;object-fit:cover;flex:0 0 48px;width:48px;height:35px;border-radius:8px;box-shadow:0 4px 12px #28205020}
.lang-picker{display:flex;align-items:flex-start;flex-direction:column;min-width:0;gap:3px}
.panel-eyebrow{font-size:10px;letter-spacing:.15em;font-weight:900;color:#8773bb}
.target-panel .panel-eyebrow{color:#4f9d9a}
.language-select-hidden{position:absolute;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none}
.language-picker-button{padding:3px 0;background:transparent;border:0;display:inline-flex;gap:8px;align-items:center;justify-content:flex-start;max-width:100%;min-width:0;color:#3e286a;font-size:21px;font-weight:950;line-height:1.2;letter-spacing:-.04em;text-align:left}
.language-picker-button:hover{text-decoration:underline}.language-picker-button .chevron{font-size:21px;color:#7952e2;font-weight:500}
.target-panel .language-picker-button{color:#086c78}.target-panel .language-picker-button .chevron{color:#139f98}
.sound-button{display:inline-flex;flex-shrink:0;gap:5px;padding:10px;border-radius:99px;background:#f0eaff;color:#6941da;font-size:11px;font-weight:800}
.sound-button.target-sound{background:#d8f7f2;color:#128b85}
.sound-button:disabled{opacity:.45}
textarea{min-height:128px;padding:0;resize:vertical;color:#352958;font-size:19px;line-height:1.5}
textarea::placeholder{color:#afa6c6}
.translation{font-size:20px;line-height:1.5;min-height:128px;flex:1;color:#136974}
.translation.placeholder{color:#7daeb4}
.panel-foot{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:9px;letter-spacing:.11em;font-weight:850;color:#a59cbc}.target-panel .panel-foot{color:#6fa5a4}
.swap-wrap{height:auto;display:flex;flex-direction:column;justify-content:center;gap:13px;align-items:center}
.swap-wrap:before{content:'';position:absolute;z-index:0;width:2px;height:63%;background:repeating-linear-gradient(to bottom,#d7c7fc 0 6px,transparent 6px 13px)}
.connector-line{display:none}
.swap-button{flex:none;width:58px;height:58px;border:5px solid #fff;border-radius:20px;background:linear-gradient(135deg,#ffc96b,#ffad4e);box-shadow:0 6px 0 #e29d54,0 11px 23px #bd822841;transform:rotate(-5deg)}
.direction-pill{position:relative;left:auto;top:auto;background:#fff;border:1px solid #eee6fb;color:#7655c7;padding:8px 10px;border-radius:99px;font-size:9px;font-weight:900;white-space:nowrap}
.controls{margin:23px 0 0}.mic-row{gap:12px}.primary-button{font-size:16px;border-radius:17px;padding:17px 18px;background:linear-gradient(115deg,#894af8,#6732de);box-shadow:0 6px 0 #4f24b3,0 15px 26px #6d43de2c}.secondary-button{border-radius:17px;padding:15px 20px;border:2px solid #eae5f9;color:#6f6288}
.control-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:19px;flex-wrap:wrap}.control-bottom .text-button{margin:0;padding:10px 0;font-size:13px;color:#744ad5}.control-bottom .preferences{margin:0}.toggle-row{font-size:12px;color:#72668b}.toggle-row input{accent-color:#744ad5}
.below-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:26px}.instructions,.history-section{min-width:0;margin:0;border-radius:24px;padding:26px;background:#fff;border:1px solid #eae5f6;box-shadow:0 11px 30px #30205d0a}.instructions{background:linear-gradient(125deg,#fff8ee,#fffaf7);border-color:#f9e7d2}
.section-heading h2{font-size:21px;line-height:1.2;letter-spacing:-.045em;margin:0;font-weight:950}.instructions ol{margin:17px 0 0}.instructions li{font-size:13px;margin-bottom:11px}.instructions .tip{font-size:11px}.history-header{margin-bottom:19px}.history-empty{padding:25px 12px}
.extras{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:22px}.tools-details,.install-section{min-width:0;border-radius:18px;padding:20px;border:1px solid #ebe4f9;background:#fff}.tools-details summary{font-size:13px}.install-section{background:linear-gradient(125deg,#ebe7ff,#e6faf7)}
.site-footer{display:flex;align-items:center;justify-content:center;gap:20px;flex-wrap:wrap;padding:30px 20px 38px;color:#83779d;font-weight:700;font-size:12px}.site-footer a{color:#6e49d8;text-decoration:none}.site-footer a:hover{text-decoration:underline}
/* Searchable flag picker */
.language-dialog-backdrop{position:fixed;inset:0;z-index:10000;background:rgba(28,17,64,.60);display:flex;align-items:center;justify-content:center;padding:14px;backdrop-filter:blur(6px)}
.language-dialog-backdrop[hidden]{display:none!important}body.dialog-open{overflow:hidden}
.language-dialog{width:min(490px,100%);max-height:min(86vh,760px);display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #efe7ff;border-radius:27px;box-shadow:0 30px 95px #1d0d4f5e}
.language-dialog-head{background:linear-gradient(110deg,#6e32dc,#a05cef);color:#fff;padding:24px 26px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.language-dialog-head small{color:#ffdc76;letter-spacing:.17em;font-weight:900;font-size:10px}
.language-dialog-head h2{margin:10px 0 0;font-size:27px;letter-spacing:-.045em}
.dialog-close{width:40px;height:40px;flex:none;border:1px solid #ffffff63;color:#fff;background:#ffffff28;border-radius:12px;font-size:18px}
.language-search-wrap{display:flex;gap:10px;align-items:center;margin:18px 20px 10px;border:2px solid #e7dcff;border-radius:14px;padding:0 13px;background:#faf9ff}
.language-search-wrap span{color:#7950e5;font-size:26px}
.language-search-wrap input{width:100%;background:transparent;outline:0;border:0;height:51px;font-size:15px;color:#352358}
.language-options{padding:4px 18px 19px;overflow-y:auto;overscroll-behavior:contain}
.language-option{display:flex;width:100%;align-items:center;gap:14px;text-align:left;border:1px solid transparent;border-radius:16px;padding:12px;background:transparent;color:#3a2b5e}
.language-option:hover,.language-option:focus-visible{background:#f6f1ff;border-color:#ede4ff}
.language-option[aria-pressed=true]{background:#f1ebff;border-color:#d8c7ff}
.language-option img{width:45px;height:33px;object-fit:cover;border-radius:7px;box-shadow:0 2px 9px #301d531b;flex:none}
.language-option-names{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.language-option-names strong{font-size:15px;font-weight:850}.language-option-names small{color:#817594;font-size:12px}
.language-option-check{font-size:19px;color:#8156e5;font-weight:850}.language-empty{padding:20px 12px;color:#817594}
@media(max-width:900px){.workspace{grid-template-columns:minmax(0,1fr)}.swap-wrap{height:68px;flex-direction:row}.swap-wrap:before{height:100%}.direction-pill{left:auto;top:auto}.panel{min-height:260px}.translator-shell{padding:17px}.app-hero{padding-bottom:101px}.below-grid{grid-template-columns:1fr 1fr}.extras{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.app-content{width:calc(100% - 30px)}.app-hero{padding-bottom:85px}.topbar{padding:18px 0}.brand-word{font-size:25px}.brand small{font-size:8px;letter-spacing:.12em}.back-link{font-size:11px;padding:9px 11px}.intro{padding:29px 0 0}.intro-kicker{font-size:8px;letter-spacing:.15em}.intro h1{font-size:clamp(42px,11.4vw,60px);margin:17px 0 13px}.intro p{font-size:14px}.hero-trust{gap:7px;margin:16px 0 0}.hero-trust span{padding:7px 9px;font-size:8px}.app-main{margin-top:-65px}.translator-shell{border-radius:25px;padding:14px}.workspace-head{margin-bottom:13px}.status{font-size:11px;padding:9px 12px}.live-pill{font-size:9px;padding:9px 10px}.panel{padding:18px 15px 16px;min-height:255px;border-radius:21px}.flag{width:43px;height:31px;flex-basis:43px}.language-picker-button{font-size:20px}.sound-button{font-size:10px;padding:9px}.panel-head{gap:5px}.lang-info{gap:8px}.translation,textarea{font-size:18px}.below-grid,.extras{grid-template-columns:1fr;gap:14px;margin-top:15px}.instructions,.history-section{padding:20px}.mic-row{gap:9px}.primary-button{padding:17px 9px;font-size:14px}.secondary-button{padding:13px 12px;font-size:13px}.control-bottom{margin-top:16px;gap:5px}.control-bottom .text-button{font-size:12px}.toggle-row{font-size:12px}.swap-wrap{height:65px}.swap-button{width:56px;height:56px}.site-footer{gap:13px;font-size:11px}}
@media(max-width:370px){.back-link{font-size:0;padding:10px}.back-link span{font-size:19px}.brand-word{font-size:22px}.status{font-size:10px}.live-pill{font-size:8px}.panel-eyebrow{font-size:9px}.language-picker-button{font-size:18px}.sound-button svg{width:17px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* Accessibility and hero artwork polish */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.hero-visual{position:absolute;z-index:0;right:max(8%,calc((100vw - 1120px)/2 + 24px));top:132px;width:205px;height:205px;transform:rotate(9deg);opacity:.95;pointer-events:none;filter:drop-shadow(0 28px 24px rgba(60,17,143,.30))}
.hero-visual img{width:100%;height:100%;object-fit:contain;border-radius:41px}
@media(max-width:900px){.hero-visual{display:none}}

/* v2.5 Bulgarian voice check. Keep tool accessible, unobtrusive. */
.voice-test{margin-top:14px;padding-top:8px;border-top:1px solid rgba(120,90,180,.15)}
.voice-test .outline-button{margin-top:10px}
.voice-test p{font-size:13px;line-height:1.55;color:#635c81;margin:10px 0 0;overflow-wrap:anywhere}

/* v2.8 free Bulgarian speaking-speed adjustment */
.voice-speed-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:11px}
.voice-speed-controls label{color:#44366f;font-weight:800;font-size:13px}
.voice-speed-controls select{font:inherit;font-size:13px;font-weight:800;color:#5938b9;background:#f7f3ff;border:1.5px solid #d9cef7;border-radius:11px;padding:11px 30px 11px 12px;max-width:100%}
.voice-speed-controls select:focus-visible{outline:3px solid #9c7dff;outline-offset:2px}

/* LingoFizz 3.0 - shared premium two-person conversation mode */
[hidden]{display:none!important}
.mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:6px;margin:0 0 20px;background:#ebe7fc;border-radius:21px;border:1px solid #dfd7fa;position:relative;z-index:3}
.mode-choice{border:0;background:transparent;border-radius:16px;color:#746b98;font-size:14px;font-weight:850;min-height:52px;padding:12px 10px;transition:background .15s,transform .15s}
.mode-choice[aria-pressed="true"]{background:#fff;color:#643bdd;box-shadow:0 5px 18px #4f37951b}
.mode-choice:focus-visible,.conversation-pane button:focus-visible{outline:3px solid #ffb85a;outline-offset:3px}
.conversation-active .translator-shell,.conversation-active .below-grid,.conversation-active .extras{display:none!important}
.conversation-pane{background:#fff;border:1px solid #e8e1fa;border-radius:28px;padding:26px;box-shadow:0 17px 45px #2d17701a;margin:0 0 34px;position:relative;z-index:2}
.conversation-heading{text-align:center;padding:6px 4px 20px}
.conversation-kicker{display:block;color:#724be9;font-size:11px;letter-spacing:.14em;font-weight:900}
.conversation-heading h2{margin:12px 0 12px;color:#332269;line-height:1.04;font-size:clamp(30px,6vw,47px);letter-spacing:-.055em}
.conversation-heading h2 em{font-style:normal;color:#27b9ae}
.conversation-heading p{margin:0 auto;color:#756d91;max-width:550px;font-size:14px;line-height:1.6}
.conversation-pair{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);gap:10px;align-items:center;padding:15px;background:#f9f6ff;border:1px solid #e7e0fb;border-radius:20px;margin:0 0 16px}
.conversation-person{display:flex;flex-direction:column;gap:9px;min-width:0;align-items:center}
.conversation-person img{width:46px;height:32px;border-radius:7px;object-fit:cover;box-shadow:0 4px 12px #3f329329}
.conversation-person button{max-width:100%;width:100%;color:#513ba5;background:#fff;border:1px solid #e3dcf6;border-radius:13px;font-weight:850;min-height:45px;padding:9px 8px;font-size:13px}
.conversation-exchange{color:#f29a57;text-align:center;font-size:29px;font-weight:950}
.conversation-status-card{display:flex;gap:11px;align-items:center;border-radius:16px;background:#f4f2ff;padding:14px 17px;margin:0 0 13px;color:#6253a1;font-size:14px;font-weight:800}
.conversation-status-icon{font-size:15px;color:#22c29e}
.conversation-pane[data-state="listening"] .conversation-status-icon{color:#ef7e65;animation:conversation-pulse 1s infinite}
.conversation-pane[data-state="speaking"] .conversation-status-icon{color:#ffac36}
.conversation-pane[data-state="error"] .conversation-status-card{background:#fff0ef;color:#993b50}
@keyframes conversation-pulse{50%{opacity:.3}}
.conversation-turn-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 15px}
.conversation-turn-buttons button{min-height:93px;border:0;border-radius:19px;padding:18px 13px;font-size:17px;font-weight:950;line-height:1.35;box-shadow:0 6px 0 #5831af18;transition:transform .15s,box-shadow .15s}
.conversation-talk-a{background:linear-gradient(135deg,#8052f1,#6236d3);color:#fff}
.conversation-talk-b{background:linear-gradient(135deg,#4fe2cb,#1dbeb2);color:#124c58}
.conversation-turn-buttons button.suggested{outline:3px solid #ffbc60;outline-offset:2px;box-shadow:0 7px 0 #f2b25355}
.conversation-turn-buttons button:disabled{opacity:.5}
.conversation-capture{background:#faf9ff;border:1px solid #ece7fb;border-radius:17px;padding:17px;margin-bottom:22px}
.conversation-eyebrow{display:block;font-weight:900;font-size:10px;letter-spacing:.14em;color:#9184b8}
.conversation-capture p{color:#493d79;font-size:15px;line-height:1.5;margin:10px 0 15px;min-height:40px;overflow-wrap:anywhere}
.conversation-capture button{border:1px solid #eaddee;border-radius:11px;background:#fff;color:#94546e;font-size:12px;font-weight:850;padding:11px 14px}
.conversation-thread-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:13px}
.conversation-thread-heading h3{font-size:19px;letter-spacing:-.04em;margin:0;color:#33266e}
.conversation-thread-heading button{border:none;background:#f4edff;color:#7149dd;border-radius:10px;font-weight:850;padding:10px 15px}
.conversation-feed{max-height:400px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:4px 2px}
.conversation-empty{display:grid;place-items:center;min-height:120px;border:2px dashed #e6dffc;border-radius:15px;color:#9287b3;font-size:13px;text-align:center;padding:20px}
.conversation-message{background:#f2edff;border:1px solid #ddd0fa;border-radius:18px 18px 18px 4px;padding:16px 18px;max-width:94%;align-self:flex-start}
.conversation-message.person-b{background:#e6f9f6;border-color:#bcece5;border-radius:18px 18px 4px 18px;align-self:flex-end}
.conversation-message strong{font-size:11px;text-transform:uppercase;color:#765bc2;letter-spacing:.07em}
.conversation-message.person-b strong{color:#177e7b}
.conversation-message p{margin:11px 0;font-size:14px;line-height:1.55;color:#493c75;overflow-wrap:anywhere;white-space:pre-wrap}
.conversation-message p.conversation-translation{font-size:17px;font-weight:800;color:#2f2465;border-top:1px solid #b9a8ec66;padding-top:10px}
.conversation-message.person-b p.conversation-translation{color:#116970;border-color:#9edfd4}
.conversation-message button{border:0;background:#fff;color:#6941d1;border-radius:9px;padding:9px 12px;font-size:12px;font-weight:850}
.conversation-tip{margin:21px 0 0;color:#8c83a6;line-height:1.6;font-size:12px;text-align:center}
@media(max-width:600px){.mode-choice{font-size:12px;min-height:49px}.conversation-pane{padding:17px;border-radius:24px}.conversation-pair{padding:12px 8px;gap:5px}.conversation-person button{font-size:11px;padding:10px 5px}.conversation-turn-buttons button{font-size:14px;padding:15px 9px;min-height:86px}.conversation-heading h2{font-size:34px}}
@media(max-width:370px){.mode-choice{font-size:11px}.conversation-turn-buttons{gap:8px}.conversation-person button{font-size:10px}}
@media(prefers-reduced-motion:reduce){.conversation-pane *{animation:none!important}}
