/* Vordenk — Help library: Translate button + language panel. Only the top bar gains something;
   the book, its pages, fonts and sizes are untouched (translated text keeps the same size; fitPages is the safety net). */
.vkh-trbtn{ position:relative; max-width:190px; overflow:hidden; flex:none; }
.vkh-trbtn[hidden]{ display:none; }
.vkh-trbtn .lbl{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vkh-trbtn.on{ border-color:var(--oak2,var(--g2)); }
.vkh-trbtn::after{ content:""; position:absolute; left:0; bottom:0; height:3px; width:var(--p,0%); background:var(--oak2,#d8be84); opacity:0; transition:width .4s ease, opacity .3s; }
.vkh-trbtn.busy::after{ opacity:1; }
.vkh-trdot{ display:none; }
.vkh-top [data-act="close"]{ margin-inline-start:0; }
.vkh-top .vkh-title{ margin-inline-end:auto; }

.vkh-trp{
  position:absolute; top:calc(100% + 8px); right:12px; width:min(340px,calc(100% - 24px)); max-height:min(440px,calc(100vh - 120px));
  display:flex; flex-direction:column; gap:8px; padding:14px; border-radius:18px; z-index:9;
  background:#fbfaf7; color:var(--char,#1b1915); border:1px solid rgba(135,101,65,.5);
  box-shadow:0 24px 50px -16px rgba(27,25,21,.55), inset 0 1px 0 #fff;
}
.vkh-trp[hidden]{ display:none; }
.vkh-trp .hd b{ display:block; font-size:15px; }
.vkh-trp .hd small{ color:#5f5d55; font-size:12px; }
.vkh-trp .q{ font:inherit; font-size:14px; padding:9px 12px; border-radius:11px; border:1px solid rgba(135,101,65,.45); background:#fff; color:inherit; outline:0; }
.vkh-trp .q:focus{ border-color:var(--oak2,#876541); box-shadow:0 0 0 2px rgba(135,101,65,.22); }
.vkh-trp .st{ font-size:12px; color:#5f5d55; min-height:16px; }
.vkh-trp .st .link{ all:unset; cursor:pointer; text-decoration:underline; color:var(--oak3,#654424); font-weight:600; }
.vkh-trp .ls{ overflow:auto; min-height:0; display:flex; flex-direction:column; gap:2px; overscroll-behavior:contain; }
.vkh-trp .gh{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:#7a776c; padding:8px 8px 2px; }
.vkh-trp .row{ all:unset; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px; border-radius:10px; cursor:pointer; font-size:14px; }
.vkh-trp .row:hover, .vkh-trp .row:focus-visible{ background:#f0e6d3; }
.vkh-trp .row:focus-visible{ outline:2px solid var(--oak2,#876541); }
.vkh-trp .row.on{ background:#e9dcc4; font-weight:600; }
.vkh-trp .row.orig{ border:1px dashed rgba(135,101,65,.5); }
.vkh-trp .row svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.vkh-trp .none{ padding:14px 8px; color:#7a776c; font-size:13px; }

/* translated pages: same size, same box. Only direction and a calmer first letter for non-Latin scripts. */
.vkh-pg.tr-wait .txt, .vkh-pg.tr-wait h4{ opacity:.55; transition:opacity .3s; }
.vkh-pg.tr-rtl ul{ padding-left:0; padding-right:20px; }
.vkh-pg.tr-rtl .txt{ padding-right:0; padding-left:4px; }
.vkh-pg.tr-nolatin:not(.cover-pg):not(.has-plate):not(.founder-pg) .txt > p:first-child::first-letter{
  float:none; font:inherit; padding:0; color:inherit; text-shadow:none; }
.vkh-pg.tr-ok .txt{ overflow-wrap:anywhere; }

@media (max-width:640px){
  .vkh-trbtn{ max-width:46vw; padding:0 10px; }
  .vkh-trp{ right:8px; width:calc(100% - 16px); }
}

/* the top bar (with the Translate panel hanging from it) must sit above the open book, or taps on a language hit the page instead */
.vkh .vkh-top{ position:relative; z-index:12; }
