/* Website refresh: centered identity, restrained navigation, readable account offers. */
:root body .topbar{display:grid!important;grid-template-columns:92px minmax(0,1fr) 92px!important;align-items:center;column-gap:8px!important;box-sizing:border-box;min-height:64px!important;height:64px!important;padding:6px 0!important}
:root body .topbar .brand{grid-column:2;grid-row:1;justify-self:center;width:min(110px,100%)!important;min-width:0!important;height:46px!important;margin:0!important}
:root body .topbar .header-actions{grid-column:1;grid-row:1;direction:rtl;gap:4px!important;justify-content:flex-start}
:root body .topbar .header-left{grid-column:3;grid-row:1;display:flex;direction:ltr;gap:4px;align-items:center;justify-content:flex-start}
:root body .topbar :is(.header-actions,.header-left)>button{display:grid!important;grid-template-columns:1fr;grid-template-rows:20px 18px;align-content:center;align-items:center;justify-items:center;gap:2px 0!important;width:44px!important;min-width:44px!important;height:48px!important;min-height:48px!important;padding:3px 0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;color:var(--ink);backdrop-filter:none!important;-webkit-backdrop-filter:none!important;position:static!important;transform:none!important}
:root body .topbar :is(.header-actions,.header-left)>button svg{display:block;width:20px!important;height:20px!important;grid-row:1;grid-column:1;margin:0!important}
:root body .topbar :is(.header-actions,.header-left)>button>span,:root body .header-left #theme-toggle::after{grid-row:2;grid-column:1;font-family:inherit;font-size:12px!important;font-weight:600!important;line-height:18px!important;white-space:nowrap;padding:0!important;margin:0!important}

