@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&family=Noto+Sans+TC:wght@400;500;600;700;800;900&display=swap');
:root{font-family:'DM Sans','Noto Sans TC',system-ui,-apple-system,'Microsoft JhengHei',sans-serif;color:#101722;background:#fff;font-synthesis:none;--blue:#0647df;--orange:#ff8705;--ink:#111827;--muted:#687080;--line:#e5e9f1;--radius:22px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:inherit;text-decoration:none}button,input,a{touch-action:manipulation}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #628bff;outline-offset:4px}[hidden]{display:none!important}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
/* Introduction is a separate view; it never sits beside the live translator. */
.home-view{max-width:1256px;padding:0 44px;margin:auto}.site-header{height:100px;display:flex;align-items:center;justify-content:space-between}.wordmark,.modal-brand{display:flex;align-items:center;gap:10px;font-weight:900;letter-spacing:-.045em;font-size:25px}.wordmark-dot{color:var(--orange);margin-left:-9px}.brand-icon{display:inline-flex;width:37px;height:37px;align-items:center;justify-content:center;background:var(--blue);color:white;border-radius:12px}.brand-icon svg{width:25px;height:25px}.nav-login{background:#fff;border:1px solid #d9dfeb;border-radius:99px;padding:10px 25px;font-size:14px;font-weight:800;color:var(--ink)}.nav-login:hover{background:#f3f6fb}.hero{display:grid;grid-template-columns:1.08fr 1fr;gap:68px;align-items:center;min-height:calc(100dvh - 164px);padding:20px 0 42px}.hero h1{font-size:clamp(44px,5.1vw,70px);line-height:1.22;letter-spacing:-.055em;font-weight:900;margin:0 0 27px}.hero h1 span{color:var(--blue)}.hero-description{font-size:17px;line-height:1.95;color:#5e6777;margin:0 0 28px;letter-spacing:.01em}.start-button{padding:17px 23px;display:inline-flex;align-items:center;gap:38px;border:0;border-radius:16px;background:var(--blue);color:#fff;font-weight:800;font-size:17px;box-shadow:0 9px 25px #0647df25}.start-button:hover{background:#073cc0}.start-note{font-size:12px;color:#7b8493;margin:13px 0 32px}.home-details{border-top:1px solid var(--line);max-width:420px;padding-top:20px;display:grid;gap:17px}.home-details p{margin:0}.home-details strong{display:block;font-size:14px;font-weight:800;margin-bottom:6px}.home-details span{font-size:12px;color:#6d7787}.hero-product{display:flex;flex-direction:column;align-items:center;padding:12px 0 0}.preview-frame{width:286px;height:572px;border:7px solid #111c31;border-radius:36px;overflow:hidden;box-shadow:0 24px 50px #142e5f28;transform:rotate(5deg)}.preview-caption{font-size:11px;color:#8b94a4;margin-top:27px}.home-footer{min-height:64px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#8a94a5}
/* The app is exactly two full-height facing panels. */
.translate-view{height:100dvh;background:#e9edf4;display:flex;justify-content:center;overflow:hidden}.app-frame{position:relative;height:100%;width:min(100%,500px);overflow:hidden;box-shadow:0 0 65px #0b244d1c;container-type:inline-size}.translator{width:100%;height:100%;display:grid;grid-template-rows:minmax(0,1fr) 7px minmax(0,1fr);background:white;overflow:hidden}.side{min-height:0;overflow:hidden}.side-orange{background:linear-gradient(150deg,#ff950b 0%,#ff8500 60%,#ff7600 100%)}.side-blue{background:linear-gradient(150deg,#0753ed 0%,#0441d8 63%,#0337c4 100%)}.side-content{height:100%;display:grid;grid-template-rows:42px minmax(0,1fr) 112px;gap:8px;padding:14px 14px 12px;min-height:0}.side-content.flipped{transform:rotate(180deg)}.center-seam{background:white}.lang-row{display:grid;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);gap:9px;align-items:center}.language-button{width:100%;min-width:0;height:42px;border:1px solid #ffffffbd;border-radius:21px;background:#fff;color:#12161c;display:flex;align-items:center;gap:7px;padding:7px 11px;font-size:clamp(13px,3.7cqw,18px);font-weight:850;white-space:nowrap}.language-button img{width:27px;height:22px;object-fit:cover;border-radius:4px;flex:none}.language-button .lang-name{overflow:hidden;text-overflow:ellipsis;flex:1;text-align:left}.language-button svg{width:16px;height:16px;stroke-width:3}.swap-button{width:32px;height:38px;display:grid;place-items:center;background:transparent;border:0;color:white;padding:0}.swap-button svg{width:30px;height:30px;stroke-width:3}.text-stack{min-height:0;display:grid;grid-template-rows:minmax(0,.9fr) minmax(0,1.1fr);gap:8px}.side-orange .text-stack{grid-template-rows:minmax(0,1.1fr) minmax(0,.9fr)}.text-card{background:#fff;min-width:0;min-height:0;padding:10px 15px;border-radius:22px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9fb6e2 transparent}.side-blue .text-card:last-child{background:#e1ecff}.side-orange .text-card:last-child{background:#fff1d9}.card-label{display:table;width:fit-content;padding:3px 10px;border-radius:40px;background:#bed3ff;color:#132033;font-size:clamp(11px,3.3cqw,15px);font-weight:850;line-height:1.2;margin-bottom:5px}.side-orange .card-label{background:#ffe2bb}.result-text{margin:0;color:#101114;font-size:clamp(22px,6.05cqw,29px);font-weight:850;line-height:1.27;letter-spacing:-.028em;white-space:pre-wrap;overflow-wrap:anywhere}.result-text[lang^=zh]{letter-spacing:0;line-height:1.4}.panel-footer{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;min-height:0;position:relative}.mic-button{display:grid;place-items:center;width:80px;height:80px;border:3.5px solid #fff;border-radius:50%;background:#064bf0;color:white;padding:16px;user-select:none;-webkit-user-select:none;touch-action:none;flex:none;transition:background .15s,transform .15s}.mic-button svg{width:40px;height:40px;stroke-width:2.7}.side-orange .mic-button{background:#ed3705}.mic-button.recording{background:#d70d32!important;transform:scale(1.04);box-shadow:0 0 0 6px #ffffff40}.mic-button.busy{border-style:dashed}.talk-label{color:#fff;font-size:clamp(19px,5.2cqw,25px);line-height:1.2;font-weight:800;letter-spacing:-.02em}.side-orange .talk-label{text-shadow:0 1px 1px #9d4200}.record-time{position:absolute;left:calc(50% + 57px);top:32px;font-size:13px;color:#fff;font-weight:800}.account-control,.home-control{position:absolute;bottom:max(14px,env(safe-area-inset-bottom));height:36px;z-index:4;border:1px solid #ffffff8c;display:flex;align-items:center;justify-content:center;border-radius:12px;color:white;background:#0034b6;gap:5px}.account-control{right:12px;padding:0 10px;font-size:12px;font-weight:800;min-width:63px}.account-control svg{width:16px;height:16px}.home-control{left:12px;width:35px}.home-control svg{width:16px;height:16px}.account-control:hover,.home-control:hover{background:#002e9f}body.app-open{overflow:hidden}
/* A single centred floating window handles registration, account and credits. */
dialog{border:0;padding:0;color:var(--ink);box-shadow:0 28px 100px #061d3f60}dialog::backdrop{background:#101b3270;backdrop-filter:blur(6px)}.account-dialog{width:min(480px,calc(100vw - 28px));max-height:calc(100dvh - 32px);border-radius:26px;overflow:auto;background:white}.modal-header{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;padding:18px 22px 13px;background:white;border-bottom:1px solid #f0f2f7}.modal-brand{font-size:20px;gap:9px}.modal-brand .brand-icon{width:29px;height:29px;border-radius:9px}.modal-brand svg{width:20px;height:20px}.close-button{width:40px;height:40px;border:0;border-radius:50%;background:#eff2f7;display:grid;place-items:center;color:#4b566a;flex:none}.close-button svg{width:20px;height:20px}.close-button:hover{background:#e2e7f0}.modal-body{padding:23px 28px 26px}.modal-body h2{font-size:27px;line-height:1.3;letter-spacing:-.04em;margin:0 0 8px;font-weight:850}.muted{color:var(--muted);font-size:13px;line-height:1.7;margin:0}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#f1f4f9;border-radius:12px;padding:4px;margin:24px 0 22px;gap:4px}.auth-tabs button{padding:10px;border:0;border-radius:9px;background:transparent;color:#6c778a;font-size:14px;font-weight:800}.auth-tabs button[aria-selected=true]{background:#fff;color:var(--blue);box-shadow:0 2px 5px #17223b12}.modal-body label{display:block;font-size:13px;font-weight:750;margin:16px 0 8px}.modal-body input{width:100%;height:49px;padding:0 14px;border:1px solid #d9e0ed;border-radius:12px;background:#fbfcff;color:#111d31;font-size:16px}.modal-body input::placeholder{color:#a0a8b5}.form-message{font-size:12px;line-height:1.6;min-height:19px;margin:12px 0}.error-message{color:#b32836}.primary-button{border:0;border-radius:13px;min-height:48px;background:var(--blue);color:white;font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:12px;padding:12px 17px}.primary-button:hover{background:#053bc3}.primary-button svg{width:19px;height:19px}.wide{width:100%}.auth-note{font-size:12px;color:#5e6c84;text-align:center;margin:17px 0}.privacy-note{display:flex;gap:8px;border-top:1px solid var(--line);padding-top:17px;margin:22px 0 0;font-size:11px;color:#8590a2;line-height:1.7}.privacy-note svg{width:17px;height:17px;margin-top:2px}.wallet-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:19px}.wallet-heading .muted{overflow-wrap:anywhere;font-size:12px}.text-button{border:0;background:transparent;color:#697b97;white-space:nowrap;font-size:12px;padding:8px 0}.balance-card{background:#0747dd;border-radius:19px;color:white;padding:20px 22px;margin-bottom:24px}.balance-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:#dae6ff}.balance-top span:last-child{border:1px solid #ffffff35;padding:4px 8px;border-radius:20px;font-size:10px}.balance-value{display:flex;align-items:baseline;gap:7px;margin:10px 0 5px}.balance-value strong{font-size:44px;letter-spacing:-.04em;font-weight:850;line-height:1.2}.balance-value strong:nth-of-type(2){font-size:30px;margin-left:9px}.balance-value span{font-size:14px;color:#d3e1ff}.balance-card p{font-size:11px;color:#cbdcff;margin:8px 0 0}.wallet-section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}.wallet-section-heading h3{font-size:15px;font-weight:850;margin:0}.wallet-section-heading>span{font-size:10px;color:#8591a6}.credit-packs{display:grid;gap:10px}.credit-pack{border:1px solid #e0e5ef;border-radius:15px;padding:15px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;background:#fff}.credit-pack.featured{border-color:#8badff;background:#f7faff}.pack-name{font-size:14px;font-weight:850;display:block;margin-bottom:5px}.pack-info{font-size:11px;color:#7b879a}.pack-buy{border:0;border-radius:10px;min-width:106px;min-height:43px;padding:9px 13px;background:#0647df;color:white;font-size:12px;font-weight:800}.pack-buy strong{font-size:16px;margin-right:8px}.checkout-notice{font-size:11px;line-height:1.6;color:#926216;background:#fff8e9;border-radius:10px;padding:10px 12px;margin:12px 0 0}.checkout-notice:empty{display:none}.billing-note{font-size:10px;color:#8792a5;line-height:1.7;margin:12px 0 20px}.history-heading{border-top:1px solid var(--line);padding-top:20px}.account-history{margin-bottom:21px;max-height:142px;overflow:auto}.history-empty{font-size:12px;color:#929bad;padding:12px 0}.history-item{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #f0f3f8;font-size:12px}.history-item small{display:block;font-size:10px;color:#96a0b1;margin-top:5px}.history-amount{font-weight:800;color:#0647df;white-space:nowrap}.language-dialog{width:min(370px,calc(100vw - 32px));max-height:85dvh;border-radius:24px;background:white;padding:20px}.language-dialog.inverted{transform:rotate(180deg)}.language-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.language-header h2{font-size:20px;margin:0}.language-options{display:grid;gap:5px}.language-option{display:flex;align-items:center;gap:13px;width:100%;padding:12px;border:0;border-radius:11px;background:#fff;text-align:left;font-size:15px;font-weight:750}.language-option:hover,.language-option.selected{background:#edf3ff;color:#0647df}.language-option img{width:31px;height:24px;object-fit:cover;border-radius:3px}.language-option svg{margin-left:auto;width:18px;height:18px}#toast{position:fixed;z-index:40;left:50%;bottom:65px;transform:translate(-50%,15px);max-width:min(90vw,420px);background:#14233f;color:#fff;padding:13px 18px;border-radius:13px;font-size:12px;line-height:1.6;box-shadow:0 6px 30px #10264d30;opacity:0;pointer-events:none;transition:.2s;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}
/* The homepage preview uses the same cards and icons, not a screenshot overlay. */
.preview-frame{container-type:inline-size}.preview-translator{pointer-events:none}.preview-translator .side-content{grid-template-rows:30px minmax(0,1fr) 76px;padding:10px;gap:6px}.preview-translator .lang-row{gap:6px;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr)}.preview-translator .language-button{height:30px;padding:4px 8px;gap:4px;font-size:10px}.preview-translator .language-button img{width:20px;height:16px}.preview-translator .language-button svg{width:12px;height:12px}.preview-translator .swap-button{width:24px;height:25px}.preview-translator .swap-button svg{width:23px;height:23px}.preview-translator .text-stack{gap:6px}.preview-translator .text-card{padding:8px 10px;border-radius:15px;overflow:hidden}.preview-translator .card-label{font-size:9px;padding:2px 6px;margin-bottom:5px}.preview-translator .result-text{font-size:17px;line-height:1.25}.preview-translator .mic-button{width:53px;height:53px;padding:10px;border-width:2px}.preview-translator .mic-button svg{width:27px;height:27px}.preview-translator .talk-label{font-size:15px}.preview-translator .panel-footer{gap:4px}
@media(min-width:781px){.app-frame{width:min(500px,calc(100dvh * .52))}.side-content{padding-left:16px;padding-right:16px}}
@media(max-width:780px){.home-view{padding:0 24px}.site-header{height:80px}.wordmark{font-size:22px}.hero{grid-template-columns:1fr;gap:32px;padding-top:25px;min-height:auto}.hero h1{font-size:48px;margin-bottom:22px}.hero-description{font-size:15px;line-height:1.9}.hero-copy{text-align:left}.start-button{padding:16px 22px;font-size:16px;gap:35px}.home-details{margin-top:5px}.hero-product{padding:10px 0 15px}.preview-frame{width:264px;height:546px;transform:rotate(4deg)}.home-footer{font-size:10px;gap:16px;min-height:80px}.home-footer span:last-child{display:none}.translate-view{background:var(--blue)}.app-frame{width:100%;max-width:600px}.side-content{padding-bottom:max(10px,env(safe-area-inset-bottom));grid-template-rows:42px minmax(0,1fr) 110px}.side-orange .side-content{padding-bottom:max(10px,env(safe-area-inset-top))}.account-control{bottom:max(13px,env(safe-area-inset-bottom))}.home-control{bottom:max(13px,env(safe-area-inset-bottom))}}
@media(max-height:740px){.side-content{grid-template-rows:38px minmax(0,1fr) 87px;gap:7px;padding:9px 12px}.language-button{height:38px}.mic-button{width:60px;height:60px;padding:12px;border-width:3px}.mic-button svg{width:31px;height:31px}.talk-label{font-size:19px}.text-card{padding:7px 12px;border-radius:18px}.card-label{font-size:11px;margin-bottom:4px}.result-text{font-size:22px}.record-time{top:23px;left:calc(50% + 45px)}.account-control,.home-control{height:32px;bottom:10px}.account-dialog{max-height:calc(100dvh - 20px)}}
@media(max-width:360px){.hero h1{font-size:42px}.modal-body{padding:20px}.modal-header{padding:14px 17px}.language-button{gap:5px;padding:6px 8px;font-size:12px}.language-button img{width:23px;height:18px}.lang-row{gap:6px}.talk-label{font-size:18px}.account-control{right:8px;font-size:11px;min-width:58px;padding:0 7px}.home-control{left:8px}.pack-buy{min-width:96px}.credit-pack{padding:12px}.balance-value strong{font-size:39px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Keep complete language names visible on phone-sized screens without reducing translation text. */
#translator .language-button{font-size:clamp(12px,3.4cqw,17px);gap:6px;padding-inline:9px}
#translator .language-button img{width:24px;height:20px}
#translator .language-button svg{width:14px;height:14px}
@media(max-width:360px){#translator .language-button{font-size:12px;gap:5px;padding-inline:8px}#translator .language-button img{width:22px;height:18px}#translator .language-button svg{width:12px;height:12px}}

/* Language selection follows only the central control rotation. */
#language-dialog{transform:rotate(var(--language-device-rotation,0deg))}
#language-dialog.inverted{transform:rotate(calc(var(--language-device-rotation,0deg) + 180deg))}
