/* HeDoiX colour and study navigation refresh; original character assets untouched. */
#app .tolk-side{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-top:20px;gap:6px}
#app .tolk-side-label{padding-bottom:10px}
#app .tolk-nav{gap:3px}
#app .tolk-nav button{min-height:44px;padding-block:9px}
#app .tolk-nav button[data-tolk-nav="numbers"] .ni{font-size:12px;font-weight:850}
#app .tolk-side-mentor{flex-shrink:0;margin-top:14px}
.tolk-mobile-nav-help{display:none}
#app .tolk-entry{border-top:3px solid var(--entry-color,#39e7e2);background:linear-gradient(145deg,#1a2b43f5,#151e33f5)}
#app .tolk-entry:nth-child(6n+1){--entry-color:#ffdb3d}
#app .tolk-entry:nth-child(6n+2){--entry-color:#db70ff}
#app .tolk-entry:nth-child(6n+3){--entry-color:#5df77a}
#app .tolk-entry:nth-child(6n+4){--entry-color:#39e7e2}
#app .tolk-entry:nth-child(6n+5){--entry-color:#ff9357}
#app .tolk-entry:nth-child(6n){--entry-color:#35aeff}
#app .tolk-entry h3{color:var(--entry-color);overflow-wrap:anywhere}
#app .tolk-entry .tolk-context{border-left:2px solid var(--entry-color);padding-left:10px;margin-block:13px;color:#f5f7fd}
#app .tolk-entry .tolk-context-translation{color:#c7d6e7;font-size:12px}
.tb-pron-hint{margin:10px 0;padding:10px;border:1px solid #445a72;border-radius:10px;background:#0c182cbf;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#app .tb-pron-hint p{font-size:12px;margin:5px 0;color:#c5d5e9}
#app .tb-pron-hint strong{display:block;color:#ffe18a;letter-spacing:.025em;font-size:19px;line-height:1.45;margin-top:4px;font-weight:750}
#app .tb-pron-hint .tb-pron-key{font-size:11px;color:#9eb4cb;margin-top:8px}
#app .tb-pron-hint .tb-pron-tip{font-size:12px;line-height:1.5;color:#d4e4ef}
#app .tb-pron-hint a{color:#83e4db;text-underline-offset:3px}
.tb-pron-hint summary{cursor:pointer;color:#9ededa;padding:4px 0}
#app .tb-pron-hint .tb-pron-ipa{font-family:'DejaVu Sans','Segoe UI',sans-serif;font-size:15px;color:#d9c8ff}
.tolk-source-details{font-size:12px;margin-block:10px;color:#c7d7e8;line-height:1.6}
.tolk-source-details summary{cursor:pointer;padding-block:5px}
.tolk-source-details a{color:#78dedc;display:block;overflow-wrap:anywhere}
.tolk-dictionary-status{font-size:12px;line-height:1.6;max-width:75ch;color:#c5d9ed;margin:8px 0 12px}
#app .tolk-actions{flex-wrap:wrap}
#app .memory-grid{gap:12px;padding:8px 2px}
#app .memory-card{position:relative;min-height:88px;border:2px solid var(--card-color,#39e7e2);border-radius:15px;color:#f7fbff;font-size:17px;font-weight:750;line-height:1.35;padding:16px;box-shadow:0 5px 20px #0003;background:linear-gradient(135deg,var(--card-shade,#163a4c),#132039 80%);overflow-wrap:anywhere}
#app .memory-card:nth-child(6n+1){--card-color:#ffdb3d;--card-shade:#4c3c1c}
#app .memory-card:nth-child(6n+2){--card-color:#db70ff;--card-shade:#402752}
#app .memory-card:nth-child(6n+3){--card-color:#5df77a;--card-shade:#194534}
#app .memory-card:nth-child(6n+4){--card-color:#39e7e2;--card-shade:#174951}
#app .memory-card:nth-child(6n+5){--card-color:#ff9357;--card-shade:#513122}
#app .memory-card:nth-child(6n){--card-color:#35aeff;--card-shade:#1a3c5a}
#app .memory-card.covered{color:var(--card-color);font-size:32px;background:radial-gradient(circle at 80% 12%,var(--card-shade),transparent 65%),linear-gradient(135deg,#16263c,#0d192b)}
#app .memory-card.covered::after{content:'ODKRYJ';position:absolute;bottom:7px;left:0;right:0;font-size:9px;font-weight:700;letter-spacing:.18em;color:var(--card-color)}
#app .memory-card:hover:not(:disabled){box-shadow:0 0 20px color-mix(in srgb,var(--card-color) 30%,transparent)}
#app .memory-card.selected{border-color:#fff;background:linear-gradient(135deg,var(--card-shade),#27344d);outline:2px solid var(--card-color);outline-offset:2px}
#app .memory-card.matched,#app .match-card.matched{opacity:1;border-color:var(--pair-color);color:#faffff;box-shadow:inset 0 0 30px color-mix(in srgb,var(--pair-color) 20%,transparent);background:#132b3a}
#app .memory-card.matched::before{content:'✓';position:absolute;top:4px;right:9px;color:var(--pair-color);font-size:15px}
#app .memory-card.wrong{border-color:#ff9c7e;outline:2px dashed #ff9c7e;outline-offset:1px}
#app #screen-game .question-container{border:1px solid #456079;border-radius:20px;background:linear-gradient(135deg,#182941eF,#192139ef)}
#app #speech-status{max-width:calc(100% - 36px);line-height:1.45}
.tb-audio-state{padding:4px 14px;font-size:11px;line-height:1.45;color:#c8d8ed}
@media(min-width:761px) and (max-height:850px){#app .tolk-side-mentor{display:none}#app .tolk-side-footer{margin-top:5px}#app .tolk-side{padding-top:12px}#app .tolk-nav button{min-height:40px}}
@media(max-width:760px){
 #app .tolk-side{overflow:hidden;padding:4px 5px calc(5px + env(safe-area-inset-bottom));gap:0}
 #app .tolk-nav{overflow-x:auto;overscroll-behavior-x:contain;justify-content:flex-start;scrollbar-width:thin;gap:3px;scroll-snap-type:x proximity}
 #app .tolk-nav button{flex:0 0 65px;min-width:65px;min-height:51px;scroll-snap-align:center;padding:5px 2px;font-size:10px}
 .tolk-mobile-nav-help{display:block;font-size:9px;color:#a7bdd5;text-align:center;line-height:15px}
 #app .tolk-entry{padding:15px}
 #app .memory-card{min-height:87px;padding:15px 8px;font-size:15px}
 #app .memory-card.covered{font-size:28px}
 #app .memory-grid{gap:9px}
 #app #screen-study{padding-bottom:35px}
}
@media(prefers-reduced-motion:reduce){#app .memory-card,#app .tolk-topic-card{transition:none;transform:none}}

/* Compact HeDi bubble. Service details stay available in its settings. */
#app #hedi-dialog[hidden]{display:none}
#app #hedi-dialog{inset:auto 22px 24px auto;width:min(410px,calc(100% - 44px));height:auto;max-height:min(560px,calc(100% - 120px));border:1px solid #a5e7ed38;border-radius:24px 24px 10px 24px;background:rgba(13,29,46,.72);backdrop-filter:blur(22px) saturate(130%);-webkit-backdrop-filter:blur(22px) saturate(130%);box-shadow:0 16px 50px #0005,inset 0 1px 0 #ffffff0d;overflow:hidden}
#app #hedi-launch[aria-expanded="true"]{opacity:0;pointer-events:none}
#app #hedi-dialog .hedi-head{padding:10px 12px;gap:9px;min-height:60px;flex-shrink:0;background:transparent;border-bottom:1px solid #d0f8ff12}
#app #hedi-dialog .hedi-head img{width:34px;height:34px;object-fit:cover;border-radius:50%}
#app #hedi-title{font-size:17px;line-height:1.2;margin:0;color:#f2f9ff}
#app #hedi-mode{font-size:12px;line-height:1.2;color:#aec5d4}
#app #hedi-options-toggle,#app #hedi-close{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:#cde4ed;cursor:pointer}
#app #hedi-options-toggle{margin-left:auto}
#app #hedi-close{margin-left:0;font-size:25px;font-weight:400}
#app #hedi-options-toggle:hover,#app #hedi-close:hover,#app #hedi-options-toggle[aria-expanded="true"]{background:#a6f0ef12;color:#7df0df}
#app #hedi-dialog :focus-visible{outline:2px solid #67e6d8;outline-offset:2px}
#app #hedi-messages{flex:1 1 auto;min-height:0;max-height:330px;padding:14px 14px 0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#779cab66 transparent}
#app #hedi-messages:empty{display:none}
#app #hedi-dialog .chat-msg{width:fit-content;max-width:95%;padding:10px 13px;margin:0 0 10px;line-height:1.55;font-size:16px;border-radius:16px;background:#dfedff0a;border:1px solid #d4eeff0c;color:#eff7ff}
#app #hedi-dialog .chat-msg.user{margin-left:auto;border-radius:16px 16px 5px 16px;background:#20cdbf20;border-color:#5be4d52b;color:#c4fff5}
#app #hedi-dialog .chat-msg.assistant{margin-right:auto;border-radius:16px 16px 16px 5px}
#app #hedi-dialog .tts-btn{width:32px;min-width:32px;height:32px;padding:3px;margin:3px 0 0 5px;border:0;background:transparent;font-size:17px;opacity:.8;vertical-align:middle}
#app #hedi-form{align-items:flex-end;gap:8px;flex-shrink:0;padding:12px;margin:0;background:transparent}
#app #hedi-input{display:block;box-sizing:border-box;resize:none;min-width:0;min-height:46px;height:46px;max-height:120px;overflow-y:auto;padding:11px 13px;margin:0;border:1px solid #a2dbe02e;border-radius:16px;background:#06162350;font:inherit;font-size:16px;line-height:1.4;color:#f3fbff;scrollbar-width:thin}
#app #hedi-input::placeholder{color:#a5becb;opacity:1}
#app #hedi-input:focus-visible{outline:0;border-color:#54dfcf9c;box-shadow:0 0 0 2px #3ee7d21f}
#app #hedi-form button[type="submit"]{flex:0 0 74px;min-height:46px;margin:0;padding:11px 10px;border:1px solid #8af6e738;border-radius:16px;background:#36d6c7;color:#062b30;font:inherit;font-size:14px;font-weight:750;box-shadow:none}
#app #hedi-form button[type="submit"]:disabled{opacity:.5;cursor:default}
#app #hedi-thinking{padding:3px 14px 0;gap:8px;font-size:14px;color:#b7d3dc}
#app #hedi-thinking button{min-height:36px;padding:6px 10px;font:inherit;font-size:14px;background:#162c3b60;border-color:#95dcd82c}
#app #hedi-options{flex:0 1 auto;min-height:0;max-height:230px;overflow-y:auto;padding:12px 14px;background:#071a2899;border-bottom:1px solid #d0f8ff17;font-size:14px;line-height:1.5}
#app #hedi-options[hidden]{display:none}
#app #hedi-options .hedi-language-row{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#e1edf4}
#app #hedi-language{min-height:40px;max-width:170px;margin:0;padding:7px 27px 7px 10px;font-size:14px;border-color:#7bb4b84d;background-color:#102c3c;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23cde4ed' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
#app #hedi-options #hedi-energy,#app #hedi-options .tb-audio-state,#app #hedi-options .hedi-note{margin:10px 0 0;padding:0;border:0;font-size:14px;line-height:1.5;color:#bbcfdb}
@media(max-width:760px){
 #app #hedi-dialog{inset:auto 12px calc(92px + env(safe-area-inset-bottom)) 12px;width:auto;max-height:min(520px,calc(100dvh - 210px));border-radius:22px 22px 9px 22px}
 #app #hedi-dialog .hedi-head{padding:8px 10px}
 #app #hedi-form{padding:10px}
 #app #hedi-messages{padding:12px 12px 0}
}
@media(max-height:520px){
 #app #hedi-dialog{bottom:12px;max-height:calc(100dvh - 32px)}
 #app #hedi-dialog .hedi-head{min-height:48px;padding-block:4px}
}
@media(prefers-reduced-transparency:reduce){#app #hedi-dialog{background:#112639;backdrop-filter:none;-webkit-backdrop-filter:none}}
@supports not (backdrop-filter:blur(1px)){#app #hedi-dialog{background:rgba(13,29,46,.95)}}