:root body .topbar #site-menu-button{order:0!important}:root body .topbar #account-button{order:1!important}
:root body .header-left #usage-button{order:0!important}:root body .header-left #theme-toggle{order:1!important}
:root body .topbar .tw-header-download{display:none!important}
:root body .topbar :is(.header-actions,.header-left)>button:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;border-radius:8px!important}
/* Existing theme/offline controls are rows inside the menu, with their listeners intact. */
:root body #site-menu{box-sizing:border-box;position:fixed;inset:12px 12px auto auto;margin:0;width:min(350px,calc(100vw - 24px));max-height:calc(var(--app-height,100dvh) - 24px);padding:18px;border:1px solid var(--tw-glass-line);border-radius:24px;background:var(--surface);color:var(--ink);overflow:auto;box-shadow:0 20px 60px rgba(0,30,30,.22)}
#site-menu::backdrop{background:rgba(0,20,24,.45)}
#site-menu header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}#site-menu header small{font-size:12px;color:var(--muted)}#site-menu h2{font-size:24px;line-height:1.4;margin:2px 0}#site-menu h3{font-size:12px;font-weight:600;color:var(--muted);margin:14px 0 5px}
#site-menu>section,#site-menu>nav{padding:4px 0 10px;border-top:1px solid var(--line)}
:root body #site-menu :is(button,a){box-sizing:border-box;min-height:44px;color:var(--ink);text-decoration:none;font:inherit;font-size:15px}
:root body #site-menu :is([data-menu-action],nav>a){display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 4px;background:none;border:0;border-radius:10px;text-align:start}
:root body #site-menu .site-menu-close{width:44px;height:44px;padding:0;border:0;background:none;font-size:28px}
:root body #site-menu :is(#theme-toggle,#offline-open){display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto!important;align-items:center;justify-content:start;gap:12px!important;position:static!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;height:48px!important;padding:10px 4px!important;margin:0!important;border:0!important;border-radius:10px;background:none!important;box-shadow:none!important;text-align:start}
:root body #site-menu :is(#theme-toggle,#offline-open) svg{grid-row:1;grid-column:1;width:20px!important;height:20px!important}
:root body #site-menu :is(#theme-toggle,#offline-open)>span{grid-row:1;grid-column:2;font-size:15px!important;line-height:24px!important}
#site-menu .menu-legal{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:10px}#site-menu .menu-legal a{display:inline-flex;align-items:center;font-size:12px}
:root body #site-menu :is(button,a):focus-visible{outline:2px solid var(--focus);outline-offset:1px}
/* Keep playback rows in the scrollable result; microphones remain in their own row. */
:root body #translator .voice-panels{padding-bottom:14px!important;scroll-padding-bottom:14px!important;scroll-behavior:auto!important;overflow-anchor:none}
:root body #translator #face-panel .voice-result{min-height:max-content!important}
:root body #translator .playback-controls{flex:0 0 auto!important;min-height:max-content!important;margin-bottom:2px!important}
:root body #translator .playback-controls .voice-options{flex:0 0 auto!important;min-height:44px!important;align-items:center}
:root body #translator .mic-controls{position:relative;isolation:isolate;margin-top:4px!important}
/* Account sheet: fixed heading, freely scrolling content and no clipped identity. */
:root body #account-modal{box-sizing:border-box;width:min(460px,calc(100vw - 24px));max-height:calc(var(--app-height,100dvh) - 24px);padding:0!important;border:1px solid var(--tw-glass-line);border-radius:24px;background:var(--surface);color:var(--ink);overflow:hidden!important}
:root body #account-modal[open]{display:flex!important;flex-direction:column}
:root body #account-modal>.modal-heading{flex:0 0 auto;padding:14px 16px!important;margin:0!important;min-height:64px;align-items:center;border-bottom:1px solid var(--line)}
:root body #account-modal>.modal-heading h2{font-size:20px;line-height:1.5;margin:0}
:root body #account-modal>.modal-body{flex:1 1 auto;min-height:0;overflow:auto!important;padding:16px!important;scroll-padding-block:16px}
:root body #account-modal .account-profile{padding:14px;margin:0 0 20px;border:1px solid var(--tw-glass-line);border-radius:20px;background:var(--tw-control-glass)}
:root body #account-modal .account-profile.is-unlimited{background:linear-gradient(140deg,var(--surface),var(--mint));border-color:var(--teal)}
:root body #account-modal .account-summary{height:auto!important;min-height:56px;padding:0!important;margin:0 0 12px!important;display:flex;align-items:center;gap:10px;background:none;border:0;overflow:visible!important}
:root body #account-modal .account-summary>div{flex:1;min-width:0;overflow:visible}
:root body #account-modal #account-name{display:block;font-size:15px;line-height:1.6;overflow-wrap:anywhere}
:root body #account-modal #account-email{font-size:12px;line-height:1.7;margin:3px 0 8px;overflow-wrap:anywhere;white-space:normal}
:root body #account-modal .account-avatar{flex:0 0 36px;width:36px;height:36px;background:none;border:0}
:root body #account-modal .account-unlimited-badge{display:inline-flex;align-items:center;min-height:26px;padding:3px 10px;border-radius:20px;background:var(--tiffany-gradient);color:var(--action-ink);font-size:12px;font-weight:700;line-height:20px}
:root body #account-modal .account-profile.is-unlimited #account-trial-state{display:none}
:root body #account-modal #account-trial-state{font-size:14px;margin:8px 0}
:root body #account-modal .account-usage{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0;margin:10px 0}
:root body #account-modal .account-usage>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:70px;padding:8px 3px;border:1px solid var(--tw-glass-line);border-radius:13px;background:var(--surface)}
:root body #account-modal .account-usage strong{font-size:14px!important;line-height:1.5;white-space:nowrap}
:root body #account-modal .account-usage span{font-size:11px!important;line-height:1.5;white-space:nowrap}
:root body #account-modal #account-activation-note{font-size:12px;line-height:1.7;margin:10px 0 0;padding:0;background:none}
:root body #account-modal :is(.operator-info,#account-purchases-note){display:none!important}
:root body #account-modal #account-delete{display:block;width:auto;margin:22px 0 8px!important;padding:8px 0!important;min-height:44px;border:0!important;background:none!important;box-shadow:none;color:var(--muted);font-size:12px;text-decoration:underline;text-underline-offset:3px}
:root body #account-modal #account-signout{min-height:44px;margin:8px 0 0;padding:10px 0;text-align:start;border:0;background:none}
:root body #account-modal :is([hidden],#account-delete[hidden],#account-signout[hidden],#account-restore[hidden],#account-signin[hidden]){display:none!important}
/* Six web-only prices share one server catalogue; legacy cards stay bound but are not shown. */
:root body #account-offers:has(#web-plan-grid) :is(#account-plans,#account-billing-status){display:none!important}
:root body #account-modal #account-plans-title{font-size:18px;line-height:1.5;margin:0 0 12px}
:root body #account-modal .web-plan-grid{display:grid;gap:12px}
:root body #account-modal .web-plan-card{position:relative;padding:16px;border:1px solid var(--tw-glass-line);border-radius:20px;background:var(--surface);min-width:0}
:root body #account-modal .web-plan-card[data-featured=true]{border-color:var(--teal);background:var(--tw-control-glass)}
.web-plan-card h4{font-size:17px;line-height:1.6;margin:6px 0 12px}.web-plan-badge{display:inline-block;font-size:11px;line-height:20px;color:var(--teal-dark);background:var(--mint);border-radius:8px;padding:2px 8px}
.web-plan-price{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:baseline}.web-plan-price strong{font-size:28px;line-height:1.4}.web-plan-price del{font-size:15px;color:var(--muted)}.web-plan-price>span{font-size:13px;color:var(--muted)}
.web-plan-equivalent,.web-plan-terms{font-size:12px;line-height:1.8;color:var(--muted);margin:8px 0}
.web-plan-features{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px;margin:14px 0;padding:0;font-size:12px;line-height:1.6}.web-plan-features li::before{content:'✓';color:var(--teal);margin-inline-end:8px}
:root body #account-modal .web-plan-action{width:100%;min-height:46px;padding:10px;border:0;border-radius:13px;background:var(--tiffany-gradient);color:var(--action-ink);font:inherit;font-size:14px;font-weight:700;line-height:1.5}
:root body #account-modal .web-plan-action:disabled{opacity:.5}
.web-plan-status{font-size:13px;line-height:1.7;color:var(--muted);margin:12px 0 0}.web-plan-status:empty{display:none}
:root body #web-plan-checkout{box-sizing:border-box;width:min(420px,calc(100vw - 24px));max-height:calc(var(--app-height,100dvh) - 24px);padding:20px;border:1px solid var(--tw-glass-line);border-radius:22px;background:var(--surface);color:var(--ink);overflow:auto}
#web-plan-checkout::backdrop{background:rgba(0,20,24,.48)}#web-plan-checkout h3{font-size:20px;margin:0 0 12px}#web-plan-checkout label{display:grid;gap:6px;margin-block:12px;font-size:14px}#web-plan-checkout input{box-sizing:border-box;width:100%;min-height:46px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--mint);color:var(--ink);font-size:16px}
.web-checkout-quote{font-size:17px;font-weight:700;line-height:1.6}.web-checkout-terms,#web-plan-checkout [role=status]{font-size:12px;line-height:1.7;color:var(--muted)}.web-checkout-actions{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin-top:16px}.web-checkout-actions button{min-height:46px;border:1px solid var(--line);border-radius:12px;padding:8px;background:var(--mint);color:var(--ink);font:inherit;font-size:14px}.web-checkout-actions [type=submit]{border:0;background:var(--tiffany-gradient);color:var(--action-ink)}
@media(min-width:701px){:root body .topbar{grid-template-columns:112px minmax(0,1fr) 112px!important}:root body .topbar .header-actions,:root body .topbar .header-left{gap:12px!important}}

