:root{
  --bg:#04101f; --bg2:#07172b; --card:#0b2038; --card2:#0e2945; --line:#24415e;
  --text:#f7f2e8; --muted:#a9b8c8; --gold:#f2c66d; --gold2:#ffe4a5; --blue:#45a6ff; --ok:#42d58b;
}
*{box-sizing:border-box} html,body{margin:0;background:radial-gradient(circle at 50% -10%,#0f3b68 0,#07172b 34%,#04101f 72%);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;min-height:100%}
body{padding-bottom:env(safe-area-inset-bottom)} button,textarea{font:inherit}
.app-shell{min-height:100vh;max-width:860px;margin:auto;position:relative;padding-bottom:84px}
.topbar{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;position:sticky;top:0;z-index:10;background:rgba(4,16,31,.78);backdrop-filter:blur(18px);border-bottom:1px solid rgba(242,198,109,.12)}
.icon-btn{background:transparent;border:1px solid rgba(242,198,109,.24);color:var(--gold2);border-radius:12px;width:42px;height:42px;font-size:20px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.04em}.brand img{width:36px;height:36px;border-radius:10px;box-shadow:0 0 22px rgba(69,166,255,.35)}
main{padding:16px}.view{display:none}.view.active{display:block}
.hero{border:1px solid rgba(242,198,109,.25);background:linear-gradient(180deg,rgba(11,32,56,.92),rgba(4,16,31,.92));border-radius:28px;overflow:hidden;box-shadow:0 26px 60px rgba(0,0,0,.32);position:relative}.hero:after{content:"";position:absolute;inset:auto -30% -50% -30%;height:55%;background:radial-gradient(circle,rgba(69,166,255,.26),transparent 65%)}
.hero-logo{width:100%;display:block;aspect-ratio:1/1;object-fit:cover}.hero-copy{padding:18px 20px 22px}.hero-copy h1{margin:0 0 6px;font-size:28px;color:var(--gold2)}.hero-copy p{margin:0;color:var(--muted);line-height:1.5}
.status-row{display:flex;gap:8px;overflow:auto;padding:14px 2px 4px}.pill{white-space:nowrap;border:1px solid var(--line);border-radius:999px;padding:8px 11px;color:var(--muted);font-size:13px;background:rgba(11,32,56,.75)}.pill.ok{color:#b8f4d4;border-color:rgba(66,213,139,.35)}
.module-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:16px}.module{min-height:110px;text-align:left;border:1px solid rgba(242,198,109,.26);border-radius:20px;padding:16px;background:linear-gradient(160deg,rgba(15,41,69,.92),rgba(7,23,43,.96));color:var(--text);display:flex;flex-direction:column;justify-content:center;gap:8px;box-shadow:0 12px 28px rgba(0,0,0,.18)}.module strong{font-size:18px;color:var(--gold2)}.module span{font-size:13px;color:var(--muted)}.module:active{transform:scale(.985)}.module.static:active{transform:none}
.card{margin-top:16px;border:1px solid var(--line);border-radius:20px;padding:18px;background:rgba(11,32,56,.86)}.card h2,.card h3{margin-top:0}.card p{color:var(--muted);line-height:1.5}.learn-card{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.badge{border-radius:999px;background:rgba(242,198,109,.14);color:var(--gold2);padding:7px 10px;font-size:12px;border:1px solid rgba(242,198,109,.3)}
.section-head{display:flex;gap:12px;justify-content:space-between;align-items:flex-start;margin-bottom:14px}.section-head h1{margin:4px 0}.section-head p{margin:0;color:var(--muted)}.secondary{background:transparent;color:var(--gold2);border:1px solid rgba(242,198,109,.3);padding:10px 12px;border-radius:12px}
.messages{min-height:52vh;max-height:62vh;overflow:auto;padding:4px 0 10px}.message{display:flex;margin:10px 0}.bubble{max-width:84%;padding:12px 14px;border-radius:18px;line-height:1.45;border:1px solid var(--line)}.message.user{justify-content:flex-end}.message.user .bubble{background:#123457;border-color:#2b5e8d}.message.ai .bubble{background:#0a1d33}.meta{font-size:11px;color:var(--muted);margin-top:6px}
.composer{display:flex;gap:10px;position:sticky;bottom:76px;background:linear-gradient(180deg,transparent,#04101f 20%);padding-top:14px}.composer textarea{flex:1;resize:none;background:#0a1d33;border:1px solid rgba(242,198,109,.35);color:var(--text);border-radius:18px;padding:13px 14px;outline:none}.send-btn{width:52px;border:0;border-radius:18px;background:linear-gradient(135deg,var(--gold2),var(--gold));color:#142033;font-size:20px;font-weight:900}
.memory-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.memory-grid .card{margin:0}.clean-list{padding-left:20px;color:var(--muted);line-height:1.7}
.journal-list{display:grid;gap:12px}.journal-item{border-left:3px solid var(--gold);padding:14px 16px;background:rgba(11,32,56,.82);border-radius:0 16px 16px 0}.journal-item strong{color:var(--gold2)}.journal-item p{margin:6px 0 0;color:var(--muted);line-height:1.45}
.profile-card{display:flex;align-items:center;gap:16px}.profile-card img{width:84px;height:84px;border-radius:22px;box-shadow:0 0 30px rgba(69,166,255,.25)}.profile-card h2{margin:0 0 6px}.profile-card p{margin:3px 0}
.bottom-nav{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:min(860px,100%);height:72px;background:rgba(4,16,31,.93);backdrop-filter:blur(18px);border-top:1px solid rgba(242,198,109,.14);display:grid;grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom);z-index:20}.nav-btn{border:0;background:transparent;color:#889aaa;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;font-size:20px}.nav-btn span{font-size:11px}.nav-btn.active{color:var(--gold2);text-shadow:0 0 16px rgba(242,198,109,.35)}
@media(min-width:680px){.module-grid{grid-template-columns:repeat(3,1fr)}.hero{display:grid;grid-template-columns:1fr 1fr;align-items:center}.hero-logo{aspect-ratio:auto;height:420px}.hero-copy{padding:30px}.hero-copy h1{font-size:36px}}
.chat-source-links{display:flex;flex-direction:column;gap:7px;margin:13px 0 5px;padding-top:10px;border-top:1px solid rgba(235,195,115,.3);font-size:13px;line-height:1.4;overflow-wrap:anywhere}.chat-source-links strong{color:#f3cf86}.chat-source-links a{color:#a5d9ff;text-decoration:underline}
#appMenu[hidden]{display:none!important}
#appMenu{position:absolute;z-index:80;top:calc(var(--header-height) + env(safe-area-inset-top));left:10px;right:10px;max-width:450px;background:#102a41;border:1px solid #c69c5b;border-radius:15px;box-shadow:0 16px 44px #0009;padding:12px;display:grid;gap:8px}
#appMenu a,#appMenu button{display:block;min-height:51px;box-sizing:border-box;padding:13px;border-radius:10px;background:#18364f;border:1px solid #46647a;color:#f7e2b8;text-align:left;font-size:17px;font-weight:700;text-decoration:none}
#appMenu button{background:transparent;color:#fff}



/* Verbindliches Yoryi-KI-Markenbild: vollständig und ohne Beschnitt. */
.hero-logo{aspect-ratio:auto!important;height:auto!important;object-fit:contain!important;background:#020b18}
.brand img,.profile-card img{object-fit:cover}
.language-picker{appearance:none;background:#0a1d33;color:var(--gold2);border:1px solid rgba(242,198,109,.35);border-radius:12px;padding:9px 8px;font-weight:800;min-width:72px}
.translator-grid{display:grid;gap:14px}.language-row{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center}.language-row select,.tone-select{width:100%;background:#0a1d33;color:var(--text);border:1px solid var(--line);border-radius:14px;padding:12px}.swap-btn,.voice-btn,.action-btn{border:1px solid rgba(242,198,109,.35);background:#0a1d33;color:var(--gold2);border-radius:15px;padding:12px;font-weight:800}.voice-btn{font-size:22px;min-height:54px}.voice-btn.listening{background:#8b2341;color:#fff;animation:pulse 1s infinite}.translate-box{width:100%;min-height:128px;resize:vertical;background:#071a30;color:var(--text);border:1px solid var(--line);border-radius:18px;padding:14px;line-height:1.5}.translate-box.output{background:#0c2743}.translate-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.primary-action{background:linear-gradient(135deg,var(--gold2),var(--gold));color:#142033;border:0}.conversation-toggle{display:flex;gap:10px;align-items:center;color:var(--muted)}.conversation-toggle input{width:22px;height:22px;accent-color:var(--gold)}.translation-status{min-height:24px;color:var(--muted);font-size:14px}.translation-status.error{color:#ffb6b6}.translation-status.ok{color:#9cf0c4}@keyframes pulse{50%{transform:scale(1.04);box-shadow:0 0 24px rgba(255,80,120,.35)}}
@media(max-width:420px){.brand span{display:none}.topbar{gap:8px}.language-picker{min-width:68px}}



/* One mobile layout: legible type, even tiles, and no sideways overflow. */
html,body{width:100%;max-width:100%;overflow-x:hidden}
body{margin:0;padding-bottom:env(safe-area-inset-bottom)}
@media(max-width:679px){
  .app-shell{width:100%;max-width:100%;min-width:0;overflow-x:clip;padding-bottom:calc(92px + env(safe-area-inset-bottom))}
  .topbar{height:68px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:8px;padding:0 12px}
  .brand{position:static;left:auto;transform:none;justify-self:center;min-width:0;gap:7px;letter-spacing:.02em}
  .brand img{width:34px;height:34px;flex:none}
  .brand span{display:block;font-size:15px;white-space:nowrap}
  .language-picker{min-width:66px;padding:9px 7px}
  main{width:100%;max-width:100%;min-width:0;padding:16px}
  .view,.hero,.card,.translator-grid,.memory-grid,.journal-list{min-width:0;max-width:100%;box-sizing:border-box}
  img,textarea,select,button{max-width:100%;box-sizing:border-box}
  .hero{border-radius:20px}
  .hero-logo{width:100%;height:clamp(220px,64vw,270px)!important;object-fit:contain!important}
  .hero-copy{padding:18px}
  .hero-copy h1{font-size:28px;line-height:1.22}
  .hero-copy p{font-size:17px;line-height:1.5}
  .status-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:100%;max-width:100%;overflow:visible;padding:14px 0 3px}
  .status-row .pill{width:100%;min-width:0;white-space:normal;text-align:center;overflow-wrap:anywhere;padding:9px 5px;font-size:14px;line-height:1.3}
  #homeView .module-grid{width:100%;max-width:100%;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;margin-top:16px}
  #homeView .module{width:100%;min-width:0;min-height:120px;padding:15px 13px;border-radius:17px;justify-content:center;overflow-wrap:normal;word-break:normal}
  #homeView .module strong{font-size:19px;line-height:1.28;overflow-wrap:anywhere}
  #homeView .module span{font-size:16px;line-height:1.4;overflow-wrap:anywhere}
  .card{padding:18px}
  .section-head{gap:10px;flex-wrap:wrap;margin-bottom:14px}
  .section-head>div{min-width:0;flex:1}
  .section-head h1{font-size:27px;line-height:1.25;overflow-wrap:anywhere}
  .section-head p{font-size:16px;line-height:1.45}
  #translatorView .translator-grid{width:100%;max-width:100%;min-width:0;grid-template-columns:minmax(0,1fr);gap:14px;padding:16px}
  #translatorView .translator-grid>*{min-width:0;max-width:100%}
  #translatorView .language-row{grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr);gap:6px}
  #translatorView .language-row select{width:100%;min-width:0;min-height:50px;padding:9px 6px;font-size:15px}
  #translatorView .swap-btn{width:42px;min-height:50px;padding:6px}
  #translatorView .tone-select{width:100%;min-height:50px;padding:11px;font-size:16px}
  #translatorView .translate-box{display:block;width:100%;min-width:0;max-width:100%;min-height:145px;padding:14px;font-size:17px;line-height:1.5;resize:vertical}
  #translatorView .translate-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  #translatorView .translate-actions>*{min-width:0;max-width:100%;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;text-align:center}
  #translatorView .translate-actions>*:last-child:nth-child(odd){grid-column:1/-1;justify-self:center;width:calc(50% - 4px)}
  #translatorView .action-btn,#translatorView .voice-btn{width:100%;min-height:54px;padding:10px 7px;font-size:15px;line-height:1.25}
  #translatorView .voice-btn{font-size:24px}
  #translatorView .conversation-toggle{min-width:0;max-width:100%;align-items:flex-start;gap:9px;font-size:16px;line-height:1.45}
  #translatorView .conversation-toggle input{flex:0 0 22px;margin-top:1px}
  #translatorView .translation-status{font-size:16px;line-height:1.45;overflow-wrap:anywhere}
  .messages{min-height:42vh;max-height:55vh}
  .composer{gap:8px;bottom:78px}
  .composer textarea{min-width:0;font-size:16px}
  .bottom-nav{position:fixed;left:0;right:0;bottom:0;transform:none;width:100%;max-width:100%;height:calc(76px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);grid-template-columns:repeat(5,minmax(0,1fr));overflow:hidden;box-sizing:border-box}
  .bottom-nav .nav-btn{width:100%;min-width:0;padding:0 2px;gap:4px;overflow:hidden;font-size:21px}
  .bottom-nav .nav-btn span{display:block;width:100%;min-width:0;font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  button,select,textarea{touch-action:manipulation}
  button:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--gold2);outline-offset:2px}
}
@media(max-width:360px){
  main{padding:14px 12px}
  #homeView .module-grid{gap:9px}
  #homeView .module{min-height:116px;padding:13px 10px}
  #homeView .module strong{font-size:18px}
  #homeView .module span{font-size:15px}
  #translatorView .language-row{grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);gap:4px}
  #translatorView .swap-btn{width:38px}
  #translatorView .language-row select{font-size:14px}
  .bottom-nav .nav-btn span{font-size:11px}
}



/* Keep the first screen short enough to reach the main actions without hunting. */
@media(max-width:679px){
  #homeView .hero-logo{height:clamp(150px,44vw,190px)!important}
  #homeView .hero-copy{padding:12px 16px 15px}
  #homeView .hero-copy h1{font-size:23px;line-height:1.2}
  #homeView .hero-copy p{font-size:15px;line-height:1.4}
  #homeView .module-grid{gap:10px}
  #homeView .module{min-height:104px;padding:13px 12px}
  #homeView .module strong{font-size:18px;line-height:1.25}
  #homeView .module span{font-size:15px;line-height:1.35}
}



/* Startseite: offenes Markenbild, separates scharfes UI-Textlayout. */
#homeView .hero{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;padding:8px 0 4px!important}
#homeView .hero:after{display:none!important}
#homeView .hero-main{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(128px,.8fr)!important;gap:8px!important;align-items:center!important;max-width:740px;margin:0 auto}
#homeView .hero-logo{display:block!important;width:100%!important;max-height:250px!important;height:auto!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;background:transparent!important;border-radius:0!important}
#homeView .hero-features{list-style:none!important;margin:0!important;padding:4px 0 4px 15px!important;border-left:1px solid rgba(242,198,109,.48);display:grid!important;gap:7px!important;align-content:center!important;min-width:0}
#homeView .hero-features li{position:relative;color:var(--gold2);font-size:clamp(14px,3.7vw,17px);line-height:1.18;font-weight:650;overflow-wrap:anywhere}
#homeView .hero-features li:before{content:"";position:absolute;left:-19px;top:.45em;width:7px;height:7px;border-radius:50%;background:var(--gold);box-shadow:0 0 9px rgba(242,198,109,.65)}
#homeView .hero-copy{text-align:center;padding:4px 8px 8px!important;position:relative;z-index:1}
#homeView .hero-copy h1{font-size:clamp(29px,7.2vw,40px)!important;line-height:1.12!important;letter-spacing:.035em;color:var(--gold2)!important;margin:3px 0 7px!important}
#homeView .hero-copy p{font-size:16px!important;line-height:1.4!important;color:var(--muted)!important}
#homeView .hero-copy .hero-motto{margin-top:7px!important;color:var(--gold2)!important;font-size:15px!important;line-height:1.4!important}
@media(min-width:680px){
 #homeView .hero{padding:12px 0 8px!important}
 #homeView .hero-main{grid-template-columns:minmax(0,1.2fr) minmax(205px,.8fr)!important;gap:18px!important}
 #homeView .hero-logo{max-height:350px!important}
 #homeView .hero-features{gap:10px!important;padding-left:18px!important}
 #homeView .hero-features li{font-size:19px}
 #homeView .hero-copy h1{font-size:42px!important}
 #homeView .hero-copy p{font-size:18px!important}
 #homeView .hero-copy .hero-motto{font-size:17px!important}
}
@media(max-width:360px){
 #homeView .hero-main{grid-template-columns:minmax(0,1.15fr) minmax(124px,.85fr)!important;gap:5px!important}
 #homeView .hero-features{padding-left:13px!important;gap:6px!important}
 #homeView .hero-features li{font-size:13px}
 #homeView .hero-copy p{font-size:15px!important}
 #homeView .hero-copy .hero-motto{font-size:14px!important}
}

/* v1.9.7: einheitliche, gut lesbare Startseite auf schmalen Displays. */
@media(max-width:679px){
  #homeView .hero-main{grid-template-columns:minmax(0,1.12fr) minmax(122px,.88fr)!important;gap:7px!important}
  #homeView .hero-logo{max-height:clamp(170px,51vw,220px)!important}
  #homeView .hero-features{gap:7px!important;padding-left:15px!important}
  #homeView .hero-features li{font-size:clamp(14px,3.8vw,16px);line-height:1.22;overflow-wrap:normal;word-break:normal}
  #homeView .hero-copy h1{font-size:clamp(32px,8vw,40px)!important;line-height:1.15!important}
  #homeView .hero-copy p{font-size:16px!important;line-height:1.45!important}
  #homeView .hero-copy .hero-motto{font-size:15px!important;line-height:1.4!important}
  #homeView .module-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:10px}
  #homeView .module{min-width:0;min-height:96px;padding:10px 11px;border-radius:15px;gap:5px;overflow:hidden}
  #homeView .module strong{font-size:16px;line-height:1.25;overflow-wrap:anywhere}
  #homeView .module span{font-size:14px;line-height:1.32;overflow-wrap:anywhere}
}
@media(max-width:360px){
  #homeView .hero-main{grid-template-columns:minmax(0,1.08fr) minmax(118px,.92fr)!important;gap:6px!important}
  #homeView .hero-features{gap:6px!important;padding-left:13px!important}
  #homeView .hero-features li{font-size:13px;line-height:1.2}
  #homeView .module-grid{gap:8px}
  #homeView .module{min-height:92px;padding:9px 8px}
  #homeView .module strong{font-size:15px}
  #homeView .module span{font-size:13px}
}



@media(max-width:679px){
 .topbar{grid-template-columns:42px minmax(0,1fr) auto 42px!important;gap:6px!important;padding:0 10px!important}
 .brand{justify-self:center;gap:5px!important}.brand img{width:32px!important;height:32px!important}.brand span{font-size:14px!important}
 .language-picker{min-width:55px!important;padding:8px 5px!important}#installBtn{width:38px;height:40px;font-size:18px}
 #homeView .hero{padding:14px 0 8px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}
 #homeView .hero:after{display:none!important}
 #homeView .hero-main{display:grid!important;grid-template-columns:minmax(68px,.9fr) minmax(0,1.55fr) minmax(88px,1.05fr)!important;gap:4px!important;align-items:center!important;width:100%;margin:0 auto}
 #homeView .hero-logo{width:100%!important;height:clamp(160px,48vw,218px)!important;max-height:none!important;object-fit:contain!important;object-position:center!important;background:transparent!important}
 #homeView .hero-ideas{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px;color:var(--gold2);font-size:clamp(11px,3.35vw,14px);font-weight:750;line-height:1.28;overflow-wrap:anywhere}
 #homeView .hero-ideas i{width:35%;height:1px;background:var(--gold);opacity:.8}#homeView .hero-ideas b{font-size:20px;color:var(--gold);line-height:1}
 #homeView .hero-features{border-left:1px solid rgba(242,198,109,.5)!important;padding:3px 0 3px 9px!important;gap:7px!important}
 #homeView .hero-features li{font-size:clamp(11px,3.45vw,14px)!important;line-height:1.2!important;font-weight:700!important;overflow-wrap:anywhere!important}
 #homeView .hero-features li:before{width:5px!important;height:5px!important;left:-12px!important;top:.42em!important}
 #homeView .hero-copy{text-align:center!important;padding:2px 6px 8px!important}
 #homeView .hero-copy h1{font-size:clamp(38px,11vw,52px)!important;line-height:1.08!important;letter-spacing:.035em!important;margin:4px 0 8px!important;text-shadow:0 0 18px rgba(242,198,109,.25)}
 #homeView .hero-copy p{font-size:clamp(16px,4.7vw,20px)!important;line-height:1.45!important}
 #homeView .hero-copy .hero-motto{font-size:clamp(14px,4vw,17px)!important;margin-top:10px!important;color:var(--gold2)!important}
 #homeView .hero-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:16px 0 10px;border-top:1px solid rgba(242,198,109,.25);border-bottom:1px solid rgba(242,198,109,.25);padding:12px 0 10px}
 #homeView .hero-actions>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center;color:var(--gold2);font-size:clamp(9px,2.9vw,12px);font-weight:700;line-height:1.2;min-width:0}
 #homeView .hero-actions>div+div{border-left:1px solid rgba(242,198,109,.23)}#homeView .hero-actions b{font-size:clamp(24px,7vw,31px);line-height:1;color:var(--gold)}
 #homeView .hero-signoff{text-align:center;text-transform:uppercase;letter-spacing:.12em;color:var(--gold2);font-size:clamp(9px,2.8vw,12px);line-height:1.6;margin:8px 0 3px}
}
@media(min-width:680px){
 #homeView .hero{padding:22px 0 12px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}#homeView .hero:after{display:none!important}
 #homeView .hero-main{display:grid!important;grid-template-columns:minmax(110px,.72fr) minmax(280px,1.7fr) minmax(155px,.94fr)!important;gap:14px!important;align-items:center!important;max-width:760px;margin:auto}
 #homeView .hero-logo{width:100%!important;height:340px!important;max-height:none!important;object-fit:contain!important;background:transparent!important}
 #homeView .hero-ideas{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;color:var(--gold2);font-size:16px;font-weight:750;line-height:1.35}
 #homeView .hero-ideas i{width:45%;height:1px;background:var(--gold)}#homeView .hero-ideas b{font-size:26px;color:var(--gold)}
 #homeView .hero-features{padding-left:18px!important;gap:11px!important}#homeView .hero-features li{font-size:17px!important}
 #homeView .hero-copy{text-align:center!important}#homeView .hero-copy h1{font-size:54px!important}#homeView .hero-copy p{font-size:21px!important}#homeView .hero-copy .hero-motto{font-size:18px!important;color:var(--gold2)!important}
 #homeView .hero-actions{display:grid;grid-template-columns:repeat(4,1fr);max-width:680px;margin:20px auto 12px;padding:14px 0;border-top:1px solid rgba(242,198,109,.25);border-bottom:1px solid rgba(242,198,109,.25)}
 #homeView .hero-actions>div{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--gold2);font-weight:700}#homeView .hero-actions>div+div{border-left:1px solid rgba(242,198,109,.23)}#homeView .hero-actions b{font-size:32px;color:var(--gold)}
 #homeView .hero-signoff{text-align:center;text-transform:uppercase;letter-spacing:.15em;color:var(--gold2);margin:12px 0;font-size:13px}
}



/* Use the confirmed, borderless black-background home image as the app start. */
.home-art{width:min(100%,620px);margin:16px auto 18px;background:#020b18;overflow:hidden}
.home-art img{display:block;width:100%;height:auto;object-fit:contain;background:#020b18}
@media(max-width:679px){
  #homeView .home-art{width:auto;margin:-16px -16px 14px}
  #homeView .home-art img{width:100%;height:auto;max-width:none}
  #homeView .status-row{margin-top:0}
}



.composer textarea {min-width:0}
.chat-mic{flex:0 0 48px;min-height:52px;border:1px solid rgba(242,198,109,.65);border-radius:16px;background:#163757;color:#ffe4a5;font-size:23px;cursor:pointer;touch-action:manipulation}
.chat-mic.is-recording{background:#8b2335;color:#fff;border-color:#ff657b;animation:voicePulse 1.4s infinite}
.chat-mic:disabled{opacity:.65;cursor:progress}
.send-btn{flex:0 0 52px;min-height:52px}
.chat-voice-status{margin:4px 0 16px;padding:0 4px;min-height:0;color:var(--gold2);font-size:13px;line-height:1.4}
.chat-voice-status:empty{display:none}
@keyframes voicePulse{50%{box-shadow:0 0 0 5px rgba(255,82,117,.20)}}
@media(max-width:380px){.chat-mic{flex-basis:44px}.send-btn{flex-basis:48px}.composer{gap:7px}}



/* Screen-center YORYI KI on all viewports: independent of unequal left/right controls. */
.topbar{position:sticky!important;display:flex!important;align-items:center!important;
  justify-content:space-between!important;gap:8px!important;padding:0 10px!important}
.topbar #menuBtn{flex:0 0 42px!important;position:relative;z-index:2}
.topbar .brand{position:absolute!important;left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;display:flex!important;align-items:center!important;
  justify-content:center!important;gap:5px!important;margin:0!important;white-space:nowrap!important;
  z-index:1;pointer-events:none}
.topbar .brand img{width:32px!important;height:32px!important;flex:none}
.topbar .brand span{display:block!important;font-size:14px!important;line-height:1.1!important;letter-spacing:.015em!important}
.topbar .top-actions{display:flex!important;align-items:center!important;gap:6px!important;
  margin-left:auto!important;flex:0 0 auto!important;position:relative;z-index:2}
.topbar .top-actions .language-picker{min-width:62px!important;width:auto!important}
.topbar .top-actions #installBtn{flex:0 0 38px!important;width:38px!important}
@media(max-width:359px){
  .topbar{padding:0 7px!important;gap:4px!important}
  .topbar #menuBtn{flex-basis:38px!important;width:38px!important}
  .topbar .brand{gap:3px!important}
  .topbar .brand img{width:26px!important;height:26px!important}
  .topbar .brand span{font-size:12px!important}
  .topbar .top-actions{gap:4px!important}
  .topbar .top-actions .language-picker{min-width:52px!important;max-width:56px!important;padding:8px 2px!important}
  .topbar .top-actions #installBtn{flex-basis:34px!important;width:34px!important}
}



/* 1: mobile logo, visually centered and not covered by buttons. */
#installBtn{display:none}
.topbar{overflow:visible;isolation:isolate}
.topbar .brand{max-width:calc(100% - 180px);white-space:nowrap}
.topbar .brand span{font-size:clamp(16px,4.5vw,21px)!important;font-weight:900;letter-spacing:.04em}
.topbar .brand img{width:30px!important;height:30px!important}
@media(max-width:379px){.topbar .brand{max-width:calc(100% - 156px)}.topbar .brand span{font-size:16px!important}.topbar .brand img{width:25px!important;height:25px!important}.topbar .top-actions .language-picker{max-width:64px!important;min-width:60px!important}}
/* 2/3: chat dictation stays beside the editor, text remains in the editor. */
.composer{z-index:14;min-width:0;align-items:stretch}
.composer textarea{font-size:16px;line-height:1.35;min-width:0;max-height:135px}
.chat-mic{display:flex;align-items:center;justify-content:center;flex-shrink:0;visibility:visible}
/* 4: navigation remains reachable above mobile safe-area; never obscures controls. */
.bottom-nav{z-index:20;bottom:0}
.app-shell{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
/* Mobile virtual keyboard: the nav is hidden during editing; the input stays visible. */
body.yoryi-keyboard-open .bottom-nav{display:none!important}
body.yoryi-keyboard-open .composer{bottom:6px!important}
@media(max-width:679px){.bottom-nav .nav-btn{min-height:48px}.composer{bottom:calc(78px + env(safe-area-inset-bottom))}}



:root{--header-height:68px;--nav-height:76px;--hosting-footer:54px}
/* Keep one document scroller, so the header stays above page content. */
html{overflow-x:clip;scroll-padding-top:calc(var(--header-height) + 16px)}
body{overflow:visible;padding-bottom:0}
.app-shell{overflow:visible;padding-bottom:calc(var(--nav-height) + var(--hosting-footer) + env(safe-area-inset-bottom) + 24px)}
.topbar{height:calc(var(--header-height) + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)!important;top:0;background:#061629}
.topbar .brand{top:calc(50% + env(safe-area-inset-top)/2)!important}
.topbar .brand .header-globe{display:block!important;width:34px!important;height:34px!important;border-radius:50%;background-image:radial-gradient(circle at 30% 28%,rgba(255,239,175,.3),transparent 42%,rgba(0,6,21,.86) 100%),url('/earth-texture-yoryi.jpg?v=2268');background-size:100% 100%,200% 100%;background-position:0 0,0% 50%;box-shadow:inset -5px -3px 8px #000b,inset 1px 0 3px #b8e6ff,0 0 12px #3a9de677;animation:headerEarthSpin 45s linear infinite}
@keyframes headerEarthSpin{to{background-position:0 0,200% 50%}}
@media(prefers-reduced-motion:reduce){.topbar .brand .header-globe{animation:none}}
#homeView .home-art{margin:4px auto 16px;overflow:visible}
#homeView .home-art img{width:100%;height:auto;object-fit:contain;max-height:calc(100svh - var(--header-height) - var(--nav-height) - var(--hosting-footer) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)}
@media(max-width:679px){#homeView .home-art{width:auto;margin:-12px -16px 16px}}
.view{scroll-margin-top:calc(var(--header-height) + 16px)}
.bottom-nav{bottom:calc(var(--hosting-footer) + env(safe-area-inset-bottom));height:var(--nav-height);padding-bottom:0}
/* Give Netlify's injected badge its own footer, outside the navigation. */
body::after{content:"";position:fixed;bottom:0;left:0;right:0;height:calc(var(--hosting-footer) + env(safe-area-inset-bottom));background:#04101f;z-index:19;pointer-events:none}
#nl-badge-frame{bottom:calc(env(safe-area-inset-bottom) - 7px)!important;right:0!important}
.composer{bottom:calc(var(--nav-height) + var(--hosting-footer) + env(safe-area-inset-bottom) + 8px)}
body.yoryi-keyboard-open::after,body.yoryi-keyboard-open #nl-badge-frame{display:none!important}



#homeView .localized-art{position:relative;margin:auto;container-type:inline-size;width:min(100%,calc((100svh - var(--header-height) - var(--nav-height) - var(--hosting-footer) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px) * 2 / 3));max-width:620px}
#homeView .localized-art img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:2/3}
.start-left,.start-right{position:absolute;inset:0;pointer-events:none;color:#ffe39a;font-family:Georgia,'Times New Roman',serif;font-weight:700;text-shadow:0 1px 2px #000,0 0 5px #ac793a44}
.start-left span{position:absolute;left:1%;width:28%;text-align:center;white-space:pre-line;font-size:4.7cqw;line-height:1.13}
.start-intelligence{top:16.1%}.start-ideas{top:30.4%}.start-possibilities{top:44%}
.start-left .start-possibilities{font-size:4.3cqw}
.start-right{left:79%;right:.8%;top:14.4%;bottom:auto;height:33.7%;display:grid;grid-template-rows:repeat(7,1fr);align-items:center;font-size:3.85cqw;line-height:1.05;letter-spacing:-.035em}
.start-right span{display:block;min-width:0;max-width:100%;white-space:nowrap}
html[lang="de"] .start-right [data-i18n="heroTranslations"],html[lang="es-DO"] .start-right [data-i18n="heroTranslations"]{font-size:3.4cqw}
html[lang="es-DO"] .start-left .start-possibilities{font-size:4cqw}



:root{--header-height:56px;--nav-height:72px;--hosting-footer:34px;--stage-height:calc(100dvh - var(--header-height) - var(--nav-height) - var(--hosting-footer) - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
html,body{height:100%;overflow:hidden}
.app-shell{height:100vh;height:100dvh;min-height:0;display:grid;grid-template-rows:calc(var(--header-height) + env(safe-area-inset-top)) minmax(0,1fr) var(--nav-height) calc(var(--hosting-footer) + env(safe-area-inset-bottom));padding:0!important;overflow:hidden}
.topbar{position:relative!important;top:auto;grid-row:1;height:100%;min-height:0}
.topbar .brand .header-globe{width:calc(var(--header-height) - 6px)!important;height:calc(var(--header-height) - 6px)!important}
main{grid-row:2;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;padding:0 16px 16px;overscroll-behavior-y:contain;scroll-padding-top:16px}
main::-webkit-scrollbar{display:none}
@media(max-width:679px){:root{--header-height:clamp(52px,calc(100dvh - var(--nav-height) - var(--hosting-footer) - 150vw - env(safe-area-inset-top) - env(safe-area-inset-bottom)),90px)}}
.view:not(#homeView){padding-top:16px}
#homeView .home-art{height:var(--stage-height);margin:0 auto 16px;display:grid;place-items:center;background:#020b18}
#homeView .localized-art{width:min(100%,calc(var(--stage-height) * 2 / 3));max-width:620px}
@media(max-width:679px){#homeView .home-art{width:auto;margin:0 -16px 16px}}
.start-right{right:2.5%;min-width:0;font-size:3.6cqw;letter-spacing:-.035em}
html[lang="de"] .start-right [data-i18n="heroTranslations"],html[lang="es-DO"] .start-right [data-i18n="heroTranslations"]{font-size:3cqw}
.start-left span,.start-right span{overflow-wrap:normal;word-break:normal}
.bottom-nav{grid-row:3;position:relative;left:auto;right:auto;bottom:auto;transform:none;width:100%;height:100%;max-width:none;padding:0}
#nl-badge-frame{bottom:calc(env(safe-area-inset-bottom) - 6px)!important;right:0!important;transform:scale(.65)!important;transform-origin:bottom right!important}
body::after{height:calc(var(--hosting-footer) + env(safe-area-inset-bottom))}
.composer{bottom:8px!important}
body.yoryi-keyboard-open .app-shell{grid-template-rows:calc(var(--header-height) + env(safe-area-inset-top)) minmax(0,1fr)}
body.yoryi-keyboard-open main{padding-bottom:8px}


/* conversation.css */
#conversationStart{width:100%;display:flex;align-items:center;justify-content:center;gap:12px;font-size:21px;font-weight:800;padding:20px;border-radius:20px;border:1px solid #f2c66d;background:linear-gradient(125deg,#ffe5a0,#d8a344);color:#07182c;box-shadow:0 8px 30px #e1b35b22;cursor:pointer}
#conversation[hidden]{display:none!important}
#conversation{position:fixed;inset:0;z-index:9999;background:#04101f;color:#fff4d8;display:grid;grid-template-rows:minmax(0,1fr) 48px minmax(0,1fr);height:100%;height:100dvh;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);box-sizing:border-box}
.conv-side{min-height:0;padding:12px 18px;display:flex;flex-direction:column;gap:8px;background:radial-gradient(ellipse at 50% 100%,#173d64 0%,#071a30 58%,#04101f 100%);overflow:hidden}
.conv-side.opposite{transform:rotate(180deg)}
.conv-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0}.conv-head select{max-width:70%;font-size:20px;font-weight:700;padding:8px 12px;border-radius:12px;border:1px solid #f2c66d77;background:#0a2139;color:#ffe3a0;min-height:46px}.conv-replay{font-size:23px;min-width:54px;min-height:46px;border:1px solid #f2c66d66;border-radius:12px;background:#0a2139;color:#ffe3a0}.conv-replay:disabled{opacity:.4}
.conv-copy{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 2px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:clamp(21px,5.4vw,30px);line-height:1.35}.conv-copy.placeholder{color:#acbecf;font-size:19px}.conv-original{color:#afc3d6;font-size:15px;line-height:1.3;max-height:36px;overflow:auto;margin:0;white-space:pre-wrap;flex-shrink:0}.conv-status{font-size:16px;min-height:21px;color:#ead7a7;flex-shrink:0}.conv-status.error{color:#ffb9b9}
.conv-mic{display:flex;align-items:center;justify-content:center;gap:16px;flex-shrink:0;min-height:76px;width:100%;border:1px solid #ffdfa1;border-radius:22px;background:linear-gradient(125deg,#ffe5a0,#d8a344);color:#07182c;font-size:23px;font-weight:800;cursor:pointer;box-shadow:0 5px 25px #d7ac4e22;touch-action:manipulation}.conv-mic svg{width:32px;height:36px;fill:currentColor}.conv-mic.listening{background:#9c2848;color:#fff;box-shadow:0 0 0 3px #ffcc7a55}.conv-mic:disabled{opacity:.55;cursor:wait}.conv-mic:focus-visible,.conv-replay:focus-visible,#convClose:focus-visible{outline:3px solid #fff;outline-offset:2px}
.conv-divider{display:flex;align-items:center;justify-content:space-between;border-block:1px solid #f2c66d66;padding:0 14px;background:#04101f;gap:8px;color:#ffe3a0;font-size:14px;letter-spacing:.04em}.conv-brand{display:flex;align-items:center;gap:8px}.conv-brand img{width:31px;height:31px;border-radius:50%;object-fit:cover}#convClose{border:1px solid #f2c66d66;border-radius:10px;background:#0a2139;color:#ffe3a0;font-size:17px;min-height:38px;padding:5px 12px}
@media(max-height:650px){.conv-side{padding:6px 12px;gap:4px}.conv-mic{min-height:58px;font-size:21px}.conv-head select,.conv-replay{min-height:40px;padding:4px 8px}.conv-copy{font-size:21px}.conv-original{max-height:22px}.conv-status{font-size:14px;min-height:18px}}
@media(orientation:landscape) and (max-height:600px){#conversation{grid-template-rows:minmax(0,1fr) 42px minmax(0,1fr)}.conv-side{display:grid;grid-template-columns:1fr 190px;grid-template-rows:40px 1fr 22px;gap:3px 12px}.conv-head{grid-column:1}.conv-copy{grid-column:1;grid-row:2}.conv-original{display:none}.conv-status{grid-column:1;grid-row:3}.conv-mic{grid-column:2;grid-row:1/4;align-self:stretch}}

/* Full-width, high-contrast exit bar between both speakers. */
#conversation{grid-template-rows:minmax(0,1fr) 68px minmax(0,1fr)}
.conv-divider{justify-content:center;padding:0;gap:0;border:0}
.conv-divider .conv-brand{display:none}
#convClose{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0;margin:0;padding:8px 12px;border:0;border-radius:0;background:linear-gradient(125deg,#ffe5a0,#d8a344);color:#07182c;font-size:26px;font-weight:900;line-height:1.2;text-align:center;white-space:normal;overflow-wrap:anywhere;cursor:pointer;touch-action:manipulation}
#convClose:focus-visible{outline:3px solid white;outline-offset:-4px}
@media(max-width:350px){#convClose{font-size:24px}}
@media(orientation:landscape) and (max-height:600px){#conversation{grid-template-rows:minmax(0,1fr) 60px minmax(0,1fr)}}

/* Readable text on both speaker panels; reserve space by slimming the exit bar. */
#conversation{grid-template-rows:minmax(0,1fr) 48px minmax(0,1fr)}
#convClose{font-size:23px;padding:6px 10px}
.conv-copy,.conv-copy.placeholder{font-size:clamp(26px,6.6vw,34px);line-height:1.4}
.conv-original{font-size:24px;line-height:1.4;max-height:3.0em}
.conv-status{font-size:18px;line-height:1.3;min-height:24px}
@media(max-height:650px){.conv-original{max-height:1.5em}.conv-status{font-size:16px;min-height:21px}}
@media(orientation:landscape) and (max-height:600px){#conversation{grid-template-rows:minmax(0,1fr) 44px minmax(0,1fr)}.conv-side{grid-template-rows:40px minmax(0,1fr) 24px}.conv-copy,.conv-copy.placeholder{font-size:26px}}

/* Large conversation text without an instructional placeholder. */
.conv-copy,.conv-copy.placeholder,.conv-original{font-size:clamp(28px,7.2vw,36px);line-height:1.4}
.conv-original{max-height:4.2em}
.conv-original:empty{display:none}
@media(max-height:650px){.conv-original{max-height:2.8em}}
/* Conversation: the latest sentence, spoken or translated, in one large scroller. */
#conversation .conv-reading{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;overflow-anchor:none}
#conversation .conv-copy{flex:none;min-height:0;overflow:visible}
@media(orientation:landscape) and (max-height:600px){#conversation .conv-reading{grid-column:1;grid-row:2}}




.translate-field{position:relative;min-width:0;width:100%;border:1px solid var(--line);border-radius:18px;background:#071a30}
#translatorView .translate-field .translate-box{
 display:block;width:100%;min-height:210px;padding:16px;
 border:0;border-radius:0 0 17px 17px;
 font-size:24px;font-weight:500;line-height:1.6
}
#translatorView .translate-field .translate-box::placeholder{color:#becddd;opacity:1}
.translate-field:focus-within{outline:2px solid var(--gold2);outline-offset:2px}
.translate-field-label{
 position:static;
 display:block;padding:12px 16px;margin:0;
 font-size:20px;font-weight:650;letter-spacing:.2px;line-height:1.4;
 color:#f3cc79;background:#071a30;border-radius:17px 17px 0 0;
 border-bottom:1px solid rgba(242,198,109,.19);pointer-events:none;
 white-space:normal;overflow-wrap:anywhere
}
.translate-field:has(.translate-box.output) .translate-field-label{background:#0c2743}



#chatView .bubble{font-size:24px;font-weight:500;line-height:1.6;max-width:96%;overflow-wrap:anywhere}
#chatView .meta{font-size:16px;line-height:1.4}
#chatView .chat-source-links{font-size:18px;line-height:1.5}
#chatView.active{display:flex;flex-direction:column;height:calc(100dvh - var(--header-height) - var(--nav-height) - var(--hosting-footer) - 40px);min-height:580px}
#chatView .section-head{display:block;position:relative;flex-shrink:0}
#chatView .section-head h1{padding-right:140px}
#chatView #clearChatBtn{position:absolute;right:0;top:0}
#chatView .messages{flex:1;min-height:140px;max-height:none}
#chatView .section-head p{font-size:18px;line-height:1.5}
#chatView #clearChatBtn{font-size:18px;line-height:1.3;min-height:48px}
#chatView .composer{position:static;flex-shrink:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;background:#04101f;padding-top:12px}
#chatView .composer textarea{grid-column:1/-1;width:100%;min-height:156px;max-height:300px;padding:16px;font-size:24px;font-weight:500;line-height:1.6;resize:vertical;overflow:auto}
#chatView .composer textarea::placeholder{color:#becddd;opacity:1}
#chatView .composer .chat-mic,#chatView .composer .send-btn{width:100%;min-height:56px;font-size:28px}
#chatView .chat-voice-status{font-size:18px;line-height:1.5}
@media(max-height:550px){#chatView .composer textarea{min-height:112px;max-height:180px}#chatView .messages{min-height:100px}}



/* Give answers the available space; retain the approved composer. */
#chatView.active{height:100%;min-height:560px;padding-top:8px;box-sizing:border-box}
#chatView .section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
#chatView .section-head h1{font-size:28px;line-height:1.2;padding:0;margin:0}
#chatView .section-head p{display:none}
#chatView #clearChatBtn{position:static;flex-shrink:0;font-size:16px;min-height:42px;padding:8px 12px}
#chatView .messages{min-height:240px;padding:4px 0 12px;scrollbar-width:thin;scrollbar-color:#d8a344 #071a30}
#chatView .message.ai .bubble{width:100%;max-width:100%;padding:18px;font-size:26px;line-height:1.55;background:#0a2139;border-color:#38516a;white-space:pre-wrap}
#chatView .message.ai{margin:4px 0 18px}
#chatView .message.user .bubble{font-size:24px;line-height:1.5;white-space:pre-wrap}
#chatView .chat-source-links{white-space:normal}
#chatView .meta{white-space:normal}
@media(max-height:550px){#chatView.active{min-height:500px}}


/* assistant.css */
.assistant-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}.assistant-bar select{min-width:0;max-width:100%;flex:1;font-size:17px;padding:8px;background:#0a2038;color:#fff;border:1px solid #b88942;border-radius:10px}.assistant-status{font-size:16px;color:#dfc17d;line-height:1.4}.assistant-memory{font-size:22px;line-height:1.55;overflow-wrap:anywhere}.assistant-memory .entry{border:1px solid #31516f;border-radius:14px;margin:12px 0;padding:14px}.assistant-memory .pending{border-color:#e1ad52}.assistant-memory button,.assistant-controls button{font-size:17px;padding:10px 14px;margin:5px 8px 5px 0;min-height:44px}.assistant-memory textarea,.assistant-memory select{width:100%;font-size:20px;padding:12px;margin:8px 0;background:#0a2038;color:#fff;border:1px solid #50708c;border-radius:10px;box-sizing:border-box}.assistant-memory textarea{min-height:110px}.assistant-memory small{display:block;font-size:15px;color:#abc1d8}.assistant-memory details{margin-top:12px}.assistant-memory summary{cursor:pointer;color:#eac785}.assistant-memory pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px}.assistant-memory .row{display:flex;flex-wrap:wrap;gap:6px}.assistant-pending{color:#eac785;font-size:18px}#chatView .messages .bubble{white-space:pre-wrap}#chatView .messages a{overflow-wrap:anywhere}#chatView .assistant-bar{flex-shrink:0}#chatView .assistant-status{min-height:22px}#chatView .messages{min-height:140px}.assistant-journal{border-bottom:1px solid #31516f;padding:12px 0;font-size:18px}
.message.ai .bubble{white-space:normal!important}.bubble p{margin:0 0 .7em}.bubble p:last-child{margin-bottom:0}.bubble pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#061526;padding:12px;border-radius:10px}.bubble code{font-size:.85em}.bubble ul,.bubble ol{padding-left:1.3em}.bubble table{border-collapse:collapse;display:block;max-width:100%;overflow:auto}.bubble td,.bubble th{border:1px solid #385772;padding:6px}.bubble a{color:#efd49c}

.remember-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}.remember-actions button{min-height:44px;padding:8px 12px;font-size:14px}.remember-actions [role=status]{font-size:13px}.saved-info-body{white-space:pre-wrap;overflow-wrap:anywhere;max-height:50vh;overflow:auto}.assistant-memory textarea{box-sizing:border-box;width:100%;min-height:110px}.assistant-memory details{margin:12px 0}.assistant-memory summary{cursor:pointer;padding:10px 0}.assistant-memory .entry{overflow-wrap:anywhere}.assistant-memory .row button{min-height:44px}

.own-info>summary{font-size:19px;font-weight:700}.reminder-device{font-size:17px}.reminder-device p{line-height:1.5}.reminder-entry{font-size:16px;border-top:1px solid #31516f;margin-top:14px;padding-top:6px}.reminder-summary{color:#ffe3a0}.reminder-time label{display:block;margin:8px 0}.reminder-time input{box-sizing:border-box;width:100%;max-width:100%;padding:12px;font:inherit;color:inherit;background:#0a2038;border:1px solid #50708c;border-radius:10px;min-height:44px}.reminder-check{display:flex;align-items:center;gap:8px;font-size:18px}.reminder-check input{width:22px;height:22px;flex:0 0 auto}.reminder-time[hidden]{display:none}.reminder-time small{font-size:14px}


/* v2.2.9: requested stronger delete label in translator only. */
#translatorView #clearTranslation{font-weight:900;-webkit-text-stroke:0.25px currentColor}


/* chat-layout.css */
/* v2.2.3 — ChatGPT-style mobile conversation layout.
   Scoped to normal AI chat. Translator and two-person voice mode are untouched. */
body:has(#chatView.active){--header-height:64px;--nav-height:64px}
main:has(> #chatView.active){display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:0 12px 6px;}
#chatView.active{
  display:flex;flex-direction:column;flex:1 1 auto;min-height:0!important;
  height:100%!important;overflow:hidden;padding-top:8px;gap:0;
}
#chatView .section-head{
  display:flex;align-items:center;justify-content:space-between;
  flex:0 0 auto;gap:8px;margin:0 0 6px;padding:0;
}
#chatView .section-head h1{font-size:22px;line-height:1.25;margin:0;padding:0}
#chatView .section-head p{display:none}
#chatView #clearChatBtn{position:static;font-size:18px;font-weight:900;-webkit-text-stroke:.3px currentColor;color:#ffe3a0;border:2px solid #d8b66d;min-height:44px;line-height:1.25;padding:9px 14px;border-radius:13px;white-space:nowrap;max-width:72%}
/* The globe animates only while an actual request is pending. */
#chatView .section-head{display:grid;grid-template-columns:auto minmax(40px,1fr) auto}
#chatView #clearChatBtn{max-width:none;white-space:normal}
#chatView .chat-working{position:relative;justify-self:center;display:grid;place-items:center;width:100%;height:44px;min-width:40px;flex-shrink:0}
#chatView .chat-working-sphere{display:block;width:30px;height:30px;border-radius:50%;background:#0b3158 url('earth-texture-yoryi.jpg') 0 50%/auto 100%;box-shadow:inset -6px -3px 8px #020c20b3,inset 2px 1px 4px #ffffff44,0 0 8px #52baff55}
#chatView .chat-working-orbit{position:absolute;inset:0;overflow:hidden;pointer-events:none;opacity:0}
#chatView .chat-working-orbit i{position:absolute;display:block;width:15px;height:2px;border-radius:50%;background:linear-gradient(90deg,#fff4c9,#e8bc66 35%,transparent);box-shadow:2px 0 5px #eac679;left:100%;top:-3px;transform:rotate(-20deg);opacity:0}
#chatView .chat-working-orbit i:nth-child(2){animation-delay:-.6s!important}
#chatView .chat-working-orbit i:nth-child(3){animation-delay:-1.2s!important}
#chatView .chat-working[data-working="true"] .chat-working-sphere{animation:yoryi-globe-turn 3s linear infinite;box-shadow:inset -6px -3px 8px #020c20b3,inset 2px 1px 4px #ffffff44,0 0 12px #52baff88}
#chatView .chat-working[data-working="true"] .chat-working-orbit{opacity:1}
#chatView[aria-busy="true"] > .assistant-status{display:none}
@keyframes yoryi-globe-turn{to{background-position:200% 50%}}
#chatView .chat-working[data-working="true"] .chat-working-orbit i{animation:yoryi-shooting-star 1.8s linear infinite}
@keyframes yoryi-shooting-star{0%{left:100%;top:-3px;opacity:0}10%,85%{opacity:1}100%{left:-18px;top:43px;opacity:0}}
@media(prefers-reduced-motion:reduce){#chatView .chat-working[data-working="true"] *{animation:none!important}#chatView .chat-working[data-working="true"] .chat-working-orbit i{opacity:1;left:50%;top:7px}}
#chatView .assistant-bar{display:flex;align-items:center;gap:7px;flex:0 0 auto;min-height:38px;margin:0 0 2px;padding:0}
#chatView .assistant-bar select{
 flex:1 1 auto;min-width:0;width:0;min-height:38px;max-width:none;
 padding:7px 10px;font-size:14px;line-height:1.2;border-radius:12px;
 background:#0a2038;color:#f7f2e8
}
#chatView #openMemory{flex:0 0 38px;min-width:38px;width:38px;height:38px;min-height:38px;padding:4px;font-size:18px;line-height:1;border-radius:12px}
#chatView .assistant-status{
  flex:0 0 auto;min-height:0;max-height:2.6em;overflow-y:auto;
  margin:0 0 5px;font-size:12px;line-height:1.25;color:#d7ba7c;
  scrollbar-width:thin;
}
#chatView .messages{
  flex:1 1 0;min-height:0!important;max-height:none!important;
  overflow-y:auto;overscroll-behavior:contain;
  padding:4px 1px 9px;margin:0;scrollbar-width:thin;
  scrollbar-color:#c19d58 #071a30;
}
#chatView .message{margin:8px 0 12px;min-width:0}
#chatView .message.ai{margin:6px 0 15px}
#chatView .message.ai .bubble{
  width:auto;max-width:100%;padding:5px 3px;border:0;
  border-radius:0;background:transparent;color:#f7f2e8;
  font-size:20px;line-height:1.48;font-weight:450;white-space:normal;
}
#chatView .message.user .bubble{
  max-width:88%;padding:10px 13px;border:1px solid #335a7d;
  border-radius:18px;background:#19344f;color:#f7f2e8;
  font-size:19px;line-height:1.45;font-weight:450;white-space:pre-wrap;
}
#chatView .message .meta{font-size:12px;line-height:1.3;color:#a7b6c5;margin-top:6px}
#chatView .chat-source-links{font-size:15px;line-height:1.45}
#chatView .composer{
  display:grid;grid-template-columns:minmax(0,1fr) 42px 42px;
  grid-template-rows:auto;align-items:end;gap:4px;
  flex:0 0 auto;position:relative;bottom:auto!important;
  margin:0;padding:5px;min-width:0;
  border:1px solid #49617b;border-radius:23px;
  background:#0d233b;box-shadow:0 -3px 16px #020b1822;
}
#chatView .composer textarea{
  grid-column:1;grid-row:1;width:100%;min-width:0;
  height:42px;min-height:42px!important;max-height:132px!important;
  padding:9px 8px;margin:0;border:0;outline:none;
  background:transparent;color:#f8f1e5;
  border-radius:16px;resize:none;overflow-y:auto;
  font-size:18px;font-weight:450;line-height:24px;
  box-sizing:border-box;
}
#chatView .composer textarea::placeholder{color:#bdc8d4;opacity:1}
#chatView .composer:focus-within{border-color:#e3bc72}
#chatView .composer .chat-mic,#chatView .composer .send-btn{
  width:42px;height:42px;min-height:42px;padding:0;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;font-size:22px;line-height:1;
  flex:none;touch-action:manipulation;
}
#chatView .composer .chat-mic{grid-column:2;grid-row:1;background:#193b5a}
#chatView .composer .send-btn{grid-column:3;grid-row:1;background:linear-gradient(135deg,#ffe8a7,#f2c66d);color:#07182c;border:0}
#chatView .composer .chat-mic:focus-visible,#chatView .composer .send-btn:focus-visible{outline:3px solid #fff;outline-offset:2px}
#chatView .chat-voice-status{
  flex:0 0 auto;font-size:12px;line-height:1.3;
  margin:2px 3px 0;padding:0;color:#e6c980;
  max-height:2.6em;overflow-y:auto;
}
#chatView .chat-voice-status:empty{display:none}
@media(max-width:360px){
 #chatView .message.ai .bubble{font-size:19px}
 #chatView .message.user .bubble{font-size:18px}
 #chatView .composer textarea{font-size:17px}
}
@media(max-height:590px){
 #chatView .section-head{margin-bottom:3px}
 #chatView .assistant-bar{margin-bottom:0}
 #chatView .message.ai{margin-bottom:8px}
}
body.yoryi-keyboard-open main:has(> #chatView.active){padding-bottom:5px}

#chatView .chat-retry{align-self:flex-start;flex:0 0 auto;min-height:40px;margin:2px 0 6px;padding:8px 12px;font-size:15px;border-radius:12px}
#chatView .chat-retry[hidden]{display:none}

/* v2.2.12: photo attachment without shrinking the answer area */
#chatView .composer{grid-template-columns:minmax(0,1fr) 42px 42px 42px;}
#chatView .composer .chat-photo{grid-column:2;grid-row:1;width:42px;height:42px;min-height:42px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#193b5a;color:#fff;font-size:23px;line-height:1;touch-action:manipulation;}
#chatView .composer .chat-mic{grid-column:3;}
#chatView .composer .send-btn{grid-column:4;}
#chatView .composer .chat-photo:focus-visible,#chatView #chatPhotoRemove:focus-visible{outline:3px solid #fff;outline-offset:2px;}
#chatView .chat-photo-preview:not([hidden]){display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;gap:8px;max-width:100%;padding:5px 8px;margin:2px 3px;border:1px solid #8a744b;border-radius:10px;background:#132b42;color:#ffe3a8;font-size:14px;}
#chatView .chat-photo-preview span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
#chatView .chat-photo-preview button{min-height:34px;min-width:34px;flex:none;font-size:18px;padding:0;border-radius:8px;}
#chatView .chat-photo-preview[hidden]{display:none;}
@media(max-width:360px){#chatView .composer{grid-template-columns:minmax(0,1fr) 39px 39px 39px;gap:3px;}#chatView .composer .chat-photo,#chatView .composer .chat-mic,#chatView .composer .send-btn{width:39px;height:42px;min-height:42px;}}

/* v2.2.13: an extra compact video attachment button, same size as photo */
#chatView .composer{grid-template-columns:minmax(0,1fr) repeat(4,42px);}
#chatView .composer .chat-video{grid-column:3;grid-row:1;width:42px;height:42px;min-height:42px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#193b5a;color:#fff;font-size:21px;line-height:1;touch-action:manipulation;}
#chatView .composer .chat-mic{grid-column:4;}
#chatView .composer .send-btn{grid-column:5;}
#chatView .composer .chat-video:focus-visible,#chatView #chatVideoRemove:focus-visible{outline:3px solid #fff;outline-offset:2px;}
#chatView #chatVideoPreview:not([hidden]){display:flex;}
@media(max-width:360px){#chatView .composer{grid-template-columns:minmax(0,1fr) repeat(4,38px);gap:3px;}#chatView .composer .chat-photo,#chatView .composer .chat-video,#chatView .composer .chat-mic,#chatView .composer .send-btn{width:38px;min-height:42px;height:42px;font-size:21px;}}

/* Camera and gallery remain separate native pickers on mobile. */
#chatPhotoPicker{width:min(340px,calc(100vw - 36px));box-sizing:border-box;padding:22px;border:1px solid #bda773;border-radius:20px;background:#0b2035;color:#f5d991;box-shadow:0 18px 60px #0009}
#chatPhotoPicker::backdrop{background:#0009}
#chatPhotoPicker h2{margin:0 0 18px;font-size:21px}
#chatPhotoPicker button{display:block;width:100%;min-height:48px;margin-top:12px;padding:12px;border:1px solid #67717b;border-radius:12px;background:#132f49;color:#fff0bf;font:inherit;text-align:center}
#chatPhotoPicker button:focus-visible{outline:3px solid #f5d991;outline-offset:3px}
#chatPhotoPicker #chatPhotoCancel{background:transparent;color:#c3cbd4}

#chatLiveCamera{box-sizing:border-box;width:min(94vw,480px);max-height:92dvh;overflow:auto;background:#0c2033;color:#f6dfa1;border:1px solid #8ab7d0;border-radius:18px;padding:18px}
#chatLiveCamera::backdrop{background:#000b}
#chatCameraVideo{display:block;width:100%;max-height:52dvh;object-fit:contain;background:#000;border-radius:10px}
#chatLiveCamera button{display:block;min-height:48px;width:100%;margin-top:10px;border-radius:10px;font:inherit}
#chatCameraStatus{color:#e8edf3}

/* Video and photo choices share the same accessible dialog layout. */
#chatVideoPicker{width:min(340px,calc(100vw - 36px));box-sizing:border-box;padding:22px;border:1px solid #bda773;border-radius:20px;background:#0b2035;color:#f5d991;box-shadow:0 18px 60px #0009}
#chatVideoPicker::backdrop{background:#0009}
#chatVideoPicker h2{margin:0 0 18px;font-size:21px}
#chatVideoPicker button{display:block;width:100%;min-height:48px;margin-top:12px;padding:12px;border:1px solid #67717b;border-radius:12px;background:#132f49;color:#fff0bf;font:inherit;text-align:center}
#chatVideoPicker button:focus-visible{outline:3px solid #f5d991;outline-offset:3px}
#chatVideoPicker #chatVideoCancel{background:transparent;color:#c3cbd4}


/* translator-layout.css */
/* One shared translator window; original and result keep their own content. */
body:has(#translatorView.active){--header-height:56px;--nav-height:60px}
main:has(> #translatorView.active){display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:0 12px 6px}
#translatorView.active{display:flex;flex-direction:column;flex:1;min-height:0;height:100%;padding-top:6px;gap:6px}
#translatorView .section-head{margin:0;flex:0 0 auto}
#translatorView .section-head h1{font-size:20px;line-height:1.2;margin:0}
#translatorView .section-head p{display:none}
#translatorView #conversationStart{flex:0 0 auto;min-height:40px;height:40px;margin:0;padding:7px 12px;font-size:17px;line-height:1.2}
#translatorView .translator-grid{display:flex;flex-direction:column;flex:1;min-height:0;gap:6px;padding:9px;margin:0}
#translatorView .language-row{display:grid;grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);flex:0 0 auto;gap:5px}
#translatorView .language-row select,#translatorView .swap-btn{min-height:40px;height:40px;padding:6px;font-size:15px}
#translatorView .tone-select{flex:0 0 auto;min-height:38px;height:38px;padding:6px 10px;font-size:16px}
#translatorView .translator-window{display:flex;flex-direction:column;flex:1;min-height:100px;border:1px solid #49617b;border-radius:16px;overflow:hidden;background:#071a30}
#translatorView .translator-tabs{display:flex;flex:0 0 auto;gap:0;border-bottom:1px solid #49617b}
#translatorView .translator-tabs button{flex:1;min-width:0;min-height:38px;padding:7px 5px;background:#0a2038;border:0;border-radius:0;color:#bfcbd6;font-size:16px;font-weight:650}
#translatorView .translator-tabs button[aria-selected="true"]{color:#ffe3a0;background:#19344f;box-shadow:inset 0 -3px #e5bd70}
#translatorView .translator-window .translate-field{display:flex;flex:1;flex-direction:column;min-height:0;border:0;border-radius:0;outline-offset:-2px}
#translatorView .translator-window .translate-field-label{flex:0 0 auto;font-size:15px;line-height:1.25;padding:6px 10px;border-radius:0}
#translatorView .translator-window .translate-box{display:block;flex:1;min-height:0!important;height:100%;max-height:none!important;resize:none;padding:10px 12px;font-size:21px;line-height:1.45;border:0;border-radius:0;overflow-y:auto;overscroll-behavior:contain}
#translatorView .translate-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:0 0 auto;gap:6px}
#translatorView .translate-actions>*{width:100%!important;grid-column:auto!important;min-height:42px;padding:7px 4px;font-size:15px;line-height:1.2}
#translatorView .translate-actions .voice-btn{font-size:23px}
#translatorView .translator-output-actions>*{min-height:36px;font-size:14px;padding:5px}
#translatorView .conversation-toggle{flex:0 0 auto;margin:0;font-size:14px;line-height:1.25;align-items:center;gap:6px}
#translatorView .conversation-toggle input{width:18px;height:18px;flex:0 0 18px;margin:0}
#translatorView .translation-status{flex:0 0 auto;min-height:17px;max-height:2.5em;overflow:auto;font-size:13px;line-height:1.25}
#translatorView [hidden]{display:none!important}
@media(max-height:700px){#translatorView .section-head{display:none}#translatorView #conversationStart{height:36px;min-height:36px;font-size:16px}#translatorView .translator-grid{padding:7px;gap:5px}#translatorView .language-row select,#translatorView .swap-btn{height:36px;min-height:36px}#translatorView .tone-select{height:34px;min-height:34px}#translatorView .translator-window .translate-box{font-size:19px}}
body.yoryi-keyboard-open #translatorView #conversationStart,body.yoryi-keyboard-open #translatorView .section-head,body.yoryi-keyboard-open #translatorView .conversation-toggle{display:none}
@media(max-height:440px){main:has(> #translatorView.active){overflow-y:auto}#translatorView.active{height:auto;min-height:100%}#translatorView .translator-window{flex:none;height:190px}}

/* v2.2.19: a single input action row returns the microphone row to the text area. */
#translatorView .translate-actions{
  grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr);
  gap:8px;
}
#translatorView .translate-actions > *{
  box-sizing:border-box;
  display:flex;align-items:center;justify-content:center;
  min-width:0;width:100%!important;
  min-height:52px;
  padding:8px 7px;
  border-radius:13px;
  font-size:clamp(17px,4.5vw,21px);
  font-weight:850;
  line-height:1.15;
  white-space:normal;
  text-align:center;
  overflow-wrap:normal;
}
#translatorView #voiceInput{
  grid-column:auto!important;
  min-height:52px;
  font-size:30px;
  line-height:1;
  padding:4px 8px;
}
#translatorView #clearTranslation{
  font-weight:900;
  -webkit-text-stroke:.3px currentColor;
}
#translatorView .translator-output-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
#translatorView .translator-output-actions > *{
  min-height:54px;
  gap:5px;
  font-size:clamp(19px,5.2vw,22px);
  font-weight:850;
}
#translatorView .translator-output-actions > * span[aria-hidden="true"]{
  display:inline-block;
  font-size:26px;
  line-height:1;
}
#translatorView .translator-output-actions > *:last-child{
  grid-column:1/-1!important;
  width:100%!important;
}
@media(min-width:680px){
  #translatorView .translate-actions{grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr);gap:10px}
  #translatorView #voiceInput{grid-column:auto!important;min-height:54px;font-size:39px}
  #translatorView .translator-output-actions > *:last-child{grid-column:auto!important}
}
@media(max-height:700px){
  #translatorView .translate-actions{gap:5px}
  #translatorView .translate-actions > *{min-height:46px;padding:5px 6px;font-size:clamp(18px,5.3vw,21px)}
  #translatorView #voiceInput{min-height:46px;font-size:35px}
  #translatorView .translator-output-actions > *{min-height:46px;font-size:clamp(18px,5.1vw,20px)}
  #translatorView .translator-output-actions > * span[aria-hidden="true"]{font-size:24px}
}
@media(max-height:510px){
  #translatorView #voiceInput{grid-column:auto!important}
  #translatorView .translate-actions{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr)}
  #translatorView .translate-actions > *{min-height:42px;font-size:clamp(15px,4.6vw,18px);padding:4px 2px}
  #translatorView #voiceInput{font-size:31px}
  #translatorView .translator-output-actions > *:last-child{grid-column:auto!important}
}

/* Readable tone names and a matching bold dropdown arrow. */
#translatorView .tone-select{
  appearance:none;-webkit-appearance:none;
  width:100%;min-height:44px;height:44px;padding:7px 36px 7px 12px;
  font-family:inherit;font-size:clamp(20px,5.3vw,23px);font-weight:900;line-height:1.2;
  color:#ffe3a0;-webkit-text-stroke:.3px currentColor;
  border-color:#c4a565;
  background-image:linear-gradient(45deg,transparent 50%,#ffe3a0 50%),linear-gradient(135deg,#ffe3a0 50%,transparent 50%);
  background-position:right 17px center,right 10px center;background-size:7px 7px;background-repeat:no-repeat;
}
#translatorView .tone-select option{font-family:inherit;font-size:20px;font-weight:900}
@media(max-height:510px){#translatorView .tone-select{min-height:40px;height:40px;font-size:19px;padding-top:5px;padding-bottom:5px}}

/* Compact automatic read-aloud switch; idle status needs no extra row. */
#translatorView .conversation-toggle{display:flex;justify-content:flex-end;align-items:center;gap:10px;min-height:32px;font-size:14px;line-height:1.2;white-space:nowrap;cursor:pointer}
#translatorView .conversation-toggle input{appearance:none;-webkit-appearance:none;position:relative;box-sizing:border-box;width:40px;height:24px;min-height:24px;flex:0 0 40px;margin:0;padding:0;border:1px solid #7890a5;border-radius:20px;background:#263c50;cursor:pointer}
#translatorView .conversation-toggle input::before{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#d5dfe8;transition:transform .15s}
#translatorView .conversation-toggle input:checked{background:#cda34d;border-color:#f2c66d}
#translatorView .conversation-toggle input:checked::before{transform:translateX(16px);background:#071a30}
#translatorView .conversation-toggle input:focus-visible{outline:2px solid #ffe3a0;outline-offset:3px}
#translatorView .translation-status:empty{display:none!important}



/* Full native language names, with enough room for touch and bold captions. */
.topbar .top-actions .language-picker{
 width:144px!important;min-width:144px!important;max-width:144px!important;
 min-height:46px;padding:8px 24px 8px 8px!important;
 font-size:20px!important;font-weight:900!important;line-height:1.2;
 color:#ffe3a0;border:1px solid #c4a565;border-radius:12px;
 text-align:left;-webkit-text-stroke:.45px currentColor;
 background-image:linear-gradient(45deg,transparent 50%,#ffe3a0 50%),linear-gradient(135deg,#ffe3a0 50%,transparent 50%);
 background-position:right 14px center,right 7px center;background-size:7px 7px;background-repeat:no-repeat;
}
.topbar .language-picker option{font-size:20px;font-weight:900;color:#ffe3a0;background:#0a1d33}
@media(max-width:679px){
 .topbar .brand .header-globe{max-width:clamp(40px,calc(100vw - 312px),90px)!important;max-height:clamp(40px,calc(100vw - 312px),90px)!important}
}
@media(max-width:359px){
 .topbar .top-actions .language-picker{width:128px!important;min-width:128px!important;max-width:128px!important;font-size:18px!important;padding-left:7px!important;padding-right:22px!important}
}


/* simple-conversations.css */
/* One continuous conversation, with large labels and touch controls. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#translatorView .translator-tabs,#translatorView .translator-output-actions,#translatorView .legacy-translation,#translatorView #swapLanguages{display:none!important}
main:has(> #translatorView.active){padding:0 8px 4px}
#translatorView.active{gap:0;padding-top:4px}
#translatorView .translator-grid{padding:0;gap:0;border:1px solid #657389;border-radius:18px;overflow:hidden;background:#071a30}
#translatorView .language-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px 8px 4px}
#translatorView .language-row select{height:52px;min-height:52px;padding:6px 22px 6px 8px;font-family:inherit;font-size:clamp(21px,5.8vw,29px);font-weight:900;color:#ffe3a0;border-color:#c4a565;border-radius:12px;appearance:none;background:#0a1d33 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10'%3E%3Cpath d='M1 2L7 8L13 2' fill='none' stroke='%23ffe3a0' stroke-width='3'/%3E%3C/svg%3E") no-repeat right 7px center}
#translatorView .language-row option{font-size:23px;font-weight:900}
#translatorView .tone-select{height:42px;min-height:42px;margin:0 8px 4px;width:calc(100% - 16px);font-size:21px;border-radius:10px;padding-top:5px;padding-bottom:5px}
#translationMessages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px;scrollbar-width:thin}
#translationMessages:empty:before{content:attr(data-placeholder);color:#bdc8d4;font-size:22px;line-height:1.5}
.translation-pair{display:flex;flex-direction:column;gap:9px;margin-bottom:18px}
.translation-message{max-width:94%;border-radius:16px;border:1px solid #3b5976;padding:10px 12px;background:#0d2943;overflow-wrap:anywhere;user-select:text}
.translation-message.own{align-self:flex-end;background:#193c57}
.translation-message.other{align-self:flex-start;background:#0a2239}
.translation-language{display:block;color:#ffe3a0;font-size:19px;font-weight:850;margin-bottom:5px}
.translation-body{white-space:pre-wrap;font-size:23px;line-height:1.45}
.text-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;user-select:none}
.text-actions button,.translation-pending button{min-height:44px;padding:8px 10px;border:1px solid #8e794e;border-radius:10px;background:#0a1d33;color:#ffe3a0;font-family:inherit;font-size:17px;font-weight:750;line-height:1.2;cursor:pointer}
.translation-pending{font-size:18px;color:#ffe3a0;margin:0 4px}
.translation-pending.error{color:#ffb6b6}.translation-pending button{display:block;margin-top:6px}
#translatorView .translator-composer{flex-shrink:0;border-top:1px solid #49617b;padding:5px 7px 0}
#translatorView #sourceText{height:44px;min-height:44px!important;max-height:120px;resize:none;padding:8px;font-size:21px;line-height:27px;border:0;border-radius:8px;display:block;background:#0a2038}
#translatorView .translate-actions{grid-template-columns:minmax(72px,1fr) 52px 52px minmax(72px,1fr);gap:7px;padding:5px 0}
#translatorView .translate-actions>*{min-height:48px;font-size:18px;font-weight:850;grid-column:auto!important;padding:6px 4px}
#translatorView .translate-actions #voiceInput{font-size:29px;min-height:48px}
#translatorView .translate-actions #translationSpeak{font-size:26px}
#translatorView .conversation-toggle{padding:2px 8px;font-size:16px}
#translatorView .translation-status{padding:2px 8px 5px;font-size:15px;min-height:18px}
.simple-action-status{position:fixed;z-index:2000;bottom:12px;left:12px;right:12px;pointer-events:none;max-width:600px;margin:auto;padding:10px 14px;border-radius:12px;background:#173651;color:#fff5db;font-size:19px;box-shadow:0 2px 12px #0008}
.simple-action-status:empty{display:none}
@media(min-width:680px){#translatorView .language-row select{font-size:30px}.translation-message{max-width:85%}}
@media(max-height:510px){#translatorView .conversation-toggle{display:none}#translatorView .language-row select{min-height:44px;height:44px;font-size:22px}#translatorView .tone-select{min-height:38px;height:38px;font-size:19px}}

#translatorView .section-head{display:block;margin:2px 0 5px}
#translatorView .section-head h1{font-size:20px}

@media(max-width:359px){#translatorView .language-row select{font-size:20px;padding-left:6px}}

/* v2.2.31: write directly in the large, shared translation area. */
#translatorView .translation-writing-area{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px;cursor:text}
#translatorView #translationMessages{flex:0 0 auto;overflow:visible;padding:0}
#translatorView #translationMessages:empty:before{content:none}
#translatorView #sourceText{flex:1 0 auto;width:100%;box-sizing:border-box;height:160px;min-height:160px!important;max-height:none;resize:none;overflow:hidden;padding:8px 0;border:0;border-radius:0;background:transparent;color:var(--text);font-size:22px;line-height:1.5;outline:none;box-shadow:none}
#translatorView #sourceText::placeholder{color:#bdc8d4;opacity:1}
#translatorView #sourceText:focus-visible{outline:none}
#translatorView .translation-writing-area:focus-within{box-shadow:inset 2px 0 #c4a565}
#translatorView .translator-composer{border-top:0}

/* v2.2.54: stable, editable original and a separate visible translation. */
#translatorView .translation-writing-area{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:8px;overflow:hidden;cursor:default}
#translatorView .translation-panel{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;padding:8px 10px;border:1px solid #3b5976;border-radius:16px;background:#193c57}
#translatorView .translation-result{background:#0a2239}
#translatorView .translation-panel .translation-language{flex:0 0 auto;margin:0 0 4px;font-size:19px;line-height:1.25}
#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{display:block;flex:1 1 0;width:100%;height:0;min-height:0!important;max-height:none;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;resize:none;border:0;border-radius:4px;padding:0 2px;background:transparent;color:var(--text);font-family:inherit;font-size:22px;line-height:1.45;box-shadow:none}
#translatorView .translation-panel #sourceText:focus-visible{outline:2px solid #ffe3a0;outline-offset:-2px}
#translatorView .translation-writing-area:focus-within{box-shadow:none}
#translatorView .translation-panel .text-actions{flex:0 0 auto;display:flex;flex-wrap:nowrap;gap:6px;margin-top:6px}
#translatorView .translation-panel .text-actions button{flex:1;min-width:0;min-height:44px;padding:8px 5px;font-size:17px}
#translatorView .translation-panel .text-actions button:disabled{opacity:.5;cursor:default}
#translatorView #translationProgress{flex:0 0 auto;max-height:75px;overflow:auto;margin:0 0 4px;line-height:1.3;color:#ffe3a0}
#translatorView .translate-actions{grid-template-columns:minmax(65px,1fr) 52px minmax(80px,1.2fr) minmax(65px,1fr)}
#translatorView #translateNow{color:#142033}
@media(max-height:680px){#translatorView .translation-writing-area{gap:6px;padding:6px}#translatorView .translation-panel{padding:6px 8px}#translatorView .translation-panel .translation-language{font-size:17px}#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{font-size:21px}#translatorView .translation-panel .text-actions{margin-top:4px}}
@media(max-height:560px){#translatorView .translation-writing-area{display:flex;flex-direction:column;overflow-y:auto}#translatorView .translation-panel{flex:0 0 165px}#translatorView .translate-actions{grid-template-columns:minmax(60px,1fr) 44px minmax(80px,1.2fr) minmax(60px,1fr)}}

/* Reading layout: both complete texts share the main page scroller. */
main:has(> #translatorView.active){display:block;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;padding-bottom:24px}
#translatorView.active{display:flex;flex-direction:column;flex:none;height:auto;min-height:100%;gap:8px}
#translatorView .translator-grid{flex:none;min-height:0;overflow:visible}
#translatorView .translation-writing-area{display:flex;flex-direction:column;flex:none;overflow:visible;gap:14px;padding:8px;min-height:0}
#translatorView .translation-panel{flex:none;min-height:0;overflow:visible;padding:10px}
#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{flex:none;height:auto;min-height:180px!important;max-height:none;overflow-y:hidden;overscroll-behavior:auto;font-size:23px;line-height:1.5}
.translation-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:6px;margin-bottom:8px}
#translatorView .translation-panel-heading .translation-language{margin:0;flex:1 1 130px;line-height:1.4}
.translation-enlarge{min-height:44px;padding:7px 10px;background:#0a1d33;border:1px solid #c4a565;border-radius:10px;color:#ffe3a0;font:inherit;font-size:17px;font-weight:750}
#translationReader{box-sizing:border-box;width:calc(100vw - 16px);max-width:900px;height:calc(100dvh - 16px);max-height:none;margin:auto;padding:16px;background:#071a30;color:#f8eedc;border:1px solid #c4a565;border-radius:14px;overflow:hidden}
#translationReader[open]{display:flex;flex-direction:column;gap:14px}
#translationReader::backdrop{background:#000c}
.translation-reader-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto}
#translationReaderTitle{flex:1;min-width:0;margin:0;color:#ffe3a0;font-size:clamp(16px,4.5vw,19px);line-height:1.2}
#translationReaderClose{flex:0 0 auto;min-height:48px;padding:9px 14px;border:1px solid #c4a565;border-radius:10px;background:#123654;color:#ffe3a0;font:inherit;font-size:20px;font-weight:750}
#translationReaderText{flex:1;min-height:0;overflow-y:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:28px;line-height:1.6;margin:0;padding:4px 2px 24px;user-select:text}

/* v2.2.64: speech controls in the main translator; keep the reading layout. */
#translatorView .translator-composer{position:sticky;bottom:0;z-index:5;padding:7px 8px;border-top:1px solid #49617b;background:#0a2038}
#translatorView .translate-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:0}
#translatorView .translate-actions #voiceInput{grid-column:1/-1!important;grid-row:1;font-size:24px;min-height:54px;border-color:#e5bd70;background:#193c57}
#translatorView .translate-actions #translationSpeak{font-size:18px;gap:4px}
#translatorView .translate-actions>*{min-width:0;min-height:48px;font-size:18px;overflow-wrap:anywhere}
#translatorView .translate-actions #voiceInput.listening{background:#79312e}
@media(max-width:359px){#translatorView .translate-actions>*{font-size:15px;padding:6px 2px}#translatorView .translate-actions #translationSpeak{font-size:15px}}
@media(max-height:510px){#translatorView .translate-actions #voiceInput{min-height:44px;font-size:21px}#translatorView .translate-actions>*{min-height:42px;font-size:16px}}

/* v2.2.65: reclaim the manual action's space while speaking. */
#translatorView .translate-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
#translatorView[data-input-mode="writing"] .translate-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
#translatorView .translate-actions:has(#translateNow:not([hidden])){grid-template-columns:repeat(4,minmax(0,1fr))}


/* chat-window.css */
/* Clear mobile chat: one answer scroller, a compact composer and reachable audio. */
body:has(#chatView.active){--header-height:62px;--nav-height:58px;--hosting-footer:36px}
.app-shell:has(#chatView.active){position:fixed;left:50%;top:var(--chat-viewport-top,0px);transform:translateX(-50%);width:min(860px,100%);height:var(--chat-viewport-height,100dvh)}
main:has(> #chatView.active){display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:0 10px 8px}
#chatView.active{display:flex;flex-direction:column;flex:1 1 auto;min-height:0!important;height:100%!important;max-height:100%;overflow:hidden;padding:6px 0 0;gap:0}
#chatView .section-head{display:grid;grid-template-columns:auto minmax(32px,1fr) auto;align-items:center;gap:8px;flex:0 0 auto;margin:0 0 5px;padding:0}
#chatView .section-head h1{font-size:22px;line-height:1.2}
#chatView #clearChatBtn{min-height:42px;max-width:150px;padding:7px 12px;border:1px solid #b89a61;border-radius:12px;font-size:16px;line-height:1.2;white-space:normal}
#chatView .assistant-bar{display:flex;justify-content:flex-end;flex-wrap:nowrap;flex:0 0 auto;min-height:0;margin:0 0 5px}
#chatView #openMemory{display:flex;align-items:center;justify-content:center;gap:7px;flex:0 1 auto;width:auto;min-width:0;max-width:100%;height:auto;min-height:40px;padding:7px 12px;border:1px solid #42617c;border-radius:11px;background:#0d2941;color:#ffe3a0}
#chatView #openMemory>span[aria-hidden]{font-size:23px;line-height:1}
#chatView #openMemory .memory-label{font-size:18px;font-weight:750;line-height:1.2;overflow-wrap:anywhere;text-align:center}
#chatView .assistant-status{flex:0 0 auto;min-height:0;max-height:36px;overflow:auto;margin:0 2px 5px;font-size:13px;line-height:1.3}
#chatView .assistant-status[hidden]{display:none}
#chatView .chat-conversation-frame{display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:0;overflow:hidden;border:0;border-radius:0;background:transparent}
#chatView .messages{position:relative;display:block;flex:1 1 0;min-height:0!important;max-height:none!important;height:auto;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;margin:0;padding:6px 2px 12px;scrollbar-width:thin;scrollbar-color:#c19d58 #071a30;scroll-padding:8px}
#chatView .message{display:flex;min-width:0;margin:6px 0 18px}
#chatView .message.ai{justify-content:flex-start}
#chatView .message.user{justify-content:flex-end}
#chatView .message .bubble{overflow-wrap:anywhere;user-select:text;white-space:normal}
#chatView .message.ai .bubble{width:100%;max-width:100%;padding:10px 8px;border:0;border-radius:0;background:transparent;color:#f5f2eb;font-size:21px;line-height:1.5;font-weight:450}
#chatView .message.user .bubble{width:auto;max-width:92%;padding:10px 13px;border:1px solid #335a7d;border-radius:16px;background:#173650;color:#f5f2eb;font-size:20px;line-height:1.45;white-space:pre-wrap;font-weight:450}
#chatView .message .meta{font-size:12px;line-height:1.35;color:#a7b6c5;margin-top:7px}
#chatView .remember-actions{margin-top:10px;gap:6px}
#chatView .remember-actions button{min-height:40px;font-size:14px;padding:7px 10px}
#chatView .chat-reader{display:flex;align-items:center;gap:7px;flex:0 0 auto;flex-wrap:wrap;padding:5px 0 6px;border-top:1px solid #2d465e;background:#061629}
#chatView .chat-reader button{display:flex;align-items:center;justify-content:center;min-height:42px;min-width:0;flex:1 1 auto;padding:7px 10px;border:1px solid #4d6a80;border-radius:11px;background:#14344f;color:#ffe3a0;font:inherit;font-size:16px;font-weight:700;line-height:1.2;touch-action:manipulation}
#chatView .chat-reader button:disabled{opacity:.55;cursor:default}
#chatView .chat-reader [hidden]{display:none!important}
#chatView .chat-read-answer{float:right;min-width:40px;min-height:40px;margin:0 0 4px 8px;padding:4px;border:1px solid #365770;border-radius:10px;background:#0e2b44;color:#ffe3a0;font-size:19px;line-height:1}
#chatView #chatReadStatus{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#chatView #chatReadStatus.reader-error{position:static;width:100%;height:auto;clip-path:none;white-space:normal;color:#ffe3a0;font-size:14px}
#chatView .composer{display:flex;flex-direction:column;align-items:stretch;flex:0 0 auto;position:static;bottom:auto!important;min-width:0;margin:0;padding:4px;border:1px solid #526a80;border-radius:16px;background:#0c243b;box-shadow:none;z-index:auto;gap:0}
#chatView .composer textarea{display:block;flex:0 0 auto;box-sizing:border-box;width:100%;min-width:0;height:48px;min-height:48px!important;max-height:112px!important;padding:9px 10px;margin:0;border:0;border-radius:12px;background:transparent;color:#f8f1e5;outline:none;resize:none;overflow-y:auto;overscroll-behavior:contain;font-size:20px;font-weight:450;line-height:28px;box-shadow:none}
#chatView .composer textarea::placeholder{color:#bdc8d4;opacity:1}
#chatView .composer:focus-within{border-color:#e3bc72}
#chatView .chat-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:0 0 auto;gap:8px;width:100%;box-sizing:border-box;margin:0;padding:4px 2px 2px;border:0;background:transparent}
#chatView .chat-actions:not(.has-send){grid-template-columns:repeat(3,minmax(0,1fr))}
#chatView .chat-actions .send-btn[hidden]{display:none!important}
#chatView .composer .chat-photo,#chatView .composer .chat-video,#chatView .composer .chat-mic,#chatView .composer .send-btn{display:flex;align-items:center;justify-content:center;grid-row:auto;grid-column:auto;width:100%;min-width:0;height:46px;min-height:46px;padding:0;margin:0;border:1px solid #49677e;border-radius:11px;background:#193c57;color:#f8e1a5;font-size:23px;line-height:1;box-shadow:none;touch-action:manipulation}
#chatView .composer .send-btn{background:linear-gradient(135deg,#ffe8a7,#f2c66d);color:#07182c;border:0}
#chatView .composer .chat-mic.is-recording{background:#852c3e;border-color:#f4979f}
#chatView .chat-photo-preview:not([hidden]){flex:0 0 auto;max-height:60px;overflow:auto;margin:3px 6px}
#chatView .chat-voice-status{flex:0 0 auto;margin:3px 7px;min-height:0;max-height:36px;overflow:auto;font-size:13px;line-height:1.3;color:#e6c980}
#chatView .chat-voice-status:empty{display:none}
#chatView button:focus-visible,#chatView .messages:focus-visible{outline:3px solid #ffe3a0;outline-offset:2px}
@media(max-height:600px){body:has(#chatView.active){--header-height:48px}#chatView .assistant-bar{margin-bottom:3px}#chatView #openMemory{min-height:36px;padding:4px 9px}#chatView #openMemory .memory-label{font-size:16px}#chatView .section-head{margin-bottom:3px}#chatView .composer textarea{max-height:80px!important}#chatView .chat-reader{padding-top:3px;padding-bottom:4px}}
@media(max-width:359px){#chatView .message.ai .bubble{font-size:20px}#chatView .message.user .bubble{font-size:19px}#chatView .composer textarea{font-size:18px}#chatView .chat-reader button{font-size:14px;padding:7px 6px}#chatView #clearChatBtn{max-width:115px;font-size:15px}}

#chatView .chat-actions svg{width:25px;height:25px;flex-shrink:0}
#chatView .chat-reader svg{width:20px;height:20px;flex-shrink:0}
#chatView .chat-reader button{gap:7px}
#chatView .chat-read-answer svg{width:21px;height:21px;display:block;margin:auto}
/* A newly opened answer starts at the top, without a cut-off question above it. */
#chatView .message.ai:last-child{min-height:calc(100% - 20px)}



/* Two primary actions, followed by one centered memory action. */
#homeView .module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#homeView .module-grid > .module[data-go="memory"]{
 grid-column:1 / -1;justify-self:center;width:calc((100% - 12px) / 2);
 align-items:center;text-align:center;box-sizing:border-box
}
@media(max-width:679px){#homeView .module-grid > .module[data-go="memory"]{width:calc((100% - 10px) / 2)}}
@media(max-width:359px){#homeView .module-grid > .module[data-go="memory"]{width:calc((100% - 8px) / 2)}}


/* home-screen.css */
/* Compact home: the main actions stay within reach on phone screens. */
#homeView{padding-top:0;box-sizing:border-box}
#homeView.active{display:flex;flex-direction:column;min-height:100%}
#homeView .home-universe{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;flex-shrink:0;height:clamp(220px,35dvh,310px);margin:8px 0 24px;overflow:hidden;border-radius:24px;background:radial-gradient(ellipse at 50% 43%,#154b735c,transparent 61%)}
#homeView .home-universe::after{content:"";position:absolute;bottom:1px;left:16%;right:16%;height:1px;background:linear-gradient(90deg,transparent,#dcb76770,transparent)}
#homeView .home-globe{position:relative;width:clamp(148px,24dvh,218px);aspect-ratio:1;border-radius:50%;background-image:radial-gradient(circle at 30% 24%,#fff1ad30,transparent 44%,#00091ede 100%),url('/earth-texture-yoryi.jpg?v=2262');background-size:100% 100%,200% 100%;background-position:0 0,0% 50%;box-shadow:inset -13px -7px 21px #000b,inset 2px 1px 5px #c4ecff,0 0 0 1px #86ccf355,0 0 26px #3689c64a,0 0 65px #4e8cbd24;animation:homeGlobeTurn 75s linear infinite}
#homeView .home-universe h1{position:relative;margin:0;color:var(--gold2);font-size:clamp(30px,8vw,42px);font-weight:900;letter-spacing:.13em;line-height:1.15;text-shadow:0 0 20px #f2c66d28}
.home-stars{position:absolute;inset:0;z-index:-1;opacity:.65;background-image:radial-gradient(circle at 12% 21%,#f8dc9e 0 1px,transparent 1.6px),radial-gradient(circle at 80% 17%,#c1e2ff 0 1px,transparent 1.5px),radial-gradient(circle at 28% 67%,#b4d9f9 0 .8px,transparent 1.4px),radial-gradient(circle at 89% 72%,#ffe4a5 0 1px,transparent 1.8px),radial-gradient(circle at 62% 8%,#b4d9f9 0 .8px,transparent 1.4px),radial-gradient(circle at 8% 83%,#b4d9f9 0 .8px,transparent 1.4px)}
.home-meteors{position:absolute;inset:0;overflow:hidden;z-index:-1;pointer-events:none}
.home-meteors i{position:absolute;top:17%;left:3%;width:74px;height:1px;opacity:0;transform:rotate(22deg);background:linear-gradient(90deg,transparent,#f2c66d);animation:homeMeteor 11s ease-out infinite}
.home-meteors i::after{content:"";position:absolute;right:0;top:-1px;width:3px;height:3px;border-radius:50%;background:#fff3ce;box-shadow:0 0 7px #f2c66d}
.home-meteors i:nth-child(2){top:8%;left:54%;width:49px;animation-delay:3.8s;animation-duration:13s}
.home-meteors i:nth-child(3){top:48%;left:10%;width:39px;animation-delay:7.2s;animation-duration:15s}
.home-meteors i:nth-child(4){top:34%;left:63%;width:54px;animation-delay:1.8s;animation-duration:12s}
.home-meteors i:nth-child(5){top:65%;left:30%;width:44px;animation-delay:5.6s;animation-duration:14s}
@keyframes homeGlobeTurn{to{background-position:0 0,200% 50%}}
@keyframes homeMeteor{0%{opacity:0;translate:-70px -25px}5%{opacity:.8}17%{opacity:0;translate:270px 95px}100%{opacity:0;translate:270px 95px}}
#homeView .status-row{display:none}
#homeView .module-grid{width:100%;margin-top:auto;column-gap:10px;row-gap:22px;grid-template-columns:repeat(2,minmax(0,1fr))}
#homeView .module-grid>.module{min-height:88px;padding:12px;align-items:center;text-align:center;gap:7px;border-radius:18px}
#homeView .module-grid>.module strong{font-size:clamp(17px,4.6vw,22px);line-height:1.25;font-weight:800}
#homeView .module-grid>.module strong span{font-size:inherit;color:inherit}
#homeView .module-grid>.module>span{font-size:14px;line-height:1.35}
#homeView .module-grid>.module[data-go="memory"]{width:calc((100% - 10px) / 2);min-width:min(100%,180px)}
#homeView .learn-card{margin-top:14px;padding:12px 14px;gap:10px}
#homeView .learn-card h2{font-size:17px;margin:0 0 6px}
#homeView .learn-card p{font-size:13px;line-height:1.45;margin:0}
#homeView .learn-card .badge{padding:5px;font-size:10px;white-space:nowrap}
@media(max-height:650px){#homeView .home-universe{height:190px;margin:4px 0 18px;gap:8px}#homeView .home-globe{width:130px}#homeView .home-universe h1{font-size:28px}#homeView .module-grid>.module{min-height:76px;padding:9px;gap:4px}}
@media(prefers-reduced-motion:reduce){#homeView .home-globe,.home-meteors i{animation:none}.home-meteors i{opacity:.4;translate:none}}

/* Only working destinations remain in the customer navigation. */
.bottom-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
#homeView .home-version{text-align:center;font-size:11px;color:var(--muted);opacity:.7;margin:12px 0 0}

/* Compact language control, aligned to the right of the centered globe. */
.topbar{padding-right:6px!important}
.topbar .top-actions .language-picker{box-sizing:border-box!important;width:108px!important;min-width:108px!important;max-width:108px!important;height:44px!important;padding:6px 22px 6px 8px!important;font-size:14px!important;font-weight:700!important;line-height:1.2!important;border-radius:10px!important}

/* Keep actions near the logo on wider screens; retain phone placement. */
@media(min-width:680px){#homeView .module-grid{margin-top:8px}}



/* The small globe is an activity indicator; the home illustration stays unchanged. */
.topbar .brand{position:relative}
.topbar .brand .header-globe{animation-play-state:paused;animation-duration:3s}
.topbar .brand[data-working="true"] .header-globe{animation-play-state:running}
.header-work-stars{position:absolute;inset:-5px;overflow:hidden;pointer-events:none;opacity:0}
.header-work-stars i{position:absolute;left:110%;top:0;width:25px;height:2px;border-radius:50%;background:linear-gradient(90deg,transparent,#ffe3a0 75%,#fff);box-shadow:0 0 5px #ffe3a0;opacity:0;transform:rotate(-25deg)}
.topbar .brand[data-working="true"] .header-work-stars{opacity:1}
.topbar .brand[data-working="true"] .header-work-stars i{animation:headerWorkMeteor 1.6s linear infinite}
.header-work-stars i:nth-child(2){animation-delay:-.32s!important}
.header-work-stars i:nth-child(3){animation-delay:-.64s!important}
.header-work-stars i:nth-child(4){animation-delay:-.96s!important}
.header-work-stars i:nth-child(5){animation-delay:-1.28s!important}
@keyframes headerWorkMeteor{0%{left:110%;top:0;opacity:0}10%,85%{opacity:1}100%{left:-30%;top:100%;opacity:0}}
@media(prefers-reduced-motion:reduce){.topbar .brand .header-globe,.header-work-stars i{animation:none!important}.topbar .brand[data-working="true"] .header-work-stars{outline:2px solid #ffe3a0;border-radius:50%}.topbar .brand[data-working="true"] .header-work-stars i{opacity:1;left:8%;top:18%}}

/* 2.2.77: language choice and microphone remain visible; texts scroll together. */
main:has(> #translatorView.active){display:flex;flex-direction:column;overflow:hidden;padding:0 10px 6px;min-height:0}
#translatorView.active{flex:1;min-height:0;height:100%;gap:5px}
#translatorView .section-head,#translatorView #conversationStart{flex:0 0 auto}
#translatorView .translator-grid{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;gap:5px}
#translatorView .language-row,#translatorView .tone-select{flex:0 0 auto}
#translatorView .translation-writing-area{flex:1 1 0;min-height:80px;overflow-y:auto;overscroll-behavior:contain;padding:6px}
#translatorView .translator-composer{position:relative;flex:0 0 auto;bottom:auto}
#translatorView .translation-status,#translatorView .conversation-toggle{flex:0 0 auto}
.remember-actions button{min-height:44px;padding:8px 13px;border:1px solid #a88d55;border-radius:10px;background:#12304a;color:#ffe3a0;font:inherit;font-weight:750;cursor:pointer}
.remember-actions button:disabled{opacity:.65;cursor:default}
@media(max-height:600px){#translatorView .section-head{display:none}#translatorView .language-row select{height:42px;min-height:42px;font-size:20px}#translatorView .tone-select{height:38px;min-height:38px;font-size:19px}#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{min-height:130px!important}}
@media(max-height:440px){main:has(> #translatorView.active){overflow-y:auto}#translatorView.active{height:auto;min-height:100%}#translatorView .translation-writing-area{flex:none;max-height:190px}}

#chatView .image-mode{flex:0 0 auto;padding:0 3px 5px;display:flex;flex-direction:column;gap:3px}
#chatView .image-mode select{width:100%;min-height:40px;font:inherit;font-size:16px;color:#ffe3a0;background:#102f48;border:1px solid #59758b;border-radius:10px;padding:5px 10px}
#chatView .image-mode small{font-size:13px;line-height:1.3;color:#c5d4e2}
#chatView .image-mode [hidden]{display:none}
#chatView .generated-image{margin:12px 0;max-width:100%}
#chatView .generated-image img{display:block;width:100%;max-width:680px;height:auto;border-radius:12px;background:#12304a}
#chatView .generated-image figcaption{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
#chatView .generated-image button,#chatView .generated-image .image-save{font:inherit;font-size:16px;display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid #b99a61;background:#153b55;color:#ffe3a0;text-decoration:none}
#chatView .generated-image small{flex-basis:100%;font-size:13px;line-height:1.4;color:#bac9d6}

#chatView .image-mode .image-progress{color:#ffe3a0;font-weight:650}

/* 2.2.88: Keep translation input and result in one tabbed work area. */
#translatorView .translation-writing-area{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;gap:0;padding:0}
#translatorView .translator-tabs{display:flex!important;flex:0 0 auto;gap:0;border-bottom:1px solid #657389;background:#0a2038}
#translatorView .translator-tabs [role="tab"]{flex:1;min-width:0;min-height:48px;padding:8px 6px;border:0;border-radius:0;background:#0a2038;color:#c5d4e2;font:inherit;font-size:18px;font-weight:800}
#translatorView .translator-tabs [role="tab"][aria-selected="true"]{background:#193c57;color:#ffe3a0;box-shadow:inset 0 -3px #e5bd70}
#translatorView .translation-panel{display:flex;flex:1 1 auto;min-height:0;min-width:0;overflow:hidden;padding:10px}
#translatorView .translation-panel[hidden]{display:none!important}
#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{flex:1 1 auto;min-height:0!important;height:0;overflow-y:auto;overscroll-behavior:contain}
#translatorView .translation-panel .text-actions{flex:0 0 auto}
#translatorView #translationProgress{flex:0 0 auto;max-height:90px;overflow:auto}
#translatorView [role="tab"]:focus-visible{outline:3px solid #ffe3a0;outline-offset:-3px}
@media(max-height:560px){#translatorView .translator-tabs [role="tab"]{min-height:42px;font-size:16px}#translatorView .translation-panel{padding:7px}}

/* 2.2.89: Show both texts together so the translation is easy to compare. */
body:has(#translatorView.active){--header-height:56px;--nav-height:60px}
main:has(> #translatorView.active){display:block;overflow-y:auto;overflow-x:hidden;padding:0 10px 18px;min-height:0}
#translatorView.active{display:flex;flex-direction:column;flex:none;height:auto;min-height:100%;gap:7px;padding:8px 0 12px}
#translatorView .section-head{display:block;flex:none;margin:0;padding:0 4px}
#translatorView .section-head h1{margin:0;font-size:23px;line-height:1.25}
#translatorView .section-head p{display:block;margin:3px 0 0;font-size:15px;line-height:1.3;color:#c5d4e2}
#translatorView #conversationStart{height:auto;min-height:44px;margin:0;padding:8px 12px;font-size:17px}
#translatorView .translator-grid{display:flex;flex:none;flex-direction:column;gap:8px;min-height:0;overflow:visible;padding:8px;margin:0}
#translatorView .language-row{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);gap:7px}
#translatorView .language-row select,#translatorView .swap-btn{height:46px;min-height:46px;padding:6px 8px;font-size:18px}
#translatorView .translator-options{flex:none;border:1px solid #49617b;border-radius:12px;background:#0a2038;overflow:hidden}
#translatorView .translator-options summary{min-height:42px;padding:9px 12px;color:#ffe3a0;font-size:16px;font-weight:750;cursor:pointer}
#translatorView .translator-options-content{display:flex;flex-direction:column;gap:8px;padding:0 10px 10px}
#translatorView .translator-options-content #conversationStart{width:100%;border:1px solid #657389;border-radius:10px;background:#102f48;color:#ffe3a0}
#translatorView .tone-label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;color:#d8e1e9;font-size:15px}
#translatorView .tone-select{height:44px;min-height:44px;padding:6px 34px 6px 10px;font-size:17px}
#translatorView .conversation-toggle{justify-content:space-between;min-height:38px;font-size:15px;white-space:normal}
#translatorView .translation-writing-area{display:grid;grid-template-columns:minmax(0,1fr);flex:none;min-height:0;gap:9px;overflow:visible;padding:0}
#translatorView .translator-tabs{display:none!important}
#translatorView .translation-panel{display:flex;flex:none;flex-direction:column;min-height:0;overflow:visible;padding:10px;border-radius:14px}
#translatorView .translation-panel .translation-language{font-size:19px;line-height:1.3}
#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{display:block;flex:none;width:100%;height:118px;min-height:118px!important;max-height:180px;resize:vertical;overflow:auto;overscroll-behavior:contain;font-size:23px;line-height:1.45}
#translatorView .translation-panel .text-actions{display:flex;flex:none;gap:8px;margin-top:6px}
#translatorView .translation-panel .text-actions button{flex:1;min-height:46px;padding:8px 10px;font-size:18px}
#translatorView .translation-panel .text-actions[hidden]{display:none!important}
#translatorView #translationProgress{max-height:65px;margin:0 0 4px}
#translatorView .translator-composer{position:static;flex:none;padding:8px 0 0;border-top:1px solid #49617b}
#translatorView .translate-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0}
#translatorView .translate-actions>*{min-height:48px;padding:7px 5px;font-size:17px;line-height:1.2}
#translatorView .translate-actions #voiceInput{grid-column:1/-1!important;grid-row:1;min-height:54px;font-size:23px}
#translatorView .translate-actions #translationPaste{grid-column:1;grid-row:2}
#translatorView .translate-actions #translateNow{grid-column:2;grid-row:2}
#translatorView .translate-actions #clearTranslation{grid-column:3;grid-row:2}
#translatorView .translation-status{flex:none;min-height:0;max-height:3em;font-size:14px;line-height:1.35}
#translatorView .translation-status:empty{display:none!important}
body.yoryi-keyboard-open #translatorView .section-head,body.yoryi-keyboard-open #translatorView .translator-options{display:none}
@media(min-width:760px){#translatorView .translation-writing-area{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{height:160px;max-height:220px}}
@media(max-width:380px){#translatorView .section-head p{font-size:14px}#translatorView .language-row{grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);gap:4px}#translatorView .language-row select,#translatorView .swap-btn{font-size:16px;padding-left:5px;padding-right:5px}#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{font-size:21px}}
@media(max-height:520px){#translatorView .section-head{display:block}#translatorView .section-head p{display:none}#translatorView .translation-panel #sourceText,#translatorView .translation-panel #translatedText{height:100px;min-height:100px!important}}
#translatorView .translate-actions:not(:has(#translateNow:not([hidden]))){grid-template-columns:repeat(2,minmax(0,1fr))}
#translatorView .translate-actions:not(:has(#translateNow:not([hidden]))) #clearTranslation{grid-column:2;grid-row:2}
#translatorView #swapLanguages{display:flex!important;align-items:center;justify-content:center;width:44px;min-width:44px;padding:5px;font-size:23px}
@media(max-width:380px){#translatorView #swapLanguages{width:38px;min-width:38px;font-size:20px}}
