/* OK ITHAKI V249526R10F7 — GLOBAL LANGUAGE / FULL PROFILE / 16+ TERMS */
(function(){
'use strict';
if(window.__ITHAKI_V249526R10F7_GLOBAL_LANGUAGE__)return;
window.__ITHAKI_V249526R10F7_GLOBAL_LANGUAGE__={version:'V249526R10F7',globalOwner:true,firstRun:true,fullProfile:true,at:Date.now()};
window.__ITHAKI_R10F7_GLOBAL_LANGUAGE_OWNER__=true;
window.GLOBAL_APP_LANGUAGE_OWNER_R10F7=true;
window.FIRST_RUN_EUROPEAN_LANGUAGE_R10F7=true;
window.ALL_TABS_GLOBAL_TRANSLATION_R10F7=true;
window.CONTENT_FOLLOWS_APP_LANGUAGE_R10F7=true;
window.FULL_PROFILE_HOME_BUTTON_R10F7=true;
window.AGE16_TERMS_GATE_R10F7=true;

const I=()=>window.ITH=window.ITH||{};
const S=()=>window.state||I().state||{};
const $=id=>document.getElementById(id);
const esc=s=>String(s==null?'':s).replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
const LANG_KEY='ith_global_language_r10f7';
const LANG_SET='ith_global_language_selected_r10f7';
const CACHE_KEY='ith_global_translation_cache_r10f7';
const PROFILE_KEYS={country:'ith_profile_country_r10f7',birth:'ith_profile_birth_year_r10f7',interests:'ith_profile_interests_r10f7',bio:'ith_profile_bio_r10f7'};
const LANGS=[
 ['el','Ελληνικά','🇬🇷'],['en','English','🇬🇧']
];
const LANG_MAP=Object.fromEntries(LANGS.map(x=>[x[0],{code:x[0],name:x[1],flag:x[2]}]));
const CORE={
 el:{choose:'Επίλεξε γλώσσα εφαρμογής',chooseSub:'Η επιλογή αλλάζει όλη την εφαρμογή και τη μετάφραση των κειμένων.',continue:'Συνέχεια',language:'Γλώσσα εφαρμογής',fullProfile:'Πλήρες προφίλ',profileSub:'Όνομα, χώρα, ηλικία 16+, όροι και ενδιαφέροντα',complete:'Ολοκλήρωση προφίλ',name:'Όνομα',country:'Χώρα',birth:'Έτος γέννησης (προαιρετικό)',interests:'Ενδιαφέροντα',bio:'Λίγα λόγια για εσένα',age:'Επιβεβαιώνω ότι είμαι 16 ετών ή μεγαλύτερος/η.',terms:'Αποδέχομαι τους όρους χρήσης και την πολιτική απορρήτου.',readTerms:'Διάβασε τους όρους',save:'Αποθήκευση πλήρους προφίλ',cancel:'Ακύρωση',required:'Χρειάζεται επιβεβαίωση ηλικίας 16+ και αποδοχή όρων.',young:'Το έτος γέννησης δείχνει ηλικία κάτω των 16 ετών.',saved:'Το πλήρες προφίλ αποθηκεύτηκε.',translationUnavailable:'Η πλήρης μετάφραση αυτής της γλώσσας χρειάζεται ενεργό εξωτερικό πάροχο στον server. Το πρωτότυπο διατηρείται.',searchLanguage:'Αναζήτηση γλώσσας…',changeLanguage:'Αλλαγή γλώσσας',profileIncomplete:'Το προφίλ χρειάζεται ολοκλήρωση',profileComplete:'Προφίλ ολοκληρωμένο',automaticContent:'Τα μηνύματα και τα κείμενα μεταφράζονται αυτόματα στη γλώσσα εφαρμογής.',autoContentLabel:'Αυτόματη μετάφραση μηνυμάτων και αναρτήσεων',autoContentSub:'Χρησιμοποιεί το Λεξικό 1 και τα offline μοντέλα Argos. Η διεπαφή της εφαρμογής μεταφράζεται πάντα.'},
 en:{choose:'Choose app language',chooseSub:'This choice changes the entire app and translates visible content.',continue:'Continue',language:'App language',fullProfile:'Full profile',profileSub:'Name, country, age 16+, terms and interests',complete:'Complete profile',name:'Name',country:'Country',birth:'Birth year (optional)',interests:'Interests',bio:'A few words about you',age:'I confirm that I am 16 years old or older.',terms:'I accept the terms of use and privacy policy.',readTerms:'Read terms',save:'Save full profile',cancel:'Cancel',required:'Age 16+ confirmation and acceptance of the terms are required.',young:'The birth year indicates an age below 16.',saved:'Full profile saved.',translationUnavailable:'Full translation for this language requires an active external provider on the server. Original text is preserved.',searchLanguage:'Search language…',changeLanguage:'Change language',profileIncomplete:'Profile needs completion',profileComplete:'Profile complete',automaticContent:'Messages and content are translated automatically into the app language.',autoContentLabel:'Automatically translate messages and posts',autoContentSub:'Uses Lexicon 1 and offline Argos models. The app interface is always translated.'}
};
let observer=null,scanTimer=0,translateTimer=0,translating=false;
const memoryCache=new Map();
try{const c=JSON.parse(sessionStorage.getItem(CACHE_KEY)||'{}');Object.entries(c).slice(-2500).forEach(([k,v])=>memoryCache.set(k,v))}catch(_e){}
function lang(){try{const v=String(localStorage.getItem(LANG_KEY)||localStorage.getItem('ith_ui_lang_v249141')||localStorage.getItem('ith_ui_lang')||new URLSearchParams(location.search).get('lang')||'el').toLowerCase().split('-')[0];return LANG_MAP[v]?v:'el'}catch(_e){return'el'}}
function core(k){const l=lang();return (CORE[l]||CORE.en)[k]||CORE.en[k]||k}
function api(path){let b=String(S().api||'').replace(/\/+$/,'');if(!b||/appassets\.androidplatform\.net/i.test(b))b='https://ok-ithaki.gr';return /^https?:/i.test(path)?path:b+path}
function toast(msg,ms=4600){try{if(typeof I().toast==='function')return I().toast(msg,ms)}catch(_e){}const e=$('toast');if(e){e.textContent=msg;e.classList.add('show');setTimeout(()=>e.classList.remove('show'),ms)}}
function saveCache(){try{const o={};Array.from(memoryCache.entries()).slice(-1800).forEach(([k,v])=>o[k]=v);sessionStorage.setItem(CACHE_KEY,JSON.stringify(o))}catch(_e){}}
function languageOptions(selected=lang()){return LANGS.map(([c,n,f])=>`<option value="${c}"${c===selected?' selected':''}>${f} ${esc(n)}</option>`).join('')}
function languageCards(){return LANGS.map(([c,n,f])=>`<button type="button" class="ith537LangCard${c===lang()?' active':''}" data-r10f7-lang="${c}"><span>${f}</span><b>${esc(n)}</b></button>`).join('')}
function updateUrlLanguage(code){try{const u=new URL(location.href);u.searchParams.set('lang',code);u.searchParams.set('v','249526r10f7');u.searchParams.delete('_');history.replaceState(null,'',u.toString())}catch(_e){}}
function setLanguage(code,opts={}){
 code=String(code||'').toLowerCase().split('-')[0];if(!LANG_MAP[code])code='en';
 try{localStorage.setItem(LANG_KEY,code);localStorage.setItem(LANG_SET,'1');localStorage.setItem('ith_ui_lang_v249141',code);localStorage.setItem('ith_ui_lang',code);localStorage.setItem('ith_ui_lang_manual_v249141','1');localStorage.setItem('ith_ui_lang_manual','1');localStorage.setItem('ith_target_lang',code);localStorage.setItem('ith_auto_translate','1')}catch(_e){}
 document.documentElement.lang=code;document.body&&document.body.setAttribute('data-ui-lang',code);updateUrlLanguage(code);renderTopLanguage();restoreTranslated(document.body);cleanupOldTranslationControls();
 try{if(typeof window.renderNav==='function')window.renderNav();if(typeof window.applyScreenTheme==='function')window.applyScreenTheme();if(typeof window.rerenderCurrentPage==='function')window.rerenderCurrentPage()}catch(_e){}
 [20,120,360].forEach(ms=>setTimeout(()=>{decorate();translateVisible(true)},ms));
 document.dispatchEvent(new CustomEvent('ithaki:global-language-changed',{detail:{language:code}}));
 if(!opts.silent)toast((LANG_MAP[code].flag||'🌐')+' '+LANG_MAP[code].name);
 closeLanguagePicker();return false;
}
function renderTopLanguage(){const box=$('topLangSwitch');if(!box)return;const m=LANG_MAP[lang()]||LANG_MAP.el;box.innerHTML=`<button type="button" id="ith537TopLanguage" class="ith537TopLanguage" aria-label="${esc(core('changeLanguage'))}"><span>${m.flag}</span><b>${esc(m.name)}</b><i>⌄</i></button>`;box.querySelector('button').onclick=()=>{openLanguagePicker(false);return false}}
function openLanguagePicker(firstRun=false){
 let e=$('ith537LanguageModal');if(e)e.remove();e=document.createElement('div');e.id='ith537LanguageModal';e.className='ith537Modal';e.dataset.firstRun=firstRun?'1':'0';
 e.innerHTML=`<div class="ith537ModalCard language"><div class="ith537ModalHead"><div><h2>🌍 ${esc(core('choose'))}</h2><p>${esc(core('chooseSub'))}</p></div>${firstRun?'':`<button type="button" data-r10f7-close>✕</button>`}</div><input class="ith537LangSearch" type="search" placeholder="${esc(core('searchLanguage'))}"><div class="ith537LangGrid">${languageCards()}</div><div class="ith537ModalFoot"><small>${esc(core('automaticContent'))}</small></div></div>`;
 document.body.appendChild(e);const search=e.querySelector('input');search&&search.addEventListener('input',()=>{const q=search.value.toLowerCase();e.querySelectorAll('.ith537LangCard').forEach(b=>b.hidden=!b.textContent.toLowerCase().includes(q))});e.addEventListener('click',ev=>{const b=ev.target.closest('[data-r10f7-lang]');if(b){setLanguage(b.dataset.r10f7Lang);if(firstRun&&!profileComplete())setTimeout(()=>openFullProfile(true),120);return}if(ev.target.closest('[data-r10f7-close]')||(!firstRun&&ev.target===e))closeLanguagePicker()});return false;
}
function closeLanguagePicker(){const e=$('ith537LanguageModal');if(e)e.remove()}
function profileData(){return{country:localStorage.getItem(PROFILE_KEYS.country)||'',birth:localStorage.getItem(PROFILE_KEYS.birth)||'',interests:localStorage.getItem(PROFILE_KEYS.interests)||'',bio:localStorage.getItem(PROFILE_KEYS.bio)||''}}
function profileComplete(){const st=S();return !!(st.age16||localStorage.getItem('ith_age16')==='1')&&!!(st.policyOk||localStorage.getItem('ith_policy_ok')==='1')&&!!String(st.name||localStorage.getItem('ith_name')||'').trim()}
function openFullProfile(required=false){
 let e=$('ith537FullProfileModal');if(e)e.remove();const d=profileData(),st=S(),name=String(st.name||localStorage.getItem('ith_name')||'').trim();e=document.createElement('div');e.id='ith537FullProfileModal';e.className='ith537Modal';e.dataset.required=required?'1':'0';
 e.innerHTML=`<div class="ith537ModalCard profile"><div class="ith537ModalHead"><div><h2>👤 ${esc(core('fullProfile'))}</h2><p>${esc(core('profileSub'))}</p></div>${required?'':`<button type="button" data-r10f7-close-profile>✕</button>`}</div><div class="ith537ProfileGrid"><label><span>${esc(core('name'))}</span><input id="ith537Name" value="${esc(name)}" autocomplete="nickname"></label><label><span>${esc(core('language'))}</span><select id="ith537ProfileLanguage">${languageOptions()}</select></label><label><span>${esc(core('country'))}</span><input id="ith537Country" value="${esc(d.country)}" autocomplete="country-name"></label><label><span>${esc(core('birth'))}</span><input id="ith537Birth" type="number" min="1900" max="${new Date().getFullYear()-16}" value="${esc(d.birth)}" inputmode="numeric"></label><label class="wide"><span>${esc(core('interests'))}</span><input id="ith537Interests" value="${esc(d.interests)}"></label><label class="wide"><span>${esc(core('bio'))}</span><textarea id="ith537Bio" rows="3">${esc(d.bio)}</textarea></label></div><label class="ith537Check"><input id="ith537AutoContent" type="checkbox" ${localStorage.getItem('ith_auto_translate_content_r10f8')!=='0'?'checked':''}><span><b>${esc(core('autoContentLabel'))}</b><small>${esc(core('autoContentSub'))}</small></span></label><label class="ith537Check"><input id="ith537Age" type="checkbox" ${(st.age16||localStorage.getItem('ith_age16')==='1')?'checked':''}><span>${esc(core('age'))}</span></label><label class="ith537Check"><input id="ith537Terms" type="checkbox" ${(st.policyOk||localStorage.getItem('ith_policy_ok')==='1')?'checked':''}><span>${esc(core('terms'))}</span></label><div class="ith537ProfileActions"><button type="button" data-r10f7-terms>⚖️ ${esc(core('readTerms'))}</button><button type="button" class="save" data-r10f7-save-profile>💾 ${esc(core('save'))}</button></div><div id="ith537ProfileNotice"></div></div>`;
 document.body.appendChild(e);e.addEventListener('click',ev=>{if(ev.target.closest('[data-r10f7-close-profile]')||(!required&&ev.target===e))e.remove();if(ev.target.closest('[data-r10f7-terms]')){try{I().openLegalPolicy&&I().openLegalPolicy()}catch(_e){}}if(ev.target.closest('[data-r10f7-save-profile]'))saveFullProfile()});e.querySelector('#ith537ProfileLanguage').addEventListener('change',ev=>setLanguage(ev.target.value,{silent:true}));return false;
}
async function saveFullProfile(){
 const e=$('ith537FullProfileModal');if(!e)return false;const name=e.querySelector('#ith537Name').value.trim()||'Μέλος',country=e.querySelector('#ith537Country').value.trim(),birth=e.querySelector('#ith537Birth').value.trim(),interests=e.querySelector('#ith537Interests').value.trim(),bio=e.querySelector('#ith537Bio').value.trim(),autoContent=e.querySelector('#ith537AutoContent')?e.querySelector('#ith537AutoContent').checked:true,age=e.querySelector('#ith537Age').checked,terms=e.querySelector('#ith537Terms').checked,notice=e.querySelector('#ith537ProfileNotice');
 if(!age||!terms){notice.textContent=core('required');notice.className='error';return false}if(birth&&new Date().getFullYear()-Number(birth)<16){notice.textContent=core('young');notice.className='error';return false}
 const st=S();st.name=name;st.age16=true;st.policyOk=true;try{localStorage.setItem('ith_name',name);localStorage.setItem('ith_age16','1');localStorage.setItem('ith_policy_ok','1');localStorage.setItem('ith_policy_accepted_version','249526r10f7');localStorage.setItem('ith_policy_accepted_at',new Date().toISOString());localStorage.setItem(PROFILE_KEYS.country,country);localStorage.setItem(PROFILE_KEYS.birth,birth);localStorage.setItem(PROFILE_KEYS.interests,interests);localStorage.setItem(PROFILE_KEYS.bio,bio);localStorage.setItem('ith_auto_translate_content_r10f8',autoContent?'1':'0');localStorage.setItem('ith_registered_member_v249154','1')}catch(_e){}
 if(!autoContent)restoreUserContent(document.body);document.dispatchEvent(new CustomEvent('ithaki:auto-content-translation-changed',{detail:{enabled:autoContent}}));try{typeof window.persistProfile==='function'&&window.persistProfile()}catch(_e){}try{await window.syncProfileNow(true)}catch(_e){}notice.textContent=core('saved');notice.className='ok';toast(core('saved'));setTimeout(()=>{e.remove();decorateHome();try{if(st.page==='profile'&&typeof window.renderProfile==='function')window.renderProfile()}catch(_e){}},450);return false;
}
function decorateHome(){const old=$('ith537HomeProfileCard');if(old)old.remove();return false}
function decorateProfile(){const p=$('profilePage');if(!p||!p.classList.contains('active'))return;let old=p.querySelector('#ith537ProfileExtension');if(old)old.remove();const box=document.createElement('section');box.id='ith537ProfileExtension';box.className='card ith537ProfileExtension';box.innerHTML=`<div><b>🌍 ${esc(core('language'))}</b><small>${esc((LANG_MAP[lang()]||{}).name||lang())}</small></div><button type="button" data-open-language>${esc(core('changeLanguage'))}</button><button type="button" class="gold" data-open-profile>👤 ${esc(core('fullProfile'))}</button>`;box.querySelector('[data-open-language]').onclick=()=>openLanguagePicker(false);box.querySelector('[data-open-profile]').onclick=()=>openFullProfile(false);p.prepend(box);p.querySelectorAll('.profilePanelClean').forEach(x=>{if(/Menu language|Γλώσσα μενού|Content translation|Μετάφραση περιεχομένου/i.test(x.textContent||''))x.style.display='none'})}
function cleanupOldTranslationControls(){document.querySelectorAll('.ith536WallTools,.ith536OverlayTools,.ith536TranslateControls,.ith536Translated').forEach(e=>e.remove());document.querySelectorAll('.ith536TranslateHost').forEach(w=>{const p=w.parentNode;if(!p)return;while(w.firstChild)p.insertBefore(w.firstChild,w);w.remove()});document.querySelectorAll('[data-r10f6-language],[data-r10f6-translate-view],[data-r10f6-translate]').forEach(e=>e.remove())}
function shouldSkipElement(e){if(!e)return true;if(e.closest('script,style,noscript,code,pre,svg,canvas,input,textarea,select,[contenteditable="true"],#ith537LanguageModal,#ith537FullProfileModal'))return true;if(e.matches('[data-no-translate],.notranslate'))return true;return false}
function isUserContent(e){return !!e.closest('.bubble,.msgBody,.commentText,.postBody,.ith534PostText,.ith534Reply,.bottleItemV249274,.bottleReplyBoxV249274,.spaceMessage,.communityMessage,[data-message-id],[data-wall],[data-reply-id]')}
function autoContentEnabled(){try{return localStorage.getItem('ith_auto_translate_content_r10f8')!=='0'}catch(_e){return true}}
function restoreUserContent(root){(root||document).querySelectorAll('[data-r10f7-original-text]').forEach(e=>{if(!isUserContent(e))return;if(e.childNodes.length===1&&e.firstChild.nodeType===3)e.firstChild.nodeValue=e.dataset.r10f7OriginalText;delete e.dataset.r10f7OriginalText;delete e.dataset.r10f7TranslatedLang})}
function translatableTextNode(n){const e=n.parentElement;if(shouldSkipElement(e))return false;if(isUserContent(e)&&!autoContentEnabled())return false;const t=(n.nodeValue||'').trim();if(!t||t.length<2||t.length>900)return false;if(/^([\d\s:.,+\-–—/()%#@]+)$/.test(t))return false;if(/^(https?:|www\.|[\w.-]+@[\w.-]+\.)/i.test(t))return false;if(e.closest('.nickname,.memberName,.userName,.date,time,.filename,.fileName,.counter,[data-no-content-translate]'))return false;return /[\p{L}]/u.test(t)}
function restoreTranslated(root){(root||document).querySelectorAll('[data-r10f7-original-text]').forEach(e=>{if(e.childNodes.length===1&&e.firstChild.nodeType===3)e.firstChild.nodeValue=e.dataset.r10f7OriginalText;delete e.dataset.r10f7OriginalText;delete e.dataset.r10f7TranslatedLang});(root||document).querySelectorAll('[data-r10f7-original-placeholder]').forEach(e=>{e.setAttribute('placeholder',e.dataset.r10f7OriginalPlaceholder);delete e.dataset.r10f7OriginalPlaceholder;delete e.dataset.r10f7PlaceholderLang})}
async function translateBatch(items,target){if(!items.length||target==='el')return items.map(x=>x.text);const result=new Array(items.length),missing=[];items.forEach((x,i)=>{const k=target+'\0'+x.text;if(memoryCache.has(k))result[i]=memoryCache.get(k);else missing.push({i,text:x.text})});if(missing.length){try{const r=await fetch(api('/api/bridge/translate/batch_v249526r10f7'),{method:'POST',headers:{'Content-Type':'application/json'},credentials:'include',body:JSON.stringify({texts:missing.map(x=>x.text),source_lang:'auto',target_lang:target,allow_external:true,external_provider:'auto'})});if(r.ok){const d=await r.json(),arr=d.translations||[];missing.forEach((x,j)=>{const v=String(arr[j]?.translated||arr[j]||x.text);result[x.i]=v;memoryCache.set(target+'\0'+x.text,v)})}else throw new Error('HTTP '+r.status)}catch(_e){missing.forEach(x=>result[x.i]=x.text);if(target!=='en')toast(core('translationUnavailable'),6000)}saveCache()}return result}
async function translateVisible(force=false){if(translating)return;const target=lang();if(target==='el'){restoreTranslated(document.body);return}translating=true;try{const nodes=[],attrs=[];const w=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT);let n;while((n=w.nextNode())){if(!translatableTextNode(n))continue;const e=n.parentElement;if(!e.dataset.r10f7OriginalText)e.dataset.r10f7OriginalText=n.nodeValue;const source=e.dataset.r10f7OriginalText.trim();if(!source||(!force&&e.dataset.r10f7TranslatedLang===target))continue;nodes.push({node:n,el:e,text:source,user:isUserContent(e)});if(nodes.length>=450)break}document.querySelectorAll('input[placeholder],textarea[placeholder]').forEach(e=>{if(shouldSkipElement(e))return;if(!e.dataset.r10f7OriginalPlaceholder)e.dataset.r10f7OriginalPlaceholder=e.getAttribute('placeholder')||'';if(e.dataset.r10f7OriginalPlaceholder&& (force||e.dataset.r10f7PlaceholderLang!==target))attrs.push({el:e,text:e.dataset.r10f7OriginalPlaceholder})});const all=nodes.map(x=>({text:x.text})).concat(attrs.map(x=>({text:x.text})));const out=await translateBatch(all,target);nodes.forEach((x,i)=>{if(document.contains(x.node)){x.node.nodeValue=out[i]||x.text;x.el.dataset.r10f7TranslatedLang=target}});attrs.forEach((x,j)=>{x.el.setAttribute('placeholder',out[nodes.length+j]||x.text);x.el.dataset.r10f7PlaceholderLang=target})}finally{translating=false}}
function scheduleTranslate(force=false){clearTimeout(translateTimer);translateTimer=setTimeout(()=>translateVisible(force),120)}
function decorate(){renderTopLanguage();cleanupOldTranslationControls();decorateHome();decorateProfile();document.documentElement.setAttribute('data-ithaki-r10f7','global-language-full-profile');document.body&&document.body.setAttribute('data-ui-lang',lang())}
function installOverrides(){window.uiLang=lang;window.setUiLang=(c)=>setLanguage(c);window.ITH_FORCE_LANG=(c)=>setLanguage(c);window.uiText=(s)=>String(s??'');I().setUiLang=(c)=>setLanguage(c);I().openGlobalLanguageR10F7=()=>openLanguagePicker(false);I().openFullProfileR10F7=()=>openFullProfile(false);I().globalLanguageR10F7=lang;I().translateText=async text=>(await translateBatch([{text:String(text||'')}],lang()))[0]}
function scan(){installOverrides();decorate();scheduleTranslate(false)}
function install(){installOverrides();decorate();try{localStorage.setItem(LANG_SET,'1')}catch(_e){}closeLanguagePicker();observer=new MutationObserver(()=>{clearTimeout(scanTimer);scanTimer=setTimeout(scan,90)});observer.observe(document.body,{subtree:true,childList:true});document.addEventListener('visibilitychange',()=>{if(!document.hidden)scan()},{passive:true});window.addEventListener('ithaki:page-changed',scan);setInterval(scan,2800);scheduleTranslate(true)}
const style=document.createElement('style');style.id='ith537Styles';style.textContent=`
.ith537TopLanguage{display:flex!important;align-items:center;gap:6px;max-width:210px;min-height:36px;padding:6px 10px!important;border-radius:999px!important;background:color-mix(in srgb,var(--accent,#55d7ff) 16%,transparent)!important;border:1px solid color-mix(in srgb,var(--accent,#55d7ff) 42%,transparent)!important}.ith537TopLanguage b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ith537TopLanguage i{font-style:normal;opacity:.75}
.ith537Modal{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:14px;background:rgba(1,8,16,.78);backdrop-filter:blur(10px)}.ith537ModalCard{width:min(760px,96vw);max-height:92dvh;overflow:auto;border-radius:26px;padding:18px;background:linear-gradient(155deg,color-mix(in srgb,var(--panel,#0b2030) 94%,#fff 6%),color-mix(in srgb,var(--bg,#071321) 96%,#000 4%));border:1px solid color-mix(in srgb,var(--accent,#55d7ff) 32%,var(--line,#264455));box-shadow:0 28px 90px rgba(0,0,0,.55);color:var(--text,#fff)}.ith537ModalHead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.ith537ModalHead h2{margin:0 0 6px;color:var(--gold,#f5c451)}.ith537ModalHead p{margin:0;color:var(--muted,#a9bfcc)}.ith537ModalHead>button{width:40px;height:40px;border-radius:50%}.ith537LangSearch{width:100%;margin:16px 0 10px}.ith537LangGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px}.ith537LangCard{display:flex;align-items:center;gap:9px;min-height:48px;padding:9px 11px;border-radius:15px;border:1px solid var(--line,#29485a);background:rgba(255,255,255,.045);text-align:left;color:var(--text,#fff)}.ith537LangCard span{font-size:23px}.ith537LangCard.active{border-color:var(--green,#36f0a0);box-shadow:0 0 0 2px color-mix(in srgb,var(--green,#36f0a0) 18%,transparent)}.ith537ModalFoot{padding-top:12px;color:var(--muted,#a9bfcc)}
.ith537ProfileGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.ith537ProfileGrid label{display:grid;gap:6px}.ith537ProfileGrid label.wide{grid-column:1/-1}.ith537ProfileGrid span{font-weight:850;color:var(--muted,#a9bfcc)}.ith537ProfileGrid input,.ith537ProfileGrid select,.ith537ProfileGrid textarea{width:100%}.ith537Check{display:flex;gap:10px;align-items:flex-start;padding:12px;margin:9px 0;border-radius:16px;background:rgba(255,255,255,.045);border:1px solid var(--line,#29485a)}.ith537Check input{width:22px;height:22px;flex:0 0 auto}.ith537ProfileActions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:14px}.ith537ProfileActions .save{background:color-mix(in srgb,var(--green,#36f0a0) 22%,transparent);border-color:var(--green,#36f0a0)}#ith537ProfileNotice{margin-top:10px;font-weight:800}#ith537ProfileNotice.error{color:#ff9b9b}#ith537ProfileNotice.ok{color:var(--green,#36f0a0)}
.ith537HomeProfileCard{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;padding:13px 15px;border-radius:19px;background:linear-gradient(120deg,color-mix(in srgb,var(--accent,#55d7ff) 13%,var(--panel,#0b2030)),color-mix(in srgb,var(--gold,#f5c451) 9%,var(--panel,#0b2030)));border:1px solid color-mix(in srgb,var(--accent,#55d7ff) 35%,var(--line,#29485a))}.ith537ProfileIdentity{display:flex;align-items:center;gap:10px;min-width:0}.ith537ProfileIdentity>span{font-size:28px}.ith537ProfileIdentity div{display:grid;min-width:0}.ith537ProfileIdentity b,.ith537ProfileIdentity small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ith537ProfileIdentity small{color:var(--muted,#a9bfcc)}.ith537HomeProfileCard>button{white-space:nowrap;background:color-mix(in srgb,var(--gold,#f5c451) 17%,transparent);border-color:color-mix(in srgb,var(--gold,#f5c451) 55%,transparent)}.ith537HomeProfileCard.incomplete{border-color:#ffb347}.ith537ProfileExtension{display:grid;grid-template-columns:1fr auto auto;gap:9px;align-items:center}.ith537ProfileExtension>div{display:grid}.ith537ProfileExtension small{color:var(--muted,#a9bfcc)}
.ith536WallTools,.ith536OverlayTools,.ith536TranslateControls,.ith536Translated,[data-r10f6-language],[data-r10f6-translate-view],[data-r10f6-translate]{display:none!important}
@media(max-width:620px){.ith537ProfileGrid{grid-template-columns:1fr}.ith537ProfileGrid label.wide{grid-column:auto}.ith537ProfileExtension{grid-template-columns:1fr 1fr}.ith537ProfileExtension>div{grid-column:1/-1}.ith537HomeProfileCard{align-items:stretch;flex-direction:column}.ith537HomeProfileCard>button{width:100%}.ith537TopLanguage b{display:none}.ith537TopLanguage{max-width:54px}}
`;document.head.appendChild(style);
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',install,{once:true});else install();
})();