/* Every playback control stays inside the available width, including long language names. */
:root body #translator .translator-card>.voice-options{order:2!important;display:grid!important;grid-template-columns:minmax(0,1fr) 108px 44px!important;flex:0 0 auto!important;box-sizing:border-box;width:100%!important;max-width:100%!important;min-width:0!important;min-height:44px!important;align-items:stretch;gap:8px!important;margin:0!important;padding:0!important}
:root body #translator .translator-card>.voice-options :is(#voice-open,.speed-control,#stop-playback){box-sizing:border-box;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:44px!important;margin:0!important;padding:6px!important;border-radius:14px;font-size:13px!important;line-height:1.5!important}
:root body #translator .translator-card>.voice-options #voice-open{grid-column:1;grid-row:1;white-space:normal;overflow-wrap:anywhere}
:root body #translator .translator-card>.voice-options .speed-control{grid-column:2;grid-row:1;display:flex;justify-content:center;gap:4px!important;white-space:nowrap}
:root body #translator .translator-card>.voice-options #playback-speed{box-sizing:border-box;min-width:0!important;width:50px!important;max-width:50px!important;padding:0!important;font-size:13px!important;flex:0 1 50px}
:root body #translator .translator-card>.voice-options #stop-playback{grid-column:3;grid-row:1;padding:0!important}
/* Rounded strokes and restrained Tiffany accents; touch targets remain transparent. */
:root body .topbar #theme-toggle .theme-toggle-label{display:block!important}
:root body :is(.topbar,.bottom-nav) svg{stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--teal-dark)}
:root[data-theme=dark] body :is(.topbar,.bottom-nav) svg{color:#75ded4}
:root body .bottom-nav button{border:0!important;background:none!important;box-shadow:none!important}
/* A calm, full-height drawer with distinct sections and a live account summary. */
:root body #site-menu{inset:0 0 0 auto;width:min(360px,calc(100vw - 24px));height:var(--app-height,100dvh);max-height:var(--app-height,100dvh);padding:24px 20px max(20px,env(safe-area-inset-bottom));border:0;border-radius:24px 0 0 24px;overscroll-behavior:contain;scrollbar-width:thin}
:root body #site-menu[open]{display:flex;flex-direction:column;gap:8px}
#site-menu>header{margin:0 0 6px;flex-shrink:0;min-height:64px}
#site-menu .menu-brand{display:block;position:relative;width:134px;height:67px;min-height:0}
#site-menu .menu-brand img{width:100%;height:100%;object-fit:contain}
#site-menu .menu-brand .brand-logo-dark{display:none}
:root[data-theme=dark] #site-menu .menu-brand .brand-logo-light{display:none}
:root[data-theme=dark] #site-menu .menu-brand .brand-logo-dark{display:block}
:root body #site-menu .site-menu-close{background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;color:var(--teal-dark);flex:0 0 44px}
#site-menu>section,#site-menu>nav{flex:0 0 auto;padding:0 0 8px;border-top:0}
#site-menu h3{font-size:12px;line-height:1.6;margin:8px 0;color:var(--muted);font-weight:600}
:root body #site-menu :is([data-menu-action],nav>a,#offline-open,#settings-button,#menu-theme){display:grid!important;grid-template-columns:22px minmax(0,1fr) 12px!important;grid-template-rows:auto!important;align-items:center;gap:12px!important;position:static!important;transform:none!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:48px!important;height:auto!important;padding:10px 4px!important;margin:0!important;text-align:start;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;font-size:15px!important;line-height:1.6!important;white-space:normal}
:root body #site-menu :is(button,a)>svg{grid-column:1;grid-row:1;width:22px!important;height:22px!important;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--teal-dark)}
:root[data-theme=dark] body #site-menu :is(button,a)>svg{color:#75ded4}
:root body #site-menu :is(button,a)>span{grid-column:2;grid-row:1;font-size:15px!important;line-height:1.6!important}
:root body #site-menu .menu-arrow{grid-column:3;color:var(--muted);font-size:23px!important}
:root body #site-menu #settings-button::after{content:none!important;display:none!important}
#site-menu #menu-theme small{font-size:13px;color:var(--muted)}
#site-menu .menu-legal{align-items:center;justify-content:center;gap:8px;margin-top:8px;color:var(--muted)}
:root body #site-menu .menu-legal a{font-size:12px;min-height:44px;color:var(--muted)}
:root body #site-menu .menu-account-card{margin-top:auto!important;padding:14px 4px!important;border-top:1px solid var(--line)!important;flex:0 0 auto}
#site-menu .menu-account-card strong,#site-menu .menu-account-card [data-menu-email],#site-menu .menu-account-card small{display:block;overflow-wrap:anywhere}
#site-menu .menu-account-card strong{font-size:14px}#site-menu .menu-account-card [data-menu-email]{font-size:12px;margin:3px 0;color:var(--muted)}#site-menu .menu-account-card small{font-size:12px;color:var(--teal-dark)}
:root[data-theme=dark] #site-menu .menu-account-card small{color:#75ded4}
:root body #site-menu :is(button,a):focus-visible{outline:0;text-decoration:underline;text-underline-offset:5px}
/* Three distinct plan families, all sharing the verified checkout amounts. */
:root body #account-modal .web-plan-card{padding:18px;border-radius:22px;background:linear-gradient(135deg,var(--surface),var(--mint));overflow-wrap:anywhere}
:root body #account-modal .web-plan-card[data-family=home]{background:linear-gradient(135deg,#e2fcf6,#b9eee2);color:#103c38;border-color:#58bdab}
:root body #account-modal .web-plan-card[data-family=plus]{background:linear-gradient(135deg,#203b54,#102333 75%);color:#f2fcff;border-color:#35566d}
:root[data-theme=dark] body #account-modal .web-plan-card[data-family=home]{background:linear-gradient(135deg,#174b43,#102d2c);color:#edfffa;border-color:#36786c}
#account-modal .web-plan-card[data-family=home] :is(.web-plan-equivalent,.web-plan-terms,.web-plan-price del,.web-plan-price>span){color:#315e55}
:root[data-theme=dark] #account-modal .web-plan-card[data-family=home] :is(.web-plan-equivalent,.web-plan-terms,.web-plan-price del,.web-plan-price>span){color:#b6ddd3}
#account-modal .web-plan-card[data-family=plus] :is(.web-plan-equivalent,.web-plan-terms,.web-plan-price del,.web-plan-price>span){color:#bfd6df}
#account-modal .web-plan-card[data-family=plus] .web-plan-badge{background:#335c6c;color:#c0fff3}
#account-modal .web-plan-card[data-family=home] .web-plan-badge{background:#fff9;color:#174b43}
.web-plan-badge{border-radius:20px;font-weight:600;padding:3px 10px}
.web-plan-price{gap:4px 8px}.web-plan-price strong{font-size:30px;letter-spacing:-.5px;white-space:nowrap}.web-plan-price del{font-size:14px;white-space:nowrap}
.web-plan-features li{min-width:0;display:flex;align-items:flex-start;gap:5px}.web-plan-features li::before{flex:0 0 auto;margin:0;color:var(--teal-dark)}
#account-modal .web-plan-card[data-family=plus] .web-plan-features li::before,:root[data-theme=dark] #account-modal .web-plan-features li::before{color:#75ded4}
@media(max-width:350px){:root body #translator .translator-card>.voice-options{grid-template-columns:minmax(0,1fr) 100px 44px!important;gap:5px!important}.web-plan-price strong{font-size:26px}}
:root body .header-left #theme-toggle,:root body .header-left #theme-toggle .theme-toggle-label{color:var(--ink)!important}
:root body #translator .translator-card>.voice-options #playback-speed{height:30px!important;min-height:30px!important;border:0!important;border-radius:0;background:transparent!important;color:inherit!important}
:root body #site-menu :is([data-menu-action],nav>a,#offline-open,#settings-button,#menu-theme){font-weight:600!important}
:root body #account-modal:focus{outline:none}
.web-plan-features{font-size:13px;line-height:1.7}
.web-plan-ai-label{display:block;white-space:nowrap}
/* Four scoped tool refinements; original controls and event handlers are retained. */
:root body #assistant .assistant-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 50px!important;gap:8px!important;align-items:center!important}
:root body #assistant .assistant-toolbar>*{min-width:0!important;width:auto!important;margin:0!important;grid-row:1!important}
:root body #assistant .assistant-brand{grid-column:1!important;gap:5px!important;display:flex!important}
:root body #assistant #assistant-title{font-size:14px!important;white-space:nowrap!important}
:root body #assistant .assistant-brand img{width:24px!important;height:24px!important}
:root body #assistant .assistant-toolbar>label{grid-column:2!important;display:grid!important;gap:2px!important}
:root body #assistant .assistant-toolbar>label>span{font-size:11px!important;line-height:16px!important}
:root body #assistant #assistant-target{width:100%!important;min-width:0!important;height:44px!important;font-size:13px!important}
:root body #assistant #assistant-clear{grid-column:3!important;width:50px!important;padding:6px!important;min-height:44px!important}
:root body #assistant #assistant-send{background:var(--tiffany-gradient)!important;color:var(--action-ink)!important;border:0!important;border-radius:15px!important;width:46px!important;height:46px!important;font-size:27px!important;box-shadow:0 4px 12px #00b5a322!important}
:root body #assistant #assistant-send:disabled{opacity:.55!important}
:root body #assistant :is(#assistant-attach,#assistant-mic){color:var(--teal-dark)!important;border:0!important;background:none!important;min-width:44px!important;min-height:44px!important}
:root[data-theme=dark] body #assistant :is(#assistant-attach,#assistant-mic){color:#75ded4!important}
:root body #documents>#documents-submit{flex:0 0 auto!important;margin:10px 0!important;min-height:44px!important}
:root body #photos .photo-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 54px!important;gap:6px!important;width:100%!important}
:root body #photos .photo-actions>button{width:100%!important;min-width:0!important;min-height:46px!important;padding:7px 4px!important;font-size:13px!important;gap:5px!important}
:root body #photos .photo-actions #photo-clear{order:3!important}
/* Keep the language caption readable above its selector within the AI toolbar. */
:root body #assistant .assistant-toolbar>label{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:5px!important;align-items:center!important;justify-items:stretch!important}
:root body #assistant .assistant-toolbar>label>span{grid-column:1!important;grid-row:1!important;font-size:13px!important;font-weight:600!important;line-height:20px!important;text-align:center!important;white-space:nowrap!important;margin:0!important}
:root body #assistant .assistant-toolbar>label>.language-picker,:root body #assistant .assistant-toolbar>label>select{grid-column:1!important;grid-row:2!important;width:100%!important;min-width:0!important;margin:0!important}
/* AI toolbar: one wide language control and a clear action on the same baseline. */
:root body #assistant .assistant-toolbar{grid-template-columns:minmax(0,1fr) 64px!important;align-items:end!important;column-gap:12px!important}
:root body #assistant .assistant-toolbar .assistant-brand{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
:root body #assistant .assistant-toolbar>label{grid-column:1!important;grid-row:1!important;width:100%!important}
:root body #assistant .assistant-toolbar>label>span{text-align:start!important;font-size:14px!important;line-height:20px!important}
:root body #assistant .assistant-toolbar #assistant-clear{grid-column:2!important;grid-row:1!important;align-self:end!important;width:64px!important;height:46px!important;min-height:46px!important;margin:0!important}
:root body #assistant .assistant-toolbar>label>select,:root body #assistant .assistant-toolbar>label>.language-picker{height:46px!important;min-height:46px!important}
:root body #assistant .assistant-toolbar #assistant-target-picker{grid-column:1!important;grid-row:2!important;box-sizing:border-box!important;width:100%!important;height:46px!important;min-height:46px!important;margin:0!important}
