:is(.bb-skrivebord,.bb-oversaettelse) .counter-nav-div .ctl-sub .dict-language {
  display:inline-flex!important;align-items:center;justify-content:center;gap:7px;
  width:auto!important;min-width:64px!important;height:40px!important;padding:0 7px!important;
  border:0!important;border-radius:8px!important;background:transparent!important;color:var(--ed-ink)!important;
  box-shadow:none!important;transform:none!important;transition:background-color .12s,color .12s!important;
  font:600 13px/1 Inter,system-ui,sans-serif;cursor:pointer;white-space:nowrap;
}
:is(.bb-skrivebord,.bb-oversaettelse) .counter-nav-div .ctl-sub .dict-language:hover:not(:disabled),
:is(.bb-skrivebord,.bb-oversaettelse) .counter-nav-div .ctl-sub .dict-language[aria-expanded=true],
.dict-mobile:hover,.dict-mobile[aria-expanded=true]{background:var(--ed-hover)!important;color:var(--ed-ink)!important}
.dict-language:focus-visible,.dict-panel :is(button,input):focus-visible{outline:2px solid var(--reader-accent,#3e6c52);outline-offset:2px}
.dict-language svg{width:10px!important;height:10px!important;flex:none}
.dict-language::before,.dict-language::after{content:none!important}
.dict-language bdi{display:inline-flex;align-items:center;gap:5px}
.dict-language img{width:20px!important;height:14px!important;max-width:none;border-radius:2px}
.dict-panel{position:fixed;z-index:100000;width:264px;max-width:calc(100vw - 24px);box-sizing:border-box;overflow:auto;padding:20px 18px;border:1px solid #d5ddd0;border-radius:18px;box-shadow:0 12px 32px rgba(30,43,33,.16);background:#fffefb;color:#26241f;font:14px/1.4 Inter,system-ui,sans-serif}
.dict-panel[hidden]{display:none!important}
.dict-panel h2{font:600 14px/1.4 Inter,system-ui,sans-serif;margin:0 0 8px}
.dict-panel fieldset{border:0;padding:0;margin:0}.dict-panel legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.dict-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#e9eee3;border:1px solid #d5ddd0;border-radius:10px;padding:3px;gap:3px;margin-bottom:0}
.dict-options label{min-width:0;position:relative;cursor:pointer;text-align:center;margin:0;padding:0}
.dict-options input{position:absolute;opacity:0;width:100%;height:100%;inset:0;margin:0;cursor:pointer}
.dict-options span{display:flex;justify-content:center;align-items:center;min-height:44px;padding:5px 3px;box-sizing:border-box;border-radius:8px;font-size:14px;line-height:20px;font-weight:500;color:#62564a}
.dict-options input:checked+span{background:#fffefb;color:#3e6c52;font-weight:600;box-shadow:0 1px 3px #00000008}
.dict-options input:focus-visible+span{outline:2px solid #3e6c52;outline-offset:-2px}
[data-theme=dark] .dict-panel{background:#26332c;border-color:#4b5b4d;color:#eeeae1}
[data-theme=dark] .dict-options span{color:#d2cbbf}
[data-theme=dark] .dict-options{background:#1e2a23;border-color:#4b5b4d}
[data-theme=dark] .dict-options input:checked+span{background:#34473e;color:#f1f4ed;border-color:#596a5a}
.dict-mobile{display:none}
@media(max-width:767px){#sk-edit-toolbar:has(.dict-mobile){gap:6px;padding-inline:8px}#sk-edit-toolbar:has(.dict-mobile) .sk-tb-primary{min-width:0;flex:1;padding-inline:8px}.dict-mobile{display:inline-flex;align-items:center;gap:5px;border:0;border-radius:8px;background:transparent;color:inherit;font:600 12px Inter,system-ui,sans-serif;min-height:44px;min-width:44px;max-width:90px;padding:0 8px;flex:0 1 auto}.dict-mobile bdi{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dict-mobile svg{width:10px;height:10px;flex:none}}

.dict-options input:disabled+span{opacity:.45;cursor:not-allowed}.dict-language:disabled{opacity:.65;cursor:default}

@media(max-width:360px){.dict-mobile{padding:0 4px;min-width:48px;gap:0}.dict-mobile svg{display:none}}

.dict-panel .dict-help{margin:8px 0 0;font-size:11px;line-height:1.4;font-weight:400;color:inherit}

.dict-panel .dict-select{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-width:0;min-height:44px;padding:5px 8px;box-sizing:border-box;border:0;border-radius:8px;background:transparent;color:#62564a;cursor:pointer}
.dict-select svg{width:10px;height:10px;flex:none}.dict-select .dict-globe{width:18px;height:18px}
.dict-select img,.dict-language-list img{width:21px;height:15px;object-fit:contain;flex:none}
.dict-panel .dict-select:hover{background:var(--ss-hover,#e2e8dd)}
.dict-panel .dict-select.is-selected{background:#fffefb;color:#3e6c52;box-shadow:0 1px 3px #00000008}
.dict-select:focus-visible{outline:2px solid #3e6c52;outline-offset:-2px}
.dict-language-list{position:fixed;z-index:100001;box-sizing:border-box;width:236px;max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain;padding:8px;background:var(--ss-surface,#fffefb);color:var(--ss-text,#26241f);border:1px solid var(--ss-border,#d5ddd0);border-radius:16px;box-shadow:var(--ss-shadow,0 12px 32px #1e2b2129);scrollbar-width:thin;scroll-padding:8px}
.dict-language-list[hidden]{display:none!important}
.dict-language-list button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:500 14px/20px Inter,Arial,sans-serif;text-align:start;cursor:pointer}
.dict-language-list .dict-row:hover{background:var(--ss-hover,#edf1e9)}
.dict-language-list button:focus-visible{outline:none}
.dict-language-list button:focus-visible{box-shadow:inset 0 0 0 2px var(--ss-on-selected,#3e6c52)}
.dict-language-list .dict-row:has(.dict-choice[aria-pressed=true]){background:var(--ss-selected,#e4eee7);color:var(--ss-on-selected,#3e6c52)}
[data-theme=dark] .dict-panel .dict-select{color:#d2cbbf}[data-theme=dark] .dict-panel .dict-select.is-selected{background:#34473e;color:#f1f4ed}

.dict-language-list .dict-row{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;border-radius:8px}
.dict-row>[role=gridcell]{min-width:0}
.dict-language-list .dict-choice{padding-inline:12px 4px;min-width:0}
.dict-choice bdi{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dict-language-list .dict-favorite{width:40px;min-height:44px;justify-content:center;padding:0;color:#939393}
.dict-favorite svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;flex:none}
.dict-language-list .dict-favorite[aria-pressed=true]{color:#b78310}
.dict-favorite[aria-pressed=true] svg{fill:#e9b83d;stroke:#b78310}
.dict-favorite:disabled{cursor:default;opacity:.5}
.dict-favorite-status{font:12px/1.4 Inter,system-ui,sans-serif;margin:8px 0 0;color:#a13222}
[data-theme=dark] .dict-language-list .dict-favorite{color:#b4b4b4}
[data-theme=dark] .dict-language-list .dict-favorite[aria-pressed=true]{color:#f1c75a}
[data-theme=dark] .dict-favorite[aria-pressed=true] svg{fill:#f1c75a;stroke:#f1c75a}
[data-theme=dark] .dict-favorite-status{color:#ffb5aa}

/* Keep the fast Danish qualifier readable within the existing 44px segment. */
.dict-options span{flex-direction:column}
.dict-options small{font:500 11px/14px Inter,system-ui,sans-serif}

/* Translator mobile labels need a block box for text-overflow to render. */
:is(body#translation-shared,body:has(#chat-app)) .dict-mobile bdi{display:block;min-width:0}

/* Separate neighboring state fills; preserve independent language and star actions. */
.dict-language-list .dict-row + .dict-row{margin-top:4px}
/* Toolbar icon resets must not squeeze the text-bearing language control. */
html body :is(#st-source-toolbar,.counter-nav-div) .ctl-sub .dict-language,
html body #st-source-toolbar .dict-language{width:auto!important;min-width:64px!important;padding-inline:12px!important;flex-shrink:0!important}

/* Keep desktop speech settings evenly inset without changing the phone panel. */
@media(min-width:768px){:is(body#translation-shared,body:has(#chat-app)) .dict-panel{padding:18px}}

/* Compact desktop dictation search; native phone markup and styles remain unchanged. */
:is(body#translation-shared,body:has(#chat-app)) .dict-language-list.dict-has-search{display:flex;flex-direction:column;overflow:hidden}
:is(body#translation-shared,body:has(#chat-app)) .dict-has-search .dict-search{display:flex;align-items:center;gap:8px;flex:0 0 42px;min-height:42px;margin-bottom:8px;padding:0 10px;border:1px solid var(--ss-border,#d5ddd0);border-radius:10px;background:var(--ss-canvas,#faf7f3);color:var(--ss-muted,#62564a)}
:is(body#translation-shared,body:has(#chat-app)) .dict-search>svg{width:16px;height:16px;flex:none}
:is(body#translation-shared,body:has(#chat-app)) .dict-search>input{width:100%;min-width:0;height:100%;padding:0;border:0;outline:0;box-shadow:none;background:transparent!important;color:var(--ss-text,#26241f);font:400 14px/20px Inter,Arial,sans-serif}
:is(body#translation-shared,body:has(#chat-app)) .dict-search>input::placeholder{color:var(--ss-muted,#62564a);opacity:1}
:is(body#translation-shared,body:has(#chat-app)) .dict-search-rows{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding:4px}
:is(body#translation-shared,body:has(#chat-app)) .dict-has-search :is(.dict-row,.dict-search-rows,.dict-search-empty)[hidden]{display:none!important}
:is(body#translation-shared,body:has(#chat-app)) .dict-search-empty{padding:10px 12px;color:var(--ss-muted,#62564a);font:400 14px/20px Inter,Arial,sans-serif}

/* Match the native search-clear action to the existing neutral line icons. */
:is(body#translation-shared,body:has(#chat-app)) .dict-search>input::-webkit-search-cancel-button{
 -webkit-appearance:none;appearance:none;width:24px;height:24px;margin:0 0 0 4px;cursor:pointer;align-self:center;vertical-align:middle;
 background-color:var(--ss-muted,#62564a);
 -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/16px 16px no-repeat;
 mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/16px 16px no-repeat;
}

/* One component-owned palette: robot page styles must not tint speech controls. */
html body :is(.dict-panel,.dict-language-list){
 --ss-surface:#fffefb;--ss-text:#26241f;--ss-border:#d5ddd0;--ss-hover:#e1e8dc;
 --ss-selected:#e5eee9;--ss-on-selected:#376a59;--ss-canvas:#faf7f3;--ss-muted:#62564a;
 --ss-shadow:0 12px 32px #1e2b2129;--dict-scroll-thumb:rgba(0,0,0,.08);
}
html[data-theme=dark] body :is(.dict-panel,.dict-language-list){
 --ss-surface:#252d28;--ss-text:#f0f3ed;--ss-border:#46564a;--ss-hover:#354238;
 --ss-selected:#344d40;--ss-on-selected:#dbf0e0;--ss-canvas:#1d231f;--ss-muted:#bdc8bd;
 --ss-shadow:0 12px 32px #00000057;--dict-scroll-thumb:rgba(255,255,255,.12);
}
html body .dict-panel h2{color:inherit!important}
html body .dict-panel .dict-select{font:500 14px/20px Inter,Arial,sans-serif}
html body .dict-language-list{font:400 14px/20px Inter,Arial,sans-serif}
html body .dict-language-list .dict-search>input{color:var(--ss-text)!important}
@media(min-width:768px){html body .dict-panel{padding:18px}}
/* Standard scrollbar styling plus a fallback for older WebKit engines. */
html body :is(.dict-panel,.dict-language-list,.dict-search-rows){scrollbar-width:thin;scrollbar-color:var(--dict-scroll-thumb) transparent}
html body :is(.dict-panel,.dict-language-list,.dict-search-rows)::-webkit-scrollbar{width:6px;height:6px}
html body :is(.dict-panel,.dict-language-list,.dict-search-rows)::-webkit-scrollbar-track{background:transparent}
html body :is(.dict-panel,.dict-language-list,.dict-search-rows)::-webkit-scrollbar-thumb{background:var(--dict-scroll-thumb);border-radius:6px}

/* Chat adapter: native microphone and separate voice-conversation button preserved. */
#chat-app .chat-dict-language{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:64px;max-width:156px;min-height:44px;height:44px;width:auto;padding:0 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:500 13px/1.2 Inter,system-ui,sans-serif;cursor:pointer;flex:0 1 auto}
#chat-app .chat-dict-language bdi{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#chat-app .chat-dict-language:hover:not(:disabled),#chat-app .chat-dict-language[aria-expanded=true]{background:var(--ss-hover,#edf1e9)}
#chat-app .chat-dict-language:disabled{opacity:.65;cursor:default}
#chat-app .chat-input-toolbar-right{gap:0}
#chat-app .chat-dict-language+.ss-voice-trigger{margin-inline-start:8px}
@media(max-width:480px){#chat-app .chat-dict-language{max-width:110px;padding:0 6px;font-size:12px}}
