/* OK ITHAKI V249526R10F17 — OLD+NEW MOBILE LEXICON / MODERN HOME / COMMUNITY TRANSLATION / EXTERNAL TYPE-TIME CALENDAR */
(function(){
'use strict';
if(window.__ITHAKI_V249526R10F17_OWNER__)return;
window.__ITHAKI_V249526R10F17_OWNER__={version:'V249526R10F17',oldNewLexicon:true,mobileLexicon:true,modernHome:true,communityDirectSend:true,communityTranslation:true,externalTypeTimeCalendar:true,at:Date.now()};
window.LEXICON_OLD_PLUS_NEW_MOBILE_R10F17=true;
window.HOME_MODERN_COLORED_PICTOGRAMS_R10F17=true;
window.COMMUNITY_DIRECT_SEND_NO_ALIAS_R10F17=true;
window.COMMUNITY_TEXT_TRANSLATION_R10F17=true;
window.EXTERNAL_MESSAGES_TYPE_TIME_CALENDAR_R10F17=true;
const $=id=>document.getElementById(id);
function addCss(){if($('ithR10F17Css'))return;const s=document.createElement('style');s.id='ithR10F17Css';s.textContent=`
body[data-page="home"] .homeMenu.professionalHomeGrid{gap:12px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
body[data-page="home"] .homeMenu.professionalHomeGrid .homeModernTileR10F17{position:relative;overflow:hidden;min-height:112px!important;border-radius:24px!important;padding:14px 11px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:7px!important;border:1px solid color-mix(in srgb,var(--home17,#55d7ff) 58%,rgba(255,255,255,.18))!important;background:linear-gradient(145deg,color-mix(in srgb,var(--home17,#55d7ff) 23%,rgba(8,25,39,.96)),rgba(7,18,31,.96))!important;box-shadow:0 14px 30px rgba(0,0,0,.30),inset 0 1px rgba(255,255,255,.11)!important}
body[data-page="home"] .homeModernTileR10F17::after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;right:-28px;top:-34px;background:color-mix(in srgb,var(--home17,#55d7ff) 22%,transparent);filter:blur(1px)}
body[data-page="home"] .homeModernIconR10F17{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;font-size:30px;line-height:1;background:linear-gradient(145deg,color-mix(in srgb,var(--home17,#55d7ff) 42%,#fff 8%),color-mix(in srgb,var(--home17,#55d7ff) 22%,#06131e));border:1px solid color-mix(in srgb,var(--home17,#55d7ff) 72%,#fff 12%);box-shadow:0 9px 20px color-mix(in srgb,var(--home17,#55d7ff) 22%,transparent)}
body[data-page="home"] .homeModernTileR10F17 b{font-size:14px!important;color:#fff!important;z-index:1}body[data-page="home"] .homeModernTileR10F17 span:not(.homeModernIconR10F17){font-size:11px!important;color:rgba(235,247,255,.76)!important;text-align:center;z-index:1}
body[data-page="home"] .ithActionV249461{transition:transform .16s ease,filter .16s ease}body[data-page="home"] .ithActionV249461:active,body[data-page="home"] .homeModernTileR10F17:active{transform:scale(.975)!important;filter:brightness(1.08)}
#ithLexicon1R10F8 .lexR8Tabs{position:sticky;top:64px;z-index:7;padding:7px 3px;background:color-mix(in srgb,var(--bg,#06131e) 94%,transparent);backdrop-filter:blur(16px)}
#ithLexicon1R10F8 .lexLegacyQuickR10F17{display:grid;gap:9px;padding:13px;border-radius:20px;background:linear-gradient(145deg,color-mix(in srgb,var(--gold,#f5c451) 10%,var(--panel,#0b2030)),var(--panel,#0b2030));border:1px solid color-mix(in srgb,var(--gold,#f5c451) 38%,var(--line,#29485a))}
#ithLexicon1R10F8 .lexLegacyQuickR10F17 h3{margin:0;color:var(--gold,#f5c451);font-size:15px}.lexLegacyQuickR10F17 p{margin:0;color:var(--muted,#a9bfcc);font-size:12px}.lexLegacyQuickGridR10F17{display:grid;grid-template-columns:1fr 1fr;gap:8px}.lexLegacyQuickGridR10F17 label{display:grid;gap:5px}.lexLegacyQuickGridR10F17 span{font-size:11px;color:var(--muted,#a9bfcc);font-weight:850}.lexLegacyQuickGridR10F17 input,.lexLegacyQuickGridR10F17 select{width:100%;min-height:45px;border-radius:14px;padding:10px;background:color-mix(in srgb,var(--panel,#0b2030) 90%,#000 10%);color:var(--text,#fff);border:1px solid var(--line,#29485a)}.lexLegacyQuickActionsR10F17{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.lexLegacyQuickActionsR10F17 label{display:flex;align-items:center;gap:8px;color:var(--muted,#a9bfcc);font-size:12px}.lexLegacyQuickActionsR10F17 input{width:21px;height:21px}.lexLegacyQuickActionsR10F17 button{min-height:46px;border-radius:15px;border:1px solid var(--green,#36f0a0);background:color-mix(in srgb,var(--green,#36f0a0) 18%,var(--panel,#0b2030));font-weight:950}
#spaceMsgs .ithCommunityTranslateR10F17{display:inline-flex;align-items:center;gap:5px;margin-top:7px;padding:5px 9px;border-radius:999px;border:1px solid color-mix(in srgb,var(--accent,#55d7ff) 55%,var(--line,#29485a));background:color-mix(in srgb,var(--accent,#55d7ff) 12%,var(--panel,#0b2030));color:var(--text,#fff);font-size:10px;font-weight:900}#spaceMsgs .ithCommunityTranslateR10F17.on{border-color:var(--gold,#f5c451);color:var(--gold,#f5c451)}
.ith527CalendarTypeR10F17{display:grid;gap:7px;margin:9px 0 13px}.ith527CalendarTypeR10F17>h4{margin:0;padding:7px 9px;border-radius:12px;background:rgba(255,255,255,.06);color:#ffe39b;font-size:12px}.ith527CalendarTimeR10F17{white-space:nowrap;color:#8fe3ff;font-weight:900}
@media(max-width:620px){body[data-page="home"] .homeMenu.professionalHomeGrid{gap:9px!important}body[data-page="home"] .homeMenu.professionalHomeGrid .homeModernTileR10F17{min-height:105px!important;border-radius:20px!important;padding:10px 7px!important}.homeModernIconR10F17{width:54px!important;height:54px!important;border-radius:18px!important;font-size:28px!important}#ithLexicon1R10F8 .lexR8Top{min-height:58px!important}#ithLexicon1R10F8 .lexR8Tabs{top:58px}#ithLexicon1R10F8 .lexR8Tabs button{min-height:44px;padding:0 12px}.lexLegacyQuickGridR10F17{grid-template-columns:1fr}.lexLegacyQuickActionsR10F17{grid-template-columns:1fr}.lexLegacyQuickActionsR10F17 button{width:100%}}
`;document.head.appendChild(s)}
const colors=['#4da3ff','#35d38a','#ff6b6b','#f6c453','#a879ff','#2ed6d0'];
function decorateHome(){const root=$('homePage');if(!root)return;const base=[...root.querySelectorAll('.homeMenu.professionalHomeGrid button.tile')];base.forEach((b,i)=>{b.classList.add('homeModernTileR10F17');b.style.setProperty('--home17',colors[i%colors.length]);let bold=b.querySelector(':scope>b');if(bold&&!bold.querySelector('.homeModernIconR10F17')){const text=String(bold.textContent||'').trim(),m=text.match(/^(\S+)\s+(.*)$/s);if(m&&/[\p{Extended_Pictographic}＋▶]/u.test(m[1])){bold.innerHTML='<span class="homeModernIconR10F17">'+m[1]+'</span><span>'+m[2]+'</span>'}}});root.querySelectorAll('.ithActionV249461').forEach((b,i)=>b.style.setProperty('--home17',colors[i%colors.length]));root.dataset.r10f17Modern='1'}
function install(){addCss();decorateHome();const home=$('homePage');if(home){const mo=new MutationObserver(()=>{clearTimeout(mo._t);mo._t=setTimeout(decorateHome,60)});mo.observe(home,{subtree:true,childList:true})}document.addEventListener('ithaki:page-changed',()=>{if(document.body?.dataset.page==='home')setTimeout(decorateHome,40)});document.documentElement.setAttribute('data-ithaki-r10f17','lexicon-mobile-home-community-translation-external-calendar');try{localStorage.setItem('ith_frontend_build','V249526R10F18-community-stable-special-home')}catch(_e){}}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',install,{once:true});else install();
})();
