/* SEMHOVERTODOS_20261028 - o :hover cola num ecra tactil: depois do toque o botao fica
   com a cor de "estou ligado" ate se tocar noutro sitio. Medidas 74 regras
   assim; esta e uma delas. O foco ficou de fora do @media de proposito. */
/* === SEMHOVER_20261025 — o `:hover` da barra so vale onde ha rato =======================
 *
 * Medido com toque de verdade: depois de LEVANTAR o dedo, o altifalante e a velocidade
 * ficavam em rgba(0,0,0,.04) e os outros dois em transparente. Num ecra tactil o browser
 * deixa o ultimo elemento tocado em `:hover` ate se tocar noutro sitio -- uma regra para o
 * rato vira um fundo permanente.
 *
 * Os blocos abaixo passaram a viver dentro de `@media (hover: hover) and (pointer: fine)`.
 * O aviso de toque nao se perde: o `:active` continua a pintar os quatro enquanto o dedo
 * esta em baixo, e esse e o estado que um telemovel tem mesmo.
 */
/* lexgo_reader.css — reader overlay for Lute3
   v2: rebuilt 2026-06-26 after first-pass scaffold review.

   Design tokens as in the reference reader inspection.
   Loaded LAST in base.html → overrides Lute defaults.
   Scoped under body.lk-reader so non-reader pages are untouched.

   Architecture:
   - 1-2px green progress strip pinned top (Lute's audio player is hidden + driven by it)
   - Top-right floating icon cluster: Aa | ··· | ⇥
   - Reading column: centered, max 720px, 1.05rem/1.78
   - Side nav: 24px ghosted ‹ › in negative gutters, never overlap text
   - Right panel: 360px fixed, default = "Click any word" placeholder
   - Expandable audio drawer (toggled by ···) with full Lute controls + custom 3-mode chooser
   - Bottom toolbar: 3 text-with-icon buttons, transparent
*/

/* ============================================================
   TOKENS
   ============================================================ */
body.lk-reader {
  --lk-bg:           #ffffff;
  --lk-bg-soft:      #fafbfc;
  --lk-text:         var(--btn-ink);
  --lk-text-soft:    #475569;
  --lk-text-mute:    #94a3b8;
  --lk-rail:         #e5e7eb;
  --lk-rail-soft:    #f1f5f9;
  --lk-progress:     #4ade80;
  --lk-progress-bg:  #e5e7eb;
  --lk-accent:       #136F68;

  --lk-right-w:      360px;
  --lk-read-max:     610px;  /* was 720 — compacted 15% per Patrick 2026-07-03 */
  --lk-read-pad-x:   60px;
  --lk-font-size:    1.05rem;
  --lk-line-height:  1.78;
  --lk-para-gap:     1.5em;

  --lk-progress-h:   2px;
  --lk-side-w:       24px;
  --lk-gutter:       40px;

  --lk-ease:         cubic-bezier(0.2, 0.8, 0.2, 1);
  --lk-dur:          180ms;

  background: var(--lk-bg) !important;
  color: var(--lk-text) !important;
  font-feature-settings: "kern", "liga", "ss01";
}

/* ============================================================
   KILL LUTE CHROME ON READER PAGES
   ============================================================ */
body.lk-reader .reading_header_container,
body.lk-reader #reading_menu,
body.lk-reader .footernav,
body.lk-reader .read-slide-container,
body.lk-reader #reading-header .read-bookmark-buttons-container,
body.lk-reader #reading-header #page_indicator {
  display: none !important;
}

body.lk-reader #reading-header {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  height: 0 !important;
  overflow: visible !important;
}

/* ============================================================
   LAYOUT — main reading column
   ============================================================ */
body.lk-reader #read_pane_container {
  background: var(--lk-bg) !important;
  /* VIEWH2_20261014 — a mesma altura visivel que o cartao usa. Com 100vh aqui, o min-height
     ganhava a height posta mais abaixo e a caixa ficava maior do que o ecra no iOS, que e o
     que punha o cartao la em baixo com uma faixa branca por cima. */
  /* ALTURADUPLA_20261105 (#801) - a altura vem do body (ver ALTURADUPLA mais abaixo); um
     min-height de ecra inteiro aqui ganhava a height e devolvia a caixa maior do que o ecra. */
}

body.lk-reader #read_pane_left {
  margin-right: var(--lk-right-w) !important;
  padding-top: 32px !important;
  transition: margin-right var(--lk-dur) var(--lk-ease);
}

body.lk-reader.right-panel-closed #read_pane_left {
  margin-right: 0 !important;
}

body.lk-reader #thetext,
/* FONTE_20261016 — as PALAVRAS obedecem ao controlo de tamanho.
   O Lute poe `span.textitem { font-size: 16px }` (styles.css) para repor o tamanho
   depois do `font-size: 0%` da frase. Esse 16px absoluto ganhava a
   `--lk-font-size`, por isso o botao Aa gravava um valor que nunca chegava a
   nenhuma palavra: medido, variavel a 1.8rem e texto a 16px.
   O modo frase tem a sua propria escala, com !important, e continua a mandar la. */
body.lk-reader #thetext .textitem,
body.lk-reader .read-page-content .textitem {
  font-size: var(--lk-font-size, 1.05rem);
}

body.lk-reader .read-page-content {
  max-width: var(--lk-read-max) !important;
  margin: 0 auto !important;
  padding: 24px var(--lk-read-pad-x) 120px var(--lk-read-pad-x) !important;
  font-size: var(--lk-font-size) !important;
  line-height: var(--lk-line-height) !important;
  color: var(--lk-text) !important;
  font-family: var(--font-reader, "Source Serif 4", Georgia, serif) !important;
}

body.lk-reader #thetext p,
body.lk-reader .read-page-content p {
  margin: 0 0 var(--lk-para-gap) 0 !important;
}

body.lk-reader .textitem {
  padding: 1px 0 !important;
  line-height: inherit !important;
  border-radius: 2px;
  transition: background-color 120ms var(--lk-ease);
}
body.lk-reader .textitem:hover { background-color: rgba(79, 70, 229, 0.08); }

/* VERSEL_20261016 — a seleccao de varias palavras TEM de se ver.

   Medido durante o arrasto: as palavras marcadas ficavam com o azul de sempre (as novas) ou
   com nada (as aprendidas). O `.newmultiterm { background: yellow !important }` do Lute perde
   para as cores de estado, que sao mais especificas. O gesto funcionava e nao se via.

   Por isso esta regra usa o mesmo prefixo das regras de estado e cobre tambem :hover -- sem
   isso, a palavra sob o dedo ficava apagada pela regra das aprendidas (HOVERKNOWN). */
/* D2PP_20261119 - a seleccao saiu do amarelo (a familia de cores parecida com a do concorrente) para um
   verde-agua claro, do tom dos botoes do app: nao se confunde com nenhum dos azuis dos niveis. */
body.lk-reader #thetext .textitem.newmultiterm,
body.lk-reader #thetext .textitem.newmultiterm:hover {
  background-color: var(--sel-bg, rgb(204, 242, 234)) !important;
  box-shadow: inset 0 0 0 1px var(--sel-borda, rgba(31, 138, 130, 0.55)) !important;
  border-radius: 2px;
}

/* HOVERKNOWN_20261016 — uma palavra APRENDIDA (99) ou EXCLUIDA (98) nao se anuncia.

   O Lute ja dizia, no seu proprio comentario, que status99 e status98 "nao tem estilos, sao
   texto normal" -- mas isso valia so para o fundo. O contorno de passagem vinha de
   `span.textitem:hover`, que nao olha ao estado, por isso uma frase ja aprendida continuava
   a ganhar moldura ao passar o rato. Medido: outline 1px rgb(0,97,123) com status99.

   Sai o contorno e sai o fundo de passagem. O cursor fica em mao, de proposito: a palavra
   continua clicavel para rever ou baixar o estado, e um alvo sem sinal nenhum seria o outro
   extremo do mesmo erro. */
/* VERSELFIX_20261016 — :not(.newmultiterm): uma palavra aprendida nao se anuncia ao passar o
   rato, EXCEPTO enquanto esta a ser seleccionada. Sem isto, a palavra sob o cursor ficava
   invisivel a meio do arrasto (empate de especificidade com a regra da seleccao, e esta vinha
   depois). */
body.lk-reader #thetext .textitem.status99:hover:not(.newmultiterm),
body.lk-reader #thetext .textitem.status98:hover:not(.newmultiterm),
body.lk-reader #thetext .textitem[data-status-class="status99"]:hover:not(.newmultiterm),
body.lk-reader #thetext .textitem[data-status-class="status98"]:hover:not(.newmultiterm) {
  outline: none !important;
  background-color: transparent !important;
  cursor: pointer;
}

/* ============================================================
   TOP PROGRESS STRIP (1-2px green line at top)
   ============================================================ */
body.lk-reader .lk-progress-strip {
  position: fixed;
  top: 0; left: 0;
  width: calc(100% - var(--lk-right-w));
  height: var(--lk-progress-h);
  background: var(--lk-progress-bg);
  z-index: 60;
  cursor: pointer;
  transition: width var(--lk-dur) var(--lk-ease), height 120ms var(--lk-ease);
}
body.lk-reader.right-panel-closed .lk-progress-strip { width: 100%; }
body.lk-reader .lk-progress-strip:hover { height: 5px; }
body.lk-reader .lk-progress-strip-fill {
  height: 100%;
  width: 0%;
  background: var(--lk-progress);
  transition: width 80ms linear;
}

/* HIDE Lute's audio player by default — we drive it via custom UI */
body.lk-reader .audio-player-container {
  position: fixed !important;
  top: -9999px !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* When audio drawer expanded, surface Lute player INSIDE our drawer */
body.lk-reader.audio-expanded .lk-audio-drawer .audio-player-container {
  position: static !important;
  top: auto !important; left: auto !important;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: block !important;
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
}

/* ============================================================
   TOP-RIGHT FLOATING ICONS (Aa · ··· · ⇥)
   ============================================================ */
body.lk-reader .lk-top-icons {
  /* TOPBAR_CLEARANCE_20260703 — LexGo topbar (56px, z:1000) covers this cluster.
     Move below topbar with +16px gap so the reader Aa / kebab / drawer-toggle
     buttons are visible again. */
  position: fixed;
  top: calc(var(--lx-topbar-height, 56px) + 16px);
  right: calc(var(--lk-right-w) + 18px);
  display: flex;
  gap: 4px;
  z-index: 990;
  transition: right var(--lk-dur) var(--lk-ease);
}
body.lk-reader.right-panel-closed .lk-top-icons { right: 18px; }

body.lk-reader .lk-top-icons button {
  background: transparent;
  border: none;
  color: var(--lk-text-mute);
  width: 32px; height: 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--lk-dur) var(--lk-ease),
              color var(--lk-dur) var(--lk-ease);
  font-family: inherit;
  padding: 0;
  line-height: 1;
}
@media (hover: hover) and (pointer: fine) {
  body.lk-reader .lk-top-icons button:hover {
  background: var(--lk-rail-soft);
  color: var(--lk-text);
}
}
body.lk-reader .lk-top-icons .lk-aa {
  font-family: var(--font-reader, Georgia, serif);
  font-style: italic;
  font-size: 15px;
}
body.lk-reader .lk-top-icons .lk-kebab { font-size: 18px; letter-spacing: -1px; }
body.lk-reader .lk-top-icons .lk-panel-toggle::before {
  content: "\21E5";
  font-size: 16px;
}
body.lk-reader.right-panel-closed .lk-top-icons .lk-panel-toggle::before {
  content: "\21E4";
}

/* ============================================================
   SIDE NAV ARROWS — ghost ‹ › in gutters
   ============================================================ */
body.lk-reader .lk-side-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--lk-text-mute);
  font-size: 32px;
  font-weight: 300;
  width: var(--lk-side-w);
  height: 64px;
  cursor: pointer;
  opacity: 0.35;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: opacity var(--lk-dur) var(--lk-ease),
              color var(--lk-dur) var(--lk-ease);
  font-family: inherit;
}
body.lk-reader .lk-side-nav:hover {
  opacity: 1;
  color: var(--lk-text);
}
body.lk-reader .lk-side-nav-left  { left: 12px; }
body.lk-reader .lk-side-nav-right {
  right: calc(var(--lk-right-w) + 12px);
  transition: right var(--lk-dur) var(--lk-ease),
              opacity var(--lk-dur) var(--lk-ease),
              color var(--lk-dur) var(--lk-ease);
}
body.lk-reader.right-panel-closed .lk-side-nav-right { right: 12px; }

/* ============================================================
   RIGHT PANEL — always rendered, default placeholder
   ============================================================ */
body.lk-reader #read_pane_right {
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: var(--lk-right-w) !important;
  transform: none !important;
  background: var(--lk-bg-soft) !important;
  border-left: 1px solid var(--lk-rail) !important;
  box-shadow: none !important;
  z-index: 50 !important;
  overflow-y: auto !important;
  padding: 56px 0 0 0 !important;
  transition: transform var(--lk-dur) var(--lk-ease);
}
body.lk-reader.right-panel-closed #read_pane_right {
  transform: translateX(100%) !important;
}
body.lk-reader #read_pane_right .close-btn,
body.lk-reader #read_pane_right .read-pane-right-close-btn {
  display: none !important;
}
body.lk-reader #read_pane_right #wordframeid {
  width: 100% !important;
  border: none !important;
  background: transparent !important;
}

body.lk-reader .lk-rp-empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--lk-text-mute);
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}
body.lk-reader .lk-rp-empty-icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--lk-rail-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--lk-text-mute);
}
/* PAINEL2_20261025 — a mensagem so existe quando NAO ha nada para mostrar.
   Era `body.word-selected`, e havia um estado -- formulario carregado sem essa classe -- em
   que a mensagem se desenhava POR CIMA do formulario (fotografia do Patrick, 25/10 09:37).
   O facto que interessa ja e calculado num sitio so: o painel esta vazio? */
body.lk-reader .lk-rp-empty { display: none; }
body.lk-reader #read_pane_right.lx-pane-vazio .lk-rp-empty { display: block; }

/* ============================================================
   AUDIO DRAWER — expands below progress strip when ··· clicked
   ============================================================ */
body.lk-reader .lk-audio-drawer {
  position: fixed;
  top: var(--lk-progress-h);
  left: 0;
  width: calc(100% - var(--lk-right-w));
  background: var(--lk-bg);
  border-bottom: 1px solid var(--lk-rail);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  z-index: 55;
  padding: 16px 24px;
  display: none;
  transition: width var(--lk-dur) var(--lk-ease);
}
body.lk-reader.right-panel-closed .lk-audio-drawer { width: 100%; }
body.lk-reader.audio-expanded .lk-audio-drawer { display: block; }

body.lk-reader .lk-audio-modes {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--lk-rail-soft);
}
body.lk-reader .lk-audio-modes button {
  background: transparent;
  border: 1px solid var(--lk-rail);
  color: var(--lk-text-soft);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--lk-dur) var(--lk-ease);
  font-family: "Inter", system-ui, sans-serif;
}
body.lk-reader .lk-audio-modes button:hover {
  border-color: var(--lk-text-mute);
  color: var(--lk-text);
}
body.lk-reader .lk-audio-modes button.active {
  background: var(--lk-text);
  border-color: var(--lk-text);
  color: #fff;
}

body.lk-reader.audio-expanded .lk-audio-drawer .audio-player-container > .audio-player-top-container {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
}
body.lk-reader.audio-expanded .lk-audio-drawer .audio-player-controls-container {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
body.lk-reader.audio-expanded .lk-audio-drawer .audio-player-right-container {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
body.lk-reader.audio-expanded .lk-audio-drawer #pin { display: none !important; }

/* ============================================================
   BOTTOM TOOLBAR — minimal text buttons
   ============================================================ */
body.lk-reader .lk-bottom-toolbar {
  /* TOOLBAR_FULL_WIDTH_20260703 — bar spans edge-to-edge always. Drawer floats
     above bar's right portion, but bar itself is always 100% viewport. */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100% !important;
  background: linear-gradient(to top, var(--lk-bg) 60%, rgba(255,255,255,0));
  padding: 24px 40px 20px;
  display: flex;
  justify-content: center;
  gap: 32px;
  z-index: 45;
  transition: width var(--lk-dur) var(--lk-ease);
  pointer-events: none;
}
body.lk-reader.right-panel-closed .lk-bottom-toolbar { width: 100% !important; }  /* drawer closed → full width */
body.lk-reader .lk-bottom-toolbar .toolbar-btn {
  pointer-events: auto;
  background: transparent;
  border: none;
  color: var(--lk-text-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background var(--lk-dur) var(--lk-ease),
              color var(--lk-dur) var(--lk-ease);
  font-family: "Inter", system-ui, sans-serif;
}
@media (hover: hover) and (pointer: fine) {   /* SEMHOVER_20261025 */
  body.lk-reader .lk-bottom-toolbar .toolbar-btn:hover {
    background: var(--lk-rail-soft);
    color: var(--lk-text);
  }
}
body.lk-reader .lk-bottom-toolbar .toolbar-icon {
  font-size: 14px;
  opacity: 0.7;
}

/* ============================================================
   RESPONSIVE — ≤768px
   ============================================================ */
@media (max-width: 768px) {
  body.lk-reader {
    --lk-right-w: 0px;
    --lk-read-pad-x: 24px;
  }
  body.lk-reader #read_pane_right {
    width: 100% !important;
    transform: translateX(100%) !important;
    z-index: 80 !important;
  }
  body.lk-reader.word-selected #read_pane_right {
    transform: translateX(0) !important;
    box-shadow: -8px 0 32px rgba(0,0,0,0.12) !important;
  }
  body.lk-reader .lk-side-nav {
    width: 18px;
    font-size: 24px;
    opacity: 0.25;
  }
  body.lk-reader .lk-side-nav-right { right: 8px !important; }
  body.lk-reader .lk-side-nav-left  { left: 8px; }
  body.lk-reader .lk-top-icons { right: 12px !important; }
  body.lk-reader .lk-bottom-toolbar { width: 100% !important; padding: 16px 12px 12px; gap: 16px; }
  body.lk-reader .lk-audio-drawer { width: 100% !important; }
  body.lk-reader .lk-progress-strip { width: 100% !important; }
}

/* ============================================================
   PRINT — keep clean
   ============================================================ */
@media print {
  body.lk-reader .lk-progress-strip,
  body.lk-reader .lk-top-icons,
  body.lk-reader .lk-side-nav,
  body.lk-reader .lk-bottom-toolbar,
  body.lk-reader #read_pane_right,
  body.lk-reader .lk-audio-drawer {
    display: none !important;
  }
  body.lk-reader #read_pane_left { margin-right: 0 !important; }
}


/* ---------- audio floatbar (bottom-centered, triggered by toolbar Video button) ---------- */
.lk-audio-floatbar {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
  padding: 8px 12px;
  display: none;
  align-items: center;
  gap: 4px;
  z-index: 55;
  border: 1px solid #e5e7eb;
  font-family: Inter, system-ui, sans-serif;
}
.lk-audio-floatbar.is-open { display: inline-flex; }

.lk-audio-floatbar .laf-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: transparent;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--btn-ink);
  font-size: 14px;
  font-weight: 600;
  transition: background 180ms cubic-bezier(0.2,0.8,0.2,1);
  padding: 0;
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .lk-audio-floatbar .laf-btn:hover {
  background: #f3f4f6;
}
}
.lk-audio-floatbar .laf-btn.active {
  background: #eef2ff;
  color: #136F68;
  outline: 2px solid #c7d2fe;
}
.lk-audio-floatbar .laf-play {
  background: var(--btn-ink);
  color: #fff;
  width: 48px; height: 48px;
}
.lk-audio-floatbar .laf-play:hover { background: var(--btn-ink-hover); }

.lk-audio-floatbar .laf-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  padding: 0 6px;
  min-width: 42px;
  text-align: center;
}

.lk-audio-floatbar .laf-progress {
  position: relative;
  flex-grow: 0;
  width: 160px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  cursor: pointer;
  margin: 0 6px;
}
.lk-audio-floatbar .laf-progress-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: #16a34a;
  border-radius: 2px;
  width: 0%;
  transition: width 100ms linear;
}

.lk-audio-floatbar .laf-speed-badge { font-size: 12px; font-weight: 700; }

@media (max-width: 768px) {
  .lk-audio-floatbar { width: calc(100% - 24px); bottom: 72px; padding: 6px 8px; }
  .lk-audio-floatbar .laf-progress { width: 100%; flex: 1; }
}


/* ---------- YouTube PIP video player ---------- */
.lk-video-pip {
  position: fixed;
  bottom: 160px;
  right: 24px;
  width: 360px;
  z-index: 60;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  display: none;
  resize: both;
  min-width: 240px;
  min-height: 140px;
  max-width: 640px;
}
.lk-video-pip.is-open { display: block; }
.lk-video-pip-handle {
  /* PIPDRAG_20261015 — sem isto o browser reclama o gesto para deslizar a pagina e o video
     nunca se move no telemovel. A pega tambem cresce: 28px nao se agarra com o dedo. */
  touch-action: none;
  height: 36px;
  background: #1f2937;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  font-family: Inter, system-ui, sans-serif;
  cursor: move;
  user-select: none;
}
.lk-video-pip-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.lk-video-pip iframe {
  width: 100%;
  height: calc(100% - 36px);   /* PIPDRAG_20261015 — acompanha a pega mais alta */
  border: 0;
  display: block;
}

/* ---------- Sentence sync (karaoke) ---------- */
/* SYNCLINE_20261015 — esta regra estava inteiramente anulada pela de baixo no ficheiro (a que
   tem text-decoration-color), e ficava aqui a dar a entender que era ela a mandar. A definicao
   verdadeira do marcador da frase actual e a unica com SYNCLINE_20261015. Editar esta nao muda
   nada no ecra. */ 

/* ---------- Loop button label ---------- */
.lk-audio-floatbar .laf-loop.active::after {
  content: " ON";
  font-size: 9px;
  letter-spacing: 0.5px;
  margin-left: 1px;
}


/* ---------- Top-left nav (hamburger + logo) on reader pages ---------- */
.lk-top-left {
  position: fixed;
  top: 16px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 60;
  font-family: Inter, system-ui, sans-serif;
}
.lk-top-left .lk-burger {
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 0;
  transition: background 180ms cubic-bezier(0.2,0.8,0.2,1);
}
.lk-top-left .lk-burger:hover { background: #f3f4f6; }
.lk-top-left .lk-burger span {
  display: block; width: 20px; height: 2px; background: var(--btn-ink); border-radius: 1px;
}
.lk-top-left .lk-logo {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--btn-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lk-top-left .lk-logo:hover { opacity: 0.7; }
.lk-top-left .lk-logo-mark {
  color: #4F46E5;
  font-size: 18px;
  line-height: 1;
}

/* ---------- Outer margin + working area card on reader ---------- */
body.lk-reader {
  background: #fafafa !important;
  padding-top: 60px !important;
}
body.lk-reader #thetext, body.lk-reader .read-page-content {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03) !important;
  padding: 40px 60px 100px 60px !important;
  margin: 12px auto 80px auto !important;
  max-width: var(--lk-reading-max-w, 760px) !important;
}
body.lk-reader.right-panel-closed #thetext,
body.lk-reader.right-panel-closed .read-page-content {
  margin-right: auto !important;
}

/* karaoke-cursor-v1 (2026-06-29) — stronger visual for currently-spoken sentence */
/* SYNCLINE_20261015 — tambem anulada pela regra de baixo. So o scroll-margin-top sobrevivia,
   por ser a unica propriedade que ela nao redefine; fica aqui sozinho, que e o que de facto
   estava a fazer efeito. */
.lk-current-sentence { scroll-margin-top: 80px; }

/* text-selection-enabled-v1 (2026-06-29) — allow native text selection in reader.
   Lute3 default disables user-select on words to make click-to-define cleaner,
   but Patrick needs to be able to select+copy text. Re-enable via !important.

   NONATIVE_20261015 — REVOGADO a 15/10/2026, com o video dele a mostrar porque.
   Autorizar a seleccao nativa entrega o premir longo ao iOS: aparece a lupa, as pegas azuis e
   a barra "Copy | Find Selection | Look Up", e o gesto de seleccionar palavras para traduzir
   nunca chega a comecar. Num computador os dois conviviam porque la o premir longo nao
   significa nada; num telemovel sao o mesmo gesto e so um pode ganhar.

   Custo assumido: copiar do leitor com premir longo deixa de funcionar. O texto continua
   copiavel a partir do painel de traducao, onde aparece num campo. */
#thetext,
#thetext .textsentence,
#thetext .textitem,
#thetext .word {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  /* e a lupa e o menu de contexto, que sao uma segunda via para o mesmo gesto */
  -webkit-touch-callout: none !important;
  cursor: pointer;
}
#thetext .textitem.click,
#thetext .word.click {
  cursor: pointer;
}


/* TITLE_HIDDEN_RESTORE_20260629 — Lute3 sometimes ignores h1.hide; force it */
body.lk-reader h1#thetexttitle,
body.lk-reader h1#thetexttitle.hide,
body.lk-reader #thetexttitle {
  display: none !important;
}
body.lk-reader h1.hide { display: none !important; }


/* === READER_CLEANUP_V2_20260629 === */

/* 1. Push reader text container right of the sidebar so it doesnt clip text */
body.lk-reader.lx-has-topbar #read_pane_left {
  margin-left: var(--lx-sidebar-width, 84px) !important;
}
body.lk-reader.lx-has-topbar .lk-bottom-toolbar {
  left: var(--lx-sidebar-width, 84px) !important;
  width: calc(100% - var(--lx-sidebar-width, 84px) - var(--lk-right-w, 360px)) !important;
}
body.lk-reader.lx-has-topbar.right-panel-closed .lk-bottom-toolbar {
  width: calc(100% - var(--lx-sidebar-width, 84px)) !important;
}
body.lk-reader.lx-has-topbar .lk-progress-strip {
  left: var(--lx-sidebar-width, 84px) !important;
  width: calc(100% - var(--lx-sidebar-width, 84px) - var(--lk-right-w, 360px)) !important;
}
body.lk-reader.lx-has-topbar.right-panel-closed .lk-progress-strip {
  width: calc(100% - var(--lx-sidebar-width, 84px)) !important;
}
body.lk-reader.lx-has-topbar .lk-side-nav-left { left: calc(var(--lx-sidebar-width, 84px) + 12px) !important; }

/* 2. Bottom toolbar buttons — kill purple, force flat */
body.lk-reader .lk-bottom-toolbar .toolbar-btn,
body.lk-reader button.toolbar-btn,
body.lk-reader #lk-video-btn,
body.lk-reader #lk-sentence-btn,
body.lk-reader #lk-flashcards-btn {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  color: var(--lk-text-soft, #475569) !important;
  font: 500 13px/1 Inter, system-ui, sans-serif !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: background 100ms ease, color 100ms ease !important;
}
@media (hover: hover) and (pointer: fine) {   /* SEMHOVER_20261025 */
  body.lk-reader .lk-bottom-toolbar .toolbar-btn:hover,
  body.lk-reader button.toolbar-btn:hover {
    background: var(--btn-hover-veil) !important;
    color: var(--lk-text, #1a1a2e) !important;
  }
}
body.lk-reader .lk-bottom-toolbar .toolbar-icon {
  font-size: 14px !important;
  opacity: 0.7 !important;
}


/* === READER_FOCUS_MODE_20260629 === */

/* Hide left sidebar + topbar layout chrome on reader pages */
body.lk-reader .lx-sidebar { display: none !important; }
/* MENUNOLEITOR_20261028 (#623) - a regra acima escondia o painel e deixava o botao que o
   abre. Medido: no leitor o clique chega, a classe `is-open` entra, nao ha erro -- e nao se
   ve nada. Aberto de proposito, aparece; fechado continua escondido, que e o que o modo de
   foco promete. E uma camada por cima: o layout do leitor nao mexe. */
body.lk-reader .lx-sidebar.is-open { display: flex !important; }
body.lk-reader.lx-has-topbar #read_pane_left { margin-left: 0 !important; }
body.lk-reader.lx-has-topbar .lk-bottom-toolbar,
body.lk-reader.lx-has-topbar.right-panel-closed .lk-bottom-toolbar {
  left: 0 !important;
}
body.lk-reader.lx-has-topbar.right-panel-closed .lk-bottom-toolbar {
  width: 100% !important;
}
body.lk-reader.lx-has-topbar .lk-bottom-toolbar {
  width: calc(100% - var(--lk-right-w, 360px)) !important;
}
body.lk-reader.lx-has-topbar .lk-progress-strip {
  left: 0 !important;
}
body.lk-reader.lx-has-topbar.right-panel-closed .lk-progress-strip {
  width: 100% !important;
}
body.lk-reader.lx-has-topbar .lk-progress-strip {
  width: calc(100% - var(--lk-right-w, 360px)) !important;
}
body.lk-reader.lx-has-topbar .lk-side-nav-left { left: 12px !important; }
body.lk-reader.lx-has-topbar .container { padding-left: 0 !important; }

/* Lock body scroll — viewport fixed. SCROLLLOCK_20260914: the `html` selector used to be UNSCOPED, which locked
   EVERY app page (this file loads globally) — on a phone the page could not be scrolled at all.
   Now the html lock applies only on the reader: class added by the reader template before paint,
   with :has() as a fallback. */
html.lx-reader-lock,
/* VIEWH_20261014 — `--lx-viewh` e a altura que a pessoa ve mesmo, publicada pelo JS que ja a
   calculava para dimensionar o cartao. Enquanto estas caixas mediam 100vh e o cartao media o
   visivel, o cartao era centrado numa caixa maior do que o ecra e a diferenca aparecia como
   faixa branca em cima. Sem JS ainda corrido, cai em 100vh -- o comportamento de antes. */
/* CARDS_20261015 — 100svh: a altura do ecra com a barra do browser ABERTA.
   Ontem isto seguia --lx-viewh, publicado a partir de visualViewport. Resolvia a diferenca entre
   o viewport de esquema e o visivel, mas seguia a barra do Safari: a cada deslize a barra encolhe
   ou cresce, a altura mudava, o texto reenrolava e o cartao mudava de tamanho e de sitio. As tres
   capturas do Patrick sao tres momentos desse mesmo calculo.
   svh nao se mexe. E sempre a menor, portanto o conteudo nunca fica debaixo da barra. */
html:has(body.lk-reader),
body.lk-reader {
  height: 100vh !important;
  height: 100svh !important;
  overflow: hidden !important;
}
/* NAOROLA_20261103 (#745) - `hidden` trava o dedo mas a caixa continua a ser um contentor de
   rolagem: o Safari, para pôr o campo da traducao acima do teclado, rolava o body (822 de
   conteudo para 720) e o cartao subia 102px para debaixo do cabecalho, e ficava. `clip` corta
   igual e nao rola de todo. O `hidden` fica antes para Safari < 16; para esses a reposicao
   (DOCROLADO, lexgo_reader.js) cobre qualquer antepassado do #thetext. O html nao entra:
   no html `clip` vale `hidden`, e a janela ja e reposta. */
body.lk-reader {
  overflow: clip !important;
}
/* ALTURADUPLA_20261105 (#801) - a altura do ecra decide-se num SO sitio: o body tem 100svh com a
   barra de cima DENTRO (border-box) e o contentor enche o que sobra. Antes a barra contava duas
   vezes: o body era 100svh + 56px de padding (720 num ecra de 664) e o contentor, que pedia
   100svh - barra, perdia para o `min-height: 100svh` la de cima (min-height ganha a height).
   Esses 56px eram o sitio para onde o Safari rolava a pagina: o cartao subia 56px para debaixo
   do cabecalho, sem a fila do Aa, com uma faixa vazia em baixo (#689, #745, #801). Sem folga,
   nao ha para onde rolar. */
body.lk-reader {
  box-sizing: border-box !important;
}
/* ...e nada mais no body passa do ecra: o rodape legal vinha DEPOIS do contentor (102px de
   conteudo a mais no body, os 102px do #745) e nunca se via no leitor, cortado pelo clip. Os
   links legais estao no menu e em todas as outras paginas. */
body.lk-reader .lx-legal-footer {
  display: none !important;
}
body.lk-reader #read_pane_container {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  overflow: clip !important;
}
body.lk-reader #read_pane_left {
  height: 100% !important;
  overflow: hidden !important;
  overflow: clip !important;
  padding-top: 0 !important;
}
body.lk-reader #thetext {
  /* VIEWH_20261014 — mesma fonte; o FITSNAP sobrepoe isto em linha, mas antes de ele correr
     este valor evita um salto do cartao no primeiro desenho. */
  max-height: calc(100vh - var(--lx-topbar-height, 52px) - 80px) !important;
  max-height: calc(100svh - var(--lx-topbar-height, 52px) - 80px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-top: 32px !important;
  padding-bottom: 80px !important;
}
body.lk-reader #thetext::-webkit-scrollbar { width: 4px; }
body.lk-reader #thetext::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

/* Kill purple side-nav + panel-toggle ghost-style */
body.lk-reader .lk-side-nav,
body.lk-reader .lk-panel-toggle,
body.lk-reader .lk-top-icons button {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
}


/* === CENTER_TEXT_AND_VISIBLE_NAV_20260629 === */

/* Force text container CENTERED in viewport */
body.lk-reader #read_pane_left,
body.lk-reader.right-panel-closed #read_pane_left {
  /* READING_COMPACT_20260703 — allow shrink below default width so the
     inner text card can respect its parent when viewport is narrow. */
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}
body.lk-reader #thetext {
  /* READING_COMPACT_20260703 — was width:720px + max-width:90vw. Rewritten
     to use 100% of parent (#read_pane_left) with a hard token ceiling so
     the card ALWAYS fits inside a shrunken window and never overflows. */
  width: 100% !important;
  max-width: var(--lk-read-max, 610px) !important;
  margin: 0 auto !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Side nav arrows — visible circles with chevrons */
body.lk-reader .lk-side-nav {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.92) !important;
  border: 1px solid var(--btn-border-thin) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
  color: var(--btn-ink) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  opacity: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 60 !important;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease !important;
}
body.lk-reader .lk-side-nav:hover {
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12) !important;
  transform: translateY(-50%) scale(1.05) !important;
}
body.lk-reader .lk-side-nav-left { left: 16px !important; }
body.lk-reader .lk-side-nav-right { right: 16px !important; }
body.lk-reader.right-panel-closed .lk-side-nav-right { right: 16px !important; }
body.lk-reader:not(.right-panel-closed) .lk-side-nav-right { right: calc(var(--lk-right-w, 360px) + 16px) !important; }


/* === NO_SCROLL_PAGINATION_20260629 === */
body.lk-reader #thetext {
  overflow: hidden !important;
}


/* === HIDE_LEGACY_FOOTER_20260629 === */
/* Remove Lute3's legacy #reading-footer entirely.
   Functionality (mark-rest-as-known + next-page) lives in the side > arrow + goNext() handler. */
body.lk-reader #reading-footer,
body.lk-reader #reading-footer *,
body.lk-reader #footerMarkRestAsKnownNextPage,
body.lk-reader #footerNextPage,
body.lk-reader #footerMarkRestAsKnown,
body.lk-reader #footerDone,
body.lk-reader #final_page_controls {
  display: none !important;
}


/* === TOOLBAR_V2_STYLES_20260629 === */
/* Layout: space-between with padding on sides */
body.lk-reader .lk-bottom-toolbar {
  justify-content: center !important;
  align-items: center !important;
  padding: 16px 28px 18px !important;
  gap: 36px !important;
}

/* Video button: dark circle with white play */
body.lk-reader .toolbar-btn-circle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: var(--btn-ink) !important;
  background-image: none !important;
  color: #ffffff !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 150ms ease, transform 150ms ease !important;
  flex: 0 0 auto !important;
}
@media (hover: hover) and (pointer: fine) {   /* SEMHOVER_20261025 */
  body.lk-reader .toolbar-btn-circle:hover {
    background: var(--btn-ink-hover) !important;
    transform: scale(1.06) !important;
  }
}
body.lk-reader .toolbar-btn-circle svg {
  width: 13px !important;
  height: 13px !important;
}

/* Sentence View: icon stacked OVER label, centered */
body.lk-reader .toolbar-btn-stack {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 4px 14px !important;
  color: var(--btn-ink) !important;
  font: 500 11px/1 "Inter", system-ui, sans-serif !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  transition: background 100ms ease !important;
  flex: 0 0 auto !important;
}
@media (hover: hover) and (pointer: fine) {   /* SEMHOVER_20261025 */
  body.lk-reader .toolbar-btn-stack:hover {
    background: var(--btn-hover-veil) !important;
  }
}
body.lk-reader .toolbar-btn-stack svg {
  width: 22px !important;
  height: 22px !important;
  color: var(--btn-ink) !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 11px !important;
  letter-spacing: 0 !important;
  color: var(--btn-ink) !important;
}

/* Flashcards button: stack of cards + number */
body.lk-reader .toolbar-btn-fc {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 8px !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  transition: background 100ms ease !important;
  flex: 0 0 auto !important;
}
@media (hover: hover) and (pointer: fine) {   /* SEMHOVER_20261025 */
  body.lk-reader .toolbar-btn-fc:hover {
    background: var(--btn-hover-veil) !important;
  }
}
body.lk-reader .toolbar-btn-fc svg {
  width: 26px !important;
  height: 26px !important;
}
body.lk-reader .toolbar-fc-count {
  font: 600 16px/1 "Inter", system-ui, sans-serif !important;
  color: var(--btn-ink) !important;
  min-width: 16px !important;
  text-align: left !important;
}


/* === VIDEO_CIRCLE_FIX_20260629 — beats earlier #lk-video-btn{transparent} rule via ID+class === */
body.lk-reader #lk-video-btn.toolbar-btn-circle,
body.lk-reader button#lk-video-btn.toolbar-btn-circle {
  background: var(--btn-ink) !important;
  background-image: none !important;
  background-color: var(--btn-ink) !important;
  color: #ffffff !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex: 0 0 auto !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}
@media (hover: hover) and (pointer: fine) {   /* SEMHOVER_20261025 */
  body.lk-reader #lk-video-btn.toolbar-btn-circle:hover {
    background: var(--btn-ink-hover) !important;
    background-color: var(--btn-ink-hover) !important;
    transform: scale(1.06) !important;
  }
}
body.lk-reader #lk-video-btn.toolbar-btn-circle svg {
  width: 14px !important;
  height: 14px !important;
  color: #ffffff !important;
  fill: #ffffff !important;
}


/* === SENTENCE_VIEW_V2_CSS_20260629 === */
body.lx-sentence-mode #thetext .textsentence {
  display: none !important;
}
body.lx-sentence-mode #thetext .textsentence.lk-current-sentence {
  display: block !important;
  font-size: 1.7em !important;
  line-height: 1.5 !important;
  text-align: center !important;
  padding: 12vh 20px !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  max-width: 720px !important;
  margin: 0 auto !important;
}
body.lx-sentence-mode #thetext > p {
  margin: 0 !important;
}

/* In sentence mode, dim the chrome a tad to push focus to the sentence */
body.lx-sentence-mode .lk-side-nav {
  opacity: 0.85;
}

/* Active sentence-view button gets a subtle accent */
body.lx-sentence-mode #lk-sentence-btn {
  color: #1F8A82 !important;
}
body.lx-sentence-mode #lk-sentence-btn svg {
  color: #1F8A82 !important;
}


/* === SENTENCE_VIEW_EXTRAS_CSS_20260629 === */

/* Speaker + loop cluster above the current sentence */
.lx-sentence-chrome {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 4vh auto 20px;
  max-width: 720px;
}
.lx-sentence-chrome .lx-s-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--btn-border-thin);
  color: var(--btn-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.lx-sentence-chrome .lx-s-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.lx-sentence-chrome .lx-s-btn svg {
  width: 18px;
  height: 18px;
}
.lx-sentence-chrome .lx-s-loop svg {
  width: 16px;
  height: 16px;
}

/* Show-translation toggle below sentence */
.lx-sentence-tr {
  display: none;
  text-align: center;
  margin-top: 16px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.lx-sentence-tr-toggle {
  background: transparent;
  border: none;
  color: #475569;
  font: 500 14px/1.4 "Inter", system-ui, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(71,85,105,0.3);
  transition: color 120ms ease, background 120ms ease;
}
.lx-sentence-tr-toggle:hover {
  color: var(--btn-ink);
  background: rgba(0,0,0,0.03);
}
.lx-sentence-tr-toggle svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}
.lx-sentence-tr-body {
  margin-top: 16px;
  padding: 14px 20px;
  min-height: 24px;
  background: rgba(31,138,130,0.06);
  border-radius: 10px;
  color: #0f172a;
  font: 400 16px/1.5 "Inter", system-ui, sans-serif;
  font-style: italic;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Flashcards button in review-sentence mode */
body.lx-sentence-mode .toolbar-btn-fc.lx-mode-review .toolbar-fc-count {
  font-size: 12px;
  font-weight: 500;
  color: #136F68;
}
body.lx-sentence-mode .toolbar-btn-fc.lx-mode-review svg {
  color: #136F68;
}

/* Hide audio drawer + progress strip when in sentence mode */
body.lx-sentence-mode .lk-audio-drawer,
body.lx-sentence-mode .lk-progress-strip {
  display: none !important;
}


/* === SENTENCE_CHROME_FORCED_20260629 === */
body.lk-reader .lx-sentence-chrome .lx-s-btn,
body.lk-reader button.lx-s-btn,
body.lk-reader button.lx-s-speak,
body.lk-reader button.lx-s-loop {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  background-image: none !important;
  background-color: #ffffff !important;
  border: 1px solid var(--btn-border-thin) !important;
  color: var(--btn-ink) !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
  transition: transform 120ms ease, box-shadow 120ms ease !important;
  flex: 0 0 auto !important;
}
body.lk-reader .lx-sentence-chrome .lx-s-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.10) !important;
}
body.lk-reader .lx-sentence-chrome .lx-s-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--btn-ink) !important;
  stroke: var(--btn-ink) !important;
  fill: none !important;
}

/* Mostrar traducao toggle — flat text-link style */
body.lk-reader button.lx-sentence-tr-toggle,
body.lk-reader .lx-sentence-tr-toggle,
body.lk-reader #lxTrToggle {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  border: none !important;
  color: #475569 !important;
  font: 500 13px/1.4 "Inter", system-ui, sans-serif !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  text-decoration-color: rgba(71,85,105,0.3) !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
@media (hover: hover) and (pointer: fine) {
  body.lk-reader button.lx-sentence-tr-toggle:hover {
  color: var(--btn-ink) !important;
  background: rgba(0,0,0,0.03) !important;
}
}
body.lk-reader button.lx-sentence-tr-toggle svg {
  width: 12px !important;
  height: 12px !important;
  opacity: 0.6 !important;
  stroke: currentColor !important;
}


/* === FLASHCARDS_POPOVER_CSS_V1_20260629 === */
.lx-fc-pop {
  position: fixed;
  z-index: 200;
  background: #FFFFFF;
  border: 1px solid var(--btn-border-thin);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  padding: 6px;
  min-width: 240px;
}
.lx-fc-pop[hidden] { display: none !important; }
.lx-fc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--btn-ink);
  text-decoration: none;
  font: 500 13.5px/1.3 "Inter", system-ui, sans-serif;
  transition: background 100ms ease;
  cursor: pointer;
}
.lx-fc-item:hover { background: var(--btn-hover-veil); }
.lx-fc-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.lx-fc-label {
  flex: 1;
  color: var(--btn-ink);
}
.lx-fc-num {
  color: #6b7280;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.lx-fc-item--last {
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: 4px;
  padding-top: 10px;
  color: #475569;
}


/* === SENT_ICON_REFINED_20260629 === */
body.lk-reader #lk-sentence-btn svg {
  width: 26px !important;
  height: 18px !important;
  stroke: var(--btn-ink) !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
body.lk-reader #lk-sentence-btn svg rect {
  stroke-width: 1.5 !important;
}
body.lk-reader #lk-sentence-btn svg line {
  stroke-width: 1.5 !important;
  stroke-linecap: round !important;
}


/* === ICON_PARITY_W_VIDEO_20260629 — scale sentence + flashcards icons to match video circle === */

/* Sentence View icon: bigger + wider to match Video circle visual weight */
body.lk-reader #lk-sentence-btn svg {
  width: 30px !important;
  height: 22px !important;
}

/* Flashcards icon: bigger */
body.lk-reader #lk-flashcards-btn svg {
  width: 30px !important;
  height: 28px !important;
}

/* Labels also slightly larger to balance */
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 12px !important;
  margin-top: 2px !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 17px !important;
  font-weight: 600 !important;
}

/* Increase gap between icons for breathing room */
body.lk-reader .toolbar-btn-stack {
  padding: 4px 16px !important;
  gap: 4px !important;
}


/* === ICON_BIGGER_V2_20260629 — scale up sentence + flashcards icons + padding === */

/* Sentence View — bigger icon + wider padding for more presence */
body.lk-reader #lk-sentence-btn svg {
  width: 40px !important;
  height: 28px !important;
}
body.lk-reader .toolbar-btn-stack {
  padding: 4px 20px !important;
  gap: 5px !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 13px !important;
}

/* Flashcards — bigger icon + count */
body.lk-reader #lk-flashcards-btn svg {
  width: 36px !important;
  height: 34px !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 18px !important;
}
body.lk-reader .toolbar-btn-fc {
  padding: 4px 12px !important;
  gap: 8px !important;
}

/* Video button stays the same — 36px circle. Now sentence + flashcards match in visual mass. */

/* Increase overall toolbar gap so they don't crowd */
body.lk-reader .lk-bottom-toolbar {
  gap: 42px !important;
}


/* === THINNER_LINES_20260629 — as in the reference stroke quality === */
body.lk-reader #lk-sentence-btn svg rect,
body.lk-reader #lk-sentence-btn svg line {
  stroke-width: 1.2 !important;
  stroke-linecap: round !important;
}
body.lk-reader #lk-flashcards-btn svg rect,
body.lk-reader #lk-flashcards-btn svg path,
body.lk-reader #lk-flashcards-btn svg line {
  stroke-width: 1.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}


/* === BTN_Y_PARITY_20260629 — all 3 toolbar buttons share Y-axis height (matching the 36px Video circle) === */
body.lk-reader .toolbar-btn-circle,
body.lk-reader .toolbar-btn-stack,
body.lk-reader .toolbar-btn-fc {
  height: 38px !important;
  min-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Sentence View: shrink icon + label so both fit in 38px stacked */
body.lk-reader #lk-sentence-btn svg {
  width: 30px !important;
  height: 20px !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 11px !important;
  line-height: 1 !important;
  margin: 0 !important;
}
body.lk-reader .toolbar-btn-stack {
  flex-direction: column !important;
  gap: 3px !important;
  padding: 4px 14px !important;
}

/* Flashcards: keep icon + count side by side, both vertically centered in 38px */
body.lk-reader #lk-flashcards-btn svg {
  width: 32px !important;
  height: 32px !important;
}
body.lk-reader .toolbar-btn-fc {
  flex-direction: row !important;
  gap: 8px !important;
  padding: 0 14px !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 17px !important;
  line-height: 1 !important;
}


/* === BTN_Y_PARITY_V2_20260629 — revert squished icons, keep aligned center === */
body.lk-reader .lk-bottom-toolbar {
  align-items: center !important;
}

body.lk-reader .toolbar-btn-circle {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
}

body.lk-reader .toolbar-btn-stack {
  height: auto !important;
  min-height: 38px !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 0 16px !important;
}
body.lk-reader #lk-sentence-btn svg {
  width: 34px !important;
  height: 24px !important;
  display: block !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 11px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

body.lk-reader .toolbar-btn-fc {
  height: auto !important;
  min-height: 38px !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 14px !important;
}
body.lk-reader #lk-flashcards-btn svg {
  width: 32px !important;
  height: 32px !important;
  display: block !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 17px !important;
  line-height: 1 !important;
}


/* === VIDEO_PERFECT_CIRCLE_20260629 — ensure Video is 38x38 exact === */
body.lk-reader #lk-video-btn.toolbar-btn-circle {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
}


/* === VIDEO_INNER_BIGGER_20260629 — let the YouTube-style SVG fill more of the circle === */
body.lk-reader #lk-video-btn.toolbar-btn-circle svg {
  width: 24px !important;
  height: 24px !important;
}


/* === VIDEO_INNER_BIGGER_V3_20260629 — let the SVG nearly fill the 38px circle === */
body.lk-reader #lk-video-btn.toolbar-btn-circle svg {
  width: 30px !important;
  height: 30px !important;
}


/* === VIDEO_INNER_SMALLER_V4_20260629 — dial back the inner rect, keep 38px circle === */
body.lk-reader #lk-video-btn.toolbar-btn-circle svg {
  width: 26px !important;
  height: 26px !important;
}


/* === SENT_ICON_LK_MATCH_V2_20260629 === */
body.lk-reader #lk-sentence-btn svg {
  width: 42px !important;
  height: 24px !important;
  stroke: var(--btn-ink) !important;
  fill: none !important;
}
body.lk-reader #lk-sentence-btn svg rect,
body.lk-reader #lk-sentence-btn svg line {
  stroke-width: 1.5 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 13px !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
}
body.lk-reader .toolbar-btn-stack {
  min-height: 44px !important;
  padding: 0 18px !important;
}


/* === THIN_LINES_STANDARD_20260629 — as in the reference thin stroke quality across both icons === */
body.lk-reader #lk-sentence-btn svg rect,
body.lk-reader #lk-sentence-btn svg line,
body.lk-reader #lk-flashcards-btn svg rect,
body.lk-reader #lk-flashcards-btn svg line,
body.lk-reader #lk-flashcards-btn svg circle,
body.lk-reader #lk-flashcards-btn svg path {
  stroke-width: 1.0 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}


/* === BTN_HEIGHT_PARITY_V3_20260629 — all 3 buttons fit in 38px === */

/* Lock container height to match Video circle */
body.lk-reader .toolbar-btn-stack,
body.lk-reader .toolbar-btn-fc {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Sentence View: icon bigger + label tight to icon */
body.lk-reader .toolbar-btn-stack {
  flex-direction: column !important;
  gap: 1px !important;
  padding: 2px 18px !important;
}
body.lk-reader #lk-sentence-btn svg {
  width: 32px !important;
  height: 20px !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 13px !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* Flashcards: icon fills white height with small top/bottom margin */
body.lk-reader .toolbar-btn-fc {
  flex-direction: row !important;
  gap: 8px !important;
  padding: 3px 14px !important;
}
body.lk-reader #lk-flashcards-btn svg {
  width: 32px !important;
  height: 32px !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
}


/* === SENT_ICON_DECOMPRESS_20260629 — restore aspect so internal lines render === */
body.lk-reader #lk-sentence-btn svg {
  width: 32px !important;
  height: 24px !important;
  overflow: visible !important;
}

/* Tighten the stack so 24px icon + label still fits 38px container */
body.lk-reader .toolbar-btn-stack {
  gap: 0 !important;
  padding: 0 18px !important;
  justify-content: center !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 12px !important;
  margin-top: -2px !important;
}


/* === SQUARE_BTNS_38_20260629 — all 3 buttons share the exact 38x38 footprint === */
body.lk-reader .toolbar-btn-circle,
body.lk-reader .toolbar-btn-stack,
body.lk-reader .toolbar-btn-fc {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  padding: 0 !important;
}

/* Sentence: icon + tiny label, both in 38x38 */
body.lk-reader .toolbar-btn-stack {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}
body.lk-reader #lk-sentence-btn svg {
  width: 26px !important;
  height: 18px !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 10px !important;
  margin-top: 1px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

/* Flashcards: icon + count both in 38x38, tighter gap */
body.lk-reader .toolbar-btn-fc {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
}
body.lk-reader #lk-flashcards-btn svg {
  width: 24px !important;
  height: 24px !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: var(--btn-ink) !important;
}

/* Larger gaps between the 3 38x38 squares */
body.lk-reader .lk-bottom-toolbar {
  gap: 24px !important;
}


/* === BTN_AUTO_WIDTH_V4_20260629 — Video stays 38x38 circle, others get height 38 + width auto === */

body.lk-reader .toolbar-btn-circle {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
}

/* Frase: height locked, width auto */
body.lk-reader .toolbar-btn-stack {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  padding: 0 12px !important;
}
body.lk-reader #lk-sentence-btn svg {
  width: 38px !important;
  height: 22px !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 11px !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* Flashcards: same — height locked, width auto, ICON HAS CONTRAST (no white fill that vanishes on white bg) */
body.lk-reader .toolbar-btn-fc {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 0 10px !important;
}
body.lk-reader #lk-flashcards-btn svg {
  width: 28px !important;
  height: 28px !important;
}
/* CONTRAST FIX: cards have dark outline + NO white fill (use none so background shows through but stroke is clearly visible) */
body.lk-reader #lk-flashcards-btn svg rect {
  fill: rgba(255,255,255,0.5) !important;
  stroke: var(--btn-ink) !important;
  stroke-width: 1.2 !important;
}
body.lk-reader #lk-flashcards-btn svg circle,
body.lk-reader #lk-flashcards-btn svg line {
  stroke: #FBBF24 !important;
  stroke-width: 1.4 !important;
  fill: none !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--btn-ink) !important;
  line-height: 1 !important;
}


/* === FRASE_ICON_1_5X_20260629 — bump sentence icon 1.5x === */
body.lk-reader #lk-sentence-btn svg {
  width: 57px !important;
  height: 33px !important;
}
/* Stack button needs more horizontal room for the bigger icon */
body.lk-reader .toolbar-btn-stack {
  padding: 0 16px !important;
}
/* If icon + label exceeds 38px height, allow the stack to be taller — but Patrick wanted height locked.
   Override: pull label tightly under bigger icon. */
body.lk-reader .toolbar-btn-stack {
  height: auto !important;
  min-height: 42px !important;
  max-height: 42px !important;
}
body.lk-reader .toolbar-btn-stack .toolbar-label {
  font-size: 10px !important;
  margin-top: -1px !important;
}


/* === FC_ICON_2X_OPAQUE_20260629 — flashcard icon doubled + opaque white fill === */
body.lk-reader #lk-flashcards-btn svg {
  width: 56px !important;
  height: 56px !important;
}
body.lk-reader #lk-flashcards-btn svg rect {
  fill: #FFFFFF !important;
  stroke: var(--btn-ink) !important;
  stroke-width: 1.2 !important;
}
body.lk-reader .toolbar-btn-fc {
  height: auto !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 12px !important;
  gap: 6px !important;
}
body.lk-reader .toolbar-fc-count {
  font-size: 14px !important;
  font-weight: 600 !important;
}


/* === FC_ICON_45_LINES_1PX_V5_20260629 === */
body.lk-reader #lk-flashcards-btn svg {
  width: 45px !important;
  height: 45px !important;
}
/* Match Frase stroke weight (1.0px) on all flashcard SVG elements */
body.lk-reader #lk-flashcards-btn svg rect,
body.lk-reader #lk-flashcards-btn svg circle,
body.lk-reader #lk-flashcards-btn svg line,
body.lk-reader #lk-flashcards-btn svg path {
  stroke-width: 1.0 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
/* Tighten gap between cards and number 1 */
body.lk-reader .toolbar-btn-fc {
  gap: 2px !important;
  min-height: 45px !important;
  max-height: 45px !important;
}


/* === FRASE_AND_1_SAME_FONT_20260629 — Frase label + 1 count use IDENTICAL font === */
body.lk-reader .toolbar-btn-stack .toolbar-label,
body.lk-reader .toolbar-fc-count {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  color: var(--btn-ink) !important;
  letter-spacing: 0 !important;
}


/* === FC_GAP_1PX_20260629 — tighten gap between cards and 1 by 50% (2px -> 1px) === */
body.lk-reader .toolbar-btn-fc {
  gap: 1px !important;
}


/* === FC_GAP_NEGATIVE_20260629 — pull 1 even closer to cards === */
body.lk-reader .toolbar-btn-fc {
  gap: 0 !important;
}
body.lk-reader .toolbar-fc-count {
  margin-left: -4px !important;
}


/* === AUDIO_WIDGET_V2_CSS_20260629 — audio control widget === */
.lx-audio-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #FFFFFF;
  border: 1px solid var(--btn-border-thin);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 70;
  font: 500 12px/1 "Inter", system-ui, sans-serif;
  color: var(--btn-ink);
}
.lx-audio-widget .lxaw-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--btn-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 100ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .lx-audio-widget .lxaw-btn:hover { background: rgba(0,0,0,0.05); }
}
.lx-audio-widget .lxaw-btn.is-active {
  background: rgba(31,138,130,0.10) !important;
  outline: none !important;
}
.lx-audio-widget .lxaw-btn.is-active svg { stroke: #1F8A82 !important; }
.lx-audio-widget .lxaw-btn svg { width: 16px; height: 16px; pointer-events: none; }

.lx-audio-widget .lxaw-play {
  background: var(--btn-ink) !important;
  color: #ffffff !important;
}
.lx-audio-widget .lxaw-play:hover { background: var(--btn-ink-hover) !important; }
.lx-audio-widget .lxaw-play svg { width: 14px; height: 14px; }

.lx-audio-widget .lxaw-time {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: #475569;
  padding: 0 4px;
  min-width: 38px;
  text-align: center;
}

.lx-audio-widget .lxaw-prog {
  position: relative;
  width: 160px;
  height: 3px;
  background: #e5e7eb;
  border-radius: 2px;
  cursor: pointer;
}
.lx-audio-widget .lxaw-prog-fill {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 0%;
  background: #16a34a;
  border-radius: 2px;
  transition: width 200ms linear;
}

.lx-audio-widget .lxaw-sec { position: relative; }
.lx-audio-widget .lxaw-secn {
  position: absolute;
  bottom: 6px;
  font-size: 8px;
  font-weight: 600;
  background: #ffffff;
  padding: 0 1px;
}

.lx-audio-widget .lxaw-speed {
  width: auto;
  padding: 0 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.lx-audio-widget .lxaw-close { margin-left: 4px; background: var(--btn-hover-veil); }

/* Reading + listening mode: compact text column + karaoke bold-on-current-sentence */
body.lk-reader.lx-reading-listening #thetext {
  max-width: 540px !important;
}
body.lk-reader.lx-reading-listening .lk-current-sentence {
  font-weight: 700 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--btn-ink) !important;
}
body.lk-reader.lx-reading-listening .textsentence:not(.lk-current-sentence) {
  opacity: 0.55;
}


/* === AUDIO_WIDGET_TOOLBAR_PARITY_20260629 — align widget with Video/Frase/Flashcard standards === */

/* Container — same white-pill aesthetic as the toolbar */
.lx-audio-widget {
  padding: 6px 14px !important;
  gap: 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04) !important;
  font: 500 12px/1 "Inter", system-ui, sans-serif !important;
  color: var(--btn-ink) !important;
}

/* All non-play buttons: transparent ghost (same as toolbar) */
.lx-audio-widget .lxaw-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--btn-ink) !important;
  transition: background 100ms ease !important;
}
@media (hover: hover) and (pointer: fine) {
  .lx-audio-widget .lxaw-btn:hover {
  background: var(--btn-hover-veil) !important;
}
}
.lx-audio-widget .lxaw-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke: var(--btn-ink) !important;
  fill: none !important;
  stroke-width: 1.0 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* Active state: match the brand teal (consistent with sentence-view-active button) */
.lx-audio-widget .lxaw-btn.is-active {
  background: rgba(31, 138, 130, 0.10) !important;
  outline: 1.5px solid #1F8A82 !important;
}
.lx-audio-widget .lxaw-btn.is-active svg {
  stroke: #1F8A82 !important;
}

/* Play button: identical 38px dark navy circle as the toolbar Video button */
.lx-audio-widget .lxaw-play {
  width: 38px !important;
  height: 38px !important;
  background: var(--btn-ink) !important;
  color: #ffffff !important;
}
.lx-audio-widget .lxaw-play:hover {
  background: var(--btn-ink-hover) !important;
}
.lx-audio-widget .lxaw-play svg {
  width: 14px !important;
  height: 14px !important;
  fill: #ffffff !important;
  stroke: none !important;
}

/* Time labels — same Inter 12px/500/#1a1a2e standard as toolbar labels */
.lx-audio-widget .lxaw-time {
  font: 500 12px/1 "Inter", system-ui, sans-serif !important;
  color: var(--btn-ink) !important;
  font-variant-numeric: tabular-nums !important;
  min-width: 38px !important;
  padding: 0 2px !important;
}

/* Progress bar: subtle, no chunky green */
.lx-audio-widget .lxaw-prog {
  width: 160px !important;
  height: 3px !important;
  background: rgba(0,0,0,0.08) !important;
  border-radius: 999px !important;
}
.lx-audio-widget .lxaw-prog-fill {
  background: var(--btn-ink) !important;
  border-radius: 999px !important;
}

/* Skip-5 buttons: number badge tighter + Inter weight */
.lx-audio-widget .lxaw-secn {
  background: transparent !important;
  font: 600 8px/1 "Inter", system-ui, sans-serif !important;
  color: var(--btn-ink) !important;
  bottom: 7px !important;
  right: 7px !important;
  position: absolute !important;
}

/* Speed pill — match label font + brand color */
.lx-audio-widget .lxaw-speed {
  width: auto !important;
  padding: 0 10px !important;
  border-radius: 16px !important;
  font: 600 12px/1 "Inter", system-ui, sans-serif !important;
  color: var(--btn-ink) !important;
}

/* Close button — same dimensions, no fill, ghost hover */
.lx-audio-widget .lxaw-close {
  margin-left: 4px !important;
  background: transparent !important;
}
.lx-audio-widget .lxaw-close svg {
  width: 14px !important;
  height: 14px !important;
}


/* === AUDIO_WIDGET_ICON_VISIBILITY_20260629 — make icons visible at small button size === */
.lx-audio-widget .lxaw-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 1.5 !important;
  stroke: var(--btn-ink) !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.lx-audio-widget .lxaw-play svg {
  width: 12px !important;
  height: 12px !important;
  fill: #ffffff !important;
  stroke: none !important;
}
/* Close X — bigger, no border */
.lx-audio-widget .lxaw-close svg {
  width: 14px !important;
  height: 14px !important;
}


/* === WIDGET_BORDER_KILLER_20260629 — remove every border/outline source on widget buttons === */
.lx-audio-widget .lxaw-btn,
.lx-audio-widget .lxaw-btn:focus,
.lx-audio-widget .lxaw-btn:focus-visible,
.lx-audio-widget .lxaw-btn:active,
.lx-audio-widget .lxaw-btn:hover {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.lx-audio-widget .lxaw-btn svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 18px !important;
  height: 18px !important;
  stroke: var(--btn-ink) !important;
  stroke-width: 1.8 !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.lx-audio-widget .lxaw-play svg {
  width: 12px !important;
  height: 12px !important;
  fill: #ffffff !important;
  stroke: none !important;
}
.lx-audio-widget .lxaw-close svg {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2 !important;
}


/* === WIDGET_STD_FONTS_PLAY_CLOSE_20260629 === */

/* ALL text in widget: Inter 12px / 500 / #1a1a2e */
.lx-audio-widget,
.lx-audio-widget .lxaw-time,
.lx-audio-widget .lxaw-speed,
.lx-audio-widget .lxaw-secn {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--btn-ink) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
.lx-audio-widget .lxaw-speed {
  font-weight: 600 !important;
}
.lx-audio-widget .lxaw-secn {
  font-weight: 600 !important;
  font-size: 9px !important;
  position: absolute !important;
  bottom: 7px !important;
  right: 7px !important;
  background: transparent !important;
}

/* Play button: lock the play-triangle icon visually consistent (no pause-state swap) */
.lx-audio-widget .lxaw-play {
  width: 38px !important;
  height: 38px !important;
  background: var(--btn-ink) !important;
}
.lx-audio-widget .lxaw-play:hover {
  background: var(--btn-ink-hover) !important;
}
.lx-audio-widget .lxaw-play svg {
  width: 12px !important;
  height: 12px !important;
  fill: #ffffff !important;
  stroke: none !important;
}

/* Close X — text glyph instead of SVG (more reliable) */
.lx-audio-widget .lxaw-close {
  background: transparent !important;
}
.lx-audio-widget .lxaw-close .lxaw-close-x {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  color: var(--btn-ink) !important;
  line-height: 1 !important;
  display: inline-block !important;
}


/* === WIDGET_FINAL_AUDIT_FIXES_20260629 === */
.lx-audio-widget .lxaw-secn {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--btn-ink) !important;
  background: transparent !important;
  position: absolute !important;
  bottom: 5px !important;
  right: 6px !important;
  line-height: 1 !important;
}
.lx-audio-widget .lxaw-play svg {
  width: 14px !important;
  height: 14px !important;
  fill: #ffffff !important;
  stroke: none !important;
}
.lx-audio-widget #lxawLoop svg,
.lx-audio-widget #lxawSentSync svg,
.lx-audio-widget #lxawBack5 svg,
.lx-audio-widget #lxawFwd5 svg {
  width: 20px !important;
  height: 20px !important;
  stroke: var(--btn-ink) !important;
  stroke-width: 2 !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}
.lx-audio-widget .lxaw-close-x {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 22px !important;
  font-weight: 300 !important;
  color: var(--btn-ink) !important;
  line-height: 1 !important;
  display: inline-block !important;
}


/* === WIDGET_PLAY_MATCHES_VIDEO_20260629 === */
/* widget play SVG matches the toolbar Video btn YouTube-sandwich layout */
.lx-audio-widget .lxaw-play svg {
  width: 26px !important;
  height: 26px !important;
  fill: none !important;
  stroke: none !important;
}
.lx-audio-widget .lxaw-play svg rect { fill: #FFFFFF !important; }
.lx-audio-widget .lxaw-play svg polygon { fill: var(--btn-ink) !important; }


/* === WIDGET_GLYPH_CSS_20260629 === */
.lx-audio-widget .lxaw-glyph {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  color: var(--btn-ink) !important;
  display: inline-block !important;
}
.lx-audio-widget .lxaw-glyph-loop {
  letter-spacing: -8px !important;  /* tighten the 2-arrow loop glyph */
  font-size: 18px !important;
  margin-right: 4px !important;
}
.lx-audio-widget .lxaw-sec .lxaw-secn {
  position: absolute !important;
  bottom: 2px !important;
  right: 4px !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  background: #FFFFFF !important;
  padding: 0 2px !important;
  border-radius: 2px !important;
  line-height: 1 !important;
}


/* === WIDGET_PLAY_FINAL_PARITY_20260629 — widget play SVG = toolbar Video SVG size (26x26 in 38px container) === */
.lx-audio-widget .lxaw-play {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  border-radius: 50% !important;
  background: var(--btn-ink) !important;
  aspect-ratio: 1 / 1 !important;
}
.lx-audio-widget .lxaw-play svg {
  width: 26px !important;
  height: 26px !important;
  fill: none !important;
  stroke: none !important;
  display: block !important;
}
.lx-audio-widget .lxaw-play svg rect { fill: #FFFFFF !important; }
.lx-audio-widget .lxaw-play svg polygon { fill: var(--btn-ink) !important; }


/* === WIDGET_PLAY_NO_PARENT_FILL_KILL_20260629 — let inline rect/polygon fills win === */
.lx-audio-widget .lxaw-play svg {
  width: 26px !important;
  height: 26px !important;
  display: block !important;
  overflow: visible !important;
}
.lx-audio-widget .lxaw-play svg rect {
  fill: #FFFFFF !important;
  stroke: none !important;
}
.lx-audio-widget .lxaw-play svg polygon {
  fill: var(--btn-ink) !important;
  stroke: none !important;
}


/* === WIDGET_PLAY_FLEX_LOCK_20260629 — flex can shrink fixed-width children; lock it === */
.lx-audio-widget .lxaw-play {
  flex: 0 0 38px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  flex-basis: 38px !important;
}
.lx-audio-widget .lxaw-play svg {
  flex: 0 0 26px !important;
  flex-shrink: 0 !important;
}


/* === TEXT_AREA_FINAL_HEIGHT_20260629 — text ends above the bottom toolbar with clear buffer === */
body.lk-reader #thetext {
  height: calc(100vh - 52px - 110px) !important;
  max-height: calc(100vh - 52px - 110px) !important;
  overflow: hidden !important;
  padding-top: 24px !important;
  padding-bottom: 24px !important;
  margin-bottom: 0 !important;
}

/* Bottom toolbar gets a solid background so content underneath is hidden + a clear visual border */
body.lk-reader .lk-bottom-toolbar {
  background: #FFFFFF !important;
  border-top: 1px solid rgba(0,0,0,0.06) !important;
  backdrop-filter: none !important;
  z-index: 60 !important;
}

/* Side nav arrows ALSO need to clear the toolbar — keep them above text but below toolbar */
body.lk-reader .lk-side-nav {
  z-index: 55 !important;
}


/* === TEXT_CARD_SYMMETRY_20260629 === */
/* Symmetric top + bottom: rounded corners all sides, equal margin top + bottom */
body.lk-reader #thetext {
  border-radius: 16px !important;
  background: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03) !important;
  margin-top: 12px !important;
  margin-bottom: 12px !important;
  height: calc(100vh - 52px - 110px - 24px) !important;
  max-height: calc(100vh - 52px - 110px - 24px) !important;
  padding: 36px 50px !important;
}


/* === CARD_OUTER_ONLY_20260629 — outer card on #read_pane_left, inner #thetext plain === */

/* Strip card styling from #thetext (the inner element) */
body.lk-reader #thetext {
  background: transparent !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 36px 50px !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

/* Move the card frame to #read_pane_left (the outer container) */
body.lk-reader #read_pane_left {
  background: #FFFFFF !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03) !important;
  margin: 12px auto !important;
  max-width: 920px !important;
  height: calc(100vh - 52px - 110px - 24px) !important;
  max-height: calc(100vh - 52px - 110px - 24px) !important;
  overflow: hidden !important;
}


/* === REVERT_CARD_TO_THETEXT_20260629 === */
/* Strip card styling from outer wrapper, restore on #thetext */
body.lk-reader #read_pane_left {
  background: transparent !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Card styling lives on #thetext (the inner — same as it was working before) */
body.lk-reader #thetext {
  background: #FFFFFF !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03) !important;
  margin: 12px auto !important;
  max-width: 920px !important;
  height: calc(100vh - 52px - 110px - 24px) !important;
  max-height: calc(100vh - 52px - 110px - 24px) !important;
  padding: 36px 50px !important;
  overflow: hidden !important;
}


/* === CARD_VISIBLE_EDGES_20260629 — visible border + stronger shadow so all 4 corners read === */
body.lk-reader #thetext {
  background: #FFFFFF !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04) !important;
  margin: 16px auto !important;
  max-width: 920px !important;
  /* Use a slightly tighter height so bottom corners + shadow have visible breathing room above the toolbar */
  height: calc(100vh - 52px - 110px - 32px) !important;
  max-height: calc(100vh - 52px - 110px - 32px) !important;
  padding: 36px 50px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}


/* === CARD_SYMMETRIC_BORDER_20260629 — same visible border ALL 4 sides === */
body.lk-reader #thetext {
  border-top: 1px solid var(--btn-border-thin) !important;
  border-right: 1px solid var(--btn-border-thin) !important;
  border-bottom: 1px solid var(--btn-border-thin) !important;
  border-left: 1px solid var(--btn-border-thin) !important;
  border-radius: 16px !important;
  /* Symmetric drop shadow (no directional bias) */
  box-shadow: 0 0 0 0 transparent, 0 4px 16px rgba(0,0,0,0.05) !important;
}


/* === CARD_TIGHT_TO_LINES_SHADOW_20260629 === */
/* Reduce card margin so it sits closer to the external lines */
body.lk-reader #thetext {
  margin: 6px auto !important;
  height: calc(100vh - 52px - 110px - 12px) !important;
  max-height: calc(100vh - 52px - 110px - 12px) !important;
}

/* Bottom toolbar — top border + drop-shadow ABOVE it (the external line shadow) */
body.lk-reader .lk-bottom-toolbar {
  border-top: 1px solid var(--btn-border-thin) !important;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04), 0 -1px 0 rgba(0,0,0,0.02) !important;
  background: #FFFFFF !important;
}

/* Topbar bottom-border + drop-shadow (matching pair for the top external line) */
body.lk-reader .lx-topbar {
  border-bottom: 1px solid var(--btn-border-thin) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 0 rgba(0,0,0,0.02) !important;
}


/* === CARD_BOTTOM_PADDING_AND_FADE_20260629 — match top/L/R padding on bottom + soft fade so partial last line doesn't look sliced === */
body.lk-reader #thetext {
  padding-top: 36px !important;
  padding-bottom: 36px !important;
  padding-left: 50px !important;
  padding-right: 50px !important;
  /* Soft fade in the bottom 40px so the partial last line isn't a hard cut */
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 40px), transparent 100%) !important;
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 40px), transparent 100%) !important;
}


/* === CARD_NO_MASK_MIRROR_TOP_BOTTOM_20260629 === */
/* Remove the bottom fade mask — it was killing the rounded bottom border */
body.lk-reader #thetext {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  /* All 4 borders visible + identical, all 4 corners rounded */
  border: 1px solid var(--btn-border-thin) !important;
  border-top: 1px solid var(--btn-border-thin) !important;
  border-right: 1px solid var(--btn-border-thin) !important;
  border-bottom: 1px solid var(--btn-border-thin) !important;
  border-left: 1px solid var(--btn-border-thin) !important;
  border-radius: 16px !important;
  /* Symmetric padding all 4 sides */
  padding: 36px 50px !important;
  /* Equal margin top + bottom to mirror spacing between topbar and toolbar */
  margin: 6px auto !important;
  /* Height accounting for: topbar 52px + 6px top margin + 6px bottom margin + toolbar 90px + 4px buffer */
  height: calc(100vh - 52px - 90px - 12px - 4px) !important;
  max-height: calc(100vh - 52px - 90px - 12px - 4px) !important;
}


/* === CARD_BOTTOM_PADDING_FORCED_20260629 === */
/* Switch to content-box so padding-bottom adds visible space outside the height value */
body.lk-reader #thetext {
  box-sizing: content-box !important;
  height: calc(100vh - 52px - 90px - 12px - 4px - 72px) !important;
  max-height: calc(100vh - 52px - 90px - 12px - 4px - 72px) !important;
  padding-top: 36px !important;
  padding-right: 50px !important;
  padding-bottom: 36px !important;
  padding-left: 50px !important;
}


/* === CARD_BOTTOM_OVERLAY_PADDING_20260629 === */
/* overflow:hidden clips at padding-edge, so overflow text visually fills padding-bottom.
   Mask it with a white overlay so padding-bottom appears as empty whitespace consistently. */
body.lk-reader #thetext {
  position: relative !important;
}
body.lk-reader #thetext::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 36px !important;
  background: #FFFFFF !important;
  border-radius: 0 0 16px 16px !important;
  pointer-events: none !important;
  z-index: 2 !important;
}


/* === CARD_OVERLAY_60PX_20260629 === */
body.lk-reader #thetext::after {
  height: 60px !important;
  background: #FFFFFF !important;
  z-index: 10 !important;
  opacity: 1 !important;
}


/* === CARD_OVERFLOW_CLIP_20260629 === */
/* The actual root cause: overflow:hidden clips at the PADDING edge so overflow text fills the padding-bottom area visually.
   overflow:clip clips at the CONTENT edge, so padding-bottom stays whitespace. */
body.lk-reader #thetext {
  overflow: clip !important;
  overflow-clip-margin: 0 !important;
}
/* Remove the ::after overlay hack — clip handles it natively now */
body.lk-reader #thetext::after {
  display: none !important;
}


/* === CARD_HIDDEN_WITH_MASK_AND_PAGINATION_20260629 === */
/* overflow:hidden allows JS scrollTop for virtual pagination */
body.lk-reader #thetext {
  overflow: hidden !important;
  position: relative !important;
  scroll-behavior: smooth !important;
}
/* Restore the ::after mask for the padding-bottom zone (covers overflow text bleeding into it) */
body.lk-reader #thetext::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 1px !important;
  right: 1px !important;
  bottom: 1px !important;
  height: 40px !important;
  background: #FFFFFF !important;
  border-radius: 0 0 15px 15px !important;
  pointer-events: none !important;
  z-index: 5 !important;
}


/* === AUDIO_WIDGET_CENTERED_20260629 === */
.lx-audio-widget {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}


/* === CARD_NARROWER_FOR_VIDEO_20260629 — compact text card so YouTube PIP fits beside without overlap === */
body.lk-reader #thetext {
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* PANEL_TOGGLE_UNICODE_REMOVED_20260703 — replaced by inline SVG in JS
   (was: ::before content E5 / E4 unicode arrow chars). */
body.lk-reader .lk-top-icons .lk-panel-toggle::before,
body.lk-reader.right-panel-closed .lk-top-icons .lk-panel-toggle::before {
  content: none !important;
  display: none !important;
}


/* LKREF_STYLE_CURRENT_SENTENCE_20260823_v3 — clean underline below sentence, more breathing room */
:root {
  --lk-line-height: 1.95 !important;
}
body.lk-reader #thetext,
body.lk-reader .read-page-content {
  line-height: 1.95 !important;
}

/* SYNCPAINT_20261016 — a linha pinta-se nas PALAVRAS, nao na frase.
   `span.textsentence` tem `font-size: 0%` (truque do Lute contra o espaco entre spans), por
   isso a caixa da frase tem ALTURA ZERO: medido, [142, 0]. Um underline nela nao tem onde ser
   desenhado, e nunca foi -- a correccao de 15/10, que lhe mudou a cor e a espessura, mexeu
   numa linha invisivel.
   Os `.textitem` tem fonte real, e o Lute cria um tambem para cada ESPACO, portanto a linha
   atravessa a frase toda sem buracos (medido: 0 de 12 itens sem linha). */
#thetext .textsentence.lk-current-sentence > .textitem {
  text-decoration-line: underline !important;
  text-decoration-color: var(--color-brand-500, #4F46E5) !important;
  text-decoration-thickness: 3px !important;
  text-underline-offset: 6px !important;
  text-decoration-skip-ink: none !important;
  transition: text-decoration-color 200ms ease !important;
}

/* A regra abaixo fica pelo resto do que faz (tirar fundo, negrito, sombra). O underline que
   ela declara NAO e o que se ve: a caixa da frase tem altura zero. Quem vier mexer na
   espessura ou na cor da linha tem de mexer na regra de cima. */
/* Current sentence: subtle underline BELOW text, no bg, no bold — referencia parity */
#thetext .textsentence.lk-current-sentence,
.lk-current-sentence {
  background: transparent !important;
  background-image: none !important;
  font-weight: inherit !important;
  color: inherit !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  /* SYNCLINE_20261015 — era #94a3b8 (cinzento) com 2px: invisivel por cima de palavras com
     fundo azul, num telemovel. Cor da marca e 3px, que se ve contra o azul e contra o amarelo.
     Continua a ser uma linha POR BAIXO e nao um fundo: um fundo ficaria atras dos fundos das
     palavras e voltaria ao mesmo problema. */
  text-decoration-line: underline !important;
  text-decoration-color: var(--color-brand-500, #4F46E5) !important;
  text-decoration-thickness: 3px !important;
  text-underline-offset: 6px !important;
  text-decoration-skip-ink: none !important;
  transition: text-decoration-color 200ms ease !important;
}

/* Kill the reading-listening mode's "grey non-current sentences" darkening —
   creates ambiguity with our clean underline approach */
body.lk-reader.lx-reading-listening .textsentence:not(.lk-current-sentence) {
  opacity: 1 !important;
}
body.lk-reader.lx-reading-listening .lk-current-sentence {
  background: transparent !important;
  box-shadow: none !important;
  font-weight: inherit !important;
}


/* FIT_SNAP_PAGINATION_20260823 — bottom padding for breathing room */
body.lk-reader #thetext,
body.lk-reader .read-page-content {
  padding-bottom: 56px !important;
}


/* CLEAN_LAYOUT_20260912_v4 — the ONE rule for text vs panel.
   Approach: text stays viewport-centered (no pane manipulation).
   When panel is open, text max-width is reduced so it doesn't extend into panel.
   Panel is fixed-position on right, docked at various widths per viewport.
   
   Breakpoints:
    <768px  — panel full-width overlay (Lute3 default, unchanged)
    768-1023px  — panel 280px docked right
    >=1024px    — panel 360px docked right (default) */
   
/* On 768-1023px, dock panel narrowly on right */
@media (min-width: 768px) and (max-width: 1023px) {
  body.lk-reader div#read_pane_right {
    left: auto !important;
    right: 12px !important;
    width: 280px !important;
    max-width: 280px !important;
    top: calc(var(--lx-topbar-height, 56px) + 20px) !important;
    bottom: calc(var(--lx-topbar-height, 56px) + 20px) !important;
    height: auto !important;
    background-color: white !important;
    transform: translateX(calc(100% + 24px)) !important;
    opacity: 0 !important;
    border-radius: 16px !important;
    border: 1px solid var(--border-default, #e5e7eb) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10) !important;
  }
  body.lk-reader.word-selected div#read_pane_right {
    transform: translateX(0) !important;
    opacity: 1 !important;
  }
}

/* When panel is OPEN on narrow viewports, right-align text to just before panel
   (guarantees no overlap). On wide viewports, keep auto-center — plenty of room. */
@media (min-width: 481px) and (max-width: 1023px) {
  body.lk-reader:not(.right-panel-closed) div#thetext {
    max-width: 610px !important;
    margin-left: auto !important;
    margin-right: calc(var(--lk-right-w, 280px) + 36px) !important;
  }
}
@media (min-width: 1024px) and (max-width: 1439px) {
  body.lk-reader:not(.right-panel-closed) div#thetext {
    max-width: 610px !important;
    margin-left: auto !important;
    margin-right: calc(var(--lk-right-w, 360px) + 36px) !important;
  }
}
/* On truly wide (>=1440px): auto-center — panel doesn't collide */
@media (min-width: 1440px) {
  body.lk-reader:not(.right-panel-closed) div#thetext {
    max-width: 610px !important;
    margin: 0 auto !important;
  }
}

/* Ensure pane's margin/padding are reset — text auto-centers in viewport */
body.lk-reader div#read_pane_left {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

/* NO_UNDERLINE_IN_SENTENCE_MODE_20260912 — Patrick 2026-09-12: hide the
   status4/5 word underlines in sentence mode so the focused sentence
   is visually clean. Paginated mode keeps them (useful for skimming). */
body.lx-sentence-mode span.textitem,
body.lx-sentence-mode span.textitem.status4,
body.lx-sentence-mode span.textitem.status5 {
  border-bottom: none !important;
  text-decoration: none !important;
}
body.lx-sentence-mode .textsentence.lk-current-sentence {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* SAVE_SENTENCE_BUTTON_20260912 — pulse feedback when sentence saved */
.lx-sentence-chrome .lx-s-save-sent {
  color: var(--btn-ink, #0f172a);
}
.lx-sentence-chrome .lx-s-save-sent.lx-saved-pulse {
  animation: lx-save-pulse 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes lx-save-pulse {
  0% { transform: scale(1); background: #ffffff; }
  40% { transform: scale(1.12); background: #FEF3C7; }
  100% { transform: scale(1); background: #ffffff; }
}

/* SENTENCE_SELECTED_STYLE_20260912 — light-gray highlight when sentence is
   selected as a term (click-anywhere-on-sentence flow) */
body.lx-sentence-mode .textsentence.lk-current-sentence.lx-sentence-selected {
  background: rgba(148, 163, 184, 0.15) !important;
  border-radius: 8px !important;
  transition: background 150ms ease !important;
}

/* LEXGO_LIMITS_NOTICE_20260913 — per-user AI cap notices */
.lx-cap-msg{margin-top:8px;padding:8px 10px;border-radius:8px;background:#FFF7E6;color:#7A4B00;font-size:13px;line-height:1.4}
.lx-cap-soft{background:#F3F6F8;color:#3B4A55}
.lx-cap-link{display:inline-block;margin-left:6px;color:#4F46E5;font-weight:600;text-decoration:underline}


/* === LOOP_20260913 — PHONE READER: one full-width text column in every panel state.
   Desktop rules above keep 60px side margins / 50px padding and a 270px ceiling on
   #read_pane_left, which left ~138px for text on a 390px phone; after the first tap a
   different rule set pushed the text past the right edge. Scoped to ≤480px only. */
@media (max-width: 480px) {
  body.lk-reader.lx-has-topbar #read_pane_left,
  body.lk-reader.lx-has-topbar.right-panel-closed #read_pane_left,
  body.lk-reader.lx-has-topbar.word-selected #read_pane_left {
    margin: 8px 8px 0 !important; width: calc(100% - 16px) !important; max-width: none !important;
    padding: 0 !important; border-radius: 14px !important;
  }
  body.lk-reader.lx-has-topbar #thetext,
  body.lk-reader.lx-has-topbar.right-panel-closed #thetext,
  body.lk-reader.lx-has-topbar.word-selected #thetext {
    margin: 0 !important; width: 100% !important; max-width: 100% !important;
    padding: 22px 30px 96px !important; font-size: 19px !important; line-height: 1.6 !important;
  }
  body.lk-reader .lk-side-nav { width: 22px !important; opacity: 0.35 !important; }
  body.lk-reader .lk-top-icons { top: 6px !important; right: 10px !important; }
  /* Ouvir (TTS) button lives in the bottom toolbar */
  .lx-tts-btn.is-speaking .toolbar-label { color: var(--brand-accent, #4F46E5); }
}

/* LOOP_20260913b — bottom toolbar must fit 4 items (Ouvir · vídeo · Frase · flashcards) on 360px */
@media (max-width: 480px) {
  body.lk-reader .lk-bottom-toolbar { gap: 6px !important; padding: 8px 6px 10px !important; justify-content: space-between !important; }
  body.lk-reader .lk-bottom-toolbar .toolbar-btn { flex: 1 1 0 !important; min-width: 0 !important; padding: 4px 2px !important; margin: 0 !important; }
  body.lk-reader .lk-bottom-toolbar .toolbar-label { font-size: 11px !important; white-space: nowrap; }
}

/* LOOP_20260913c — stronger selectors: a later 2-class rule kept padding 0 40px / gap 32px */
@media (max-width: 480px) {
  body.lk-reader.lx-has-topbar .lk-bottom-toolbar,
  body.lk-reader.lx-has-topbar.right-panel-closed .lk-bottom-toolbar,
  body.lk-reader.lx-has-topbar.word-selected .lk-bottom-toolbar {
    box-sizing: border-box !important; width: 100% !important; left: 0 !important; right: 0 !important;
    gap: 4px !important; padding: 8px 6px 10px !important; justify-content: space-between !important;
  }
  body.lk-reader.lx-has-topbar .lk-bottom-toolbar .toolbar-btn {
    flex: 1 1 0 !important; min-width: 0 !important; padding: 4px 2px !important; margin: 0 !important; box-sizing: border-box !important;
  }
  body.lk-reader.lx-has-topbar .lk-bottom-toolbar .toolbar-btn-circle { flex: 0 0 44px !important; }
}

/* LOOP_20260913e */
body.lk-reader .lk-bottom-toolbar .toolbar-btn.lx-hide, .lx-hide { display: none !important; }

/* LOOP_20260913f — id-level specificity so the hide beats the toolbar id rules */
body.lk-reader #lk-video-btn.lx-hide, body.lk-reader.lx-has-topbar .lk-bottom-toolbar #lk-video-btn.lx-hide { display: none !important; width: 0 !important; flex: 0 0 0 !important; padding: 0 !important; margin: 0 !important; }


/* === REVIEWMENU (superseded by 20260914c — styling kept for .lx-fc-pop below) === */
.lx-review-menu {
  position: fixed; z-index: 200; right: 10px; bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  min-width: 232px; max-width: calc(100vw - 20px);
  background: var(--surface-card, #fff); border: 1px solid var(--border-default, #E5E7EB);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14); padding: 6px;
  font-family: var(--font-ui, Inter, system-ui, sans-serif);
}
.lx-review-menu__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 10px; border-radius: 8px;
  color: var(--text-body, #111827); text-decoration: none; font-size: 15px; font-weight: 500;
}
.lx-review-menu__row:hover { background: var(--color-accent-soft, #EEF2FF); }
.lx-review-menu__row.is-disabled { color: var(--text-subtle, #9CA3AF); }
.lx-review-menu__n { font-size: 13px; font-weight: 700; color: var(--text-muted, #6B7280); }
.lx-review-menu__hr { height: 1px; background: var(--border-default, #E5E7EB); margin: 6px 4px; }
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc .toolbar-fc-count {
  position: static; margin-left: 4px; background: transparent; color: var(--text-muted, #6B7280);
  font-size: 12px; font-weight: 700; box-shadow: none; min-width: 0; padding: 0;
}


/* === REVIEWMENU_20260914c — the existing review popover, on the design system === */
.lx-fc-pop {
  position: fixed; z-index: 200; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  min-width: 244px; max-width: calc(100vw - 20px);
  background: var(--surface-card, #fff); border: 1px solid var(--border-default, #E5E7EB);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14); padding: 6px;
}
.lx-fc-pop[hidden] { display: none !important; }
.lx-fc-item {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px;
  border-radius: 8px; text-decoration: none; color: var(--text-body, #111827);
  font-size: 15px; font-weight: 500; font-family: var(--font-ui, Inter, system-ui, sans-serif);
}
.lx-fc-item:hover { background: var(--color-accent-soft, #EEF2FF); }
.lx-fc-item.is-disabled { opacity: .5; pointer-events: none; }
.lx-fc-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.lx-fc-label { flex: 1; }
.lx-fc-num { font-size: 13px; font-weight: 700; color: var(--text-muted, #6B7280); }
.lx-fc-item--last { border-top: 1px solid var(--border-default, #E5E7EB); margin-top: 6px; padding-top: 6px; }
/* the button itself: icon + word + count, no badge blob */
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc .toolbar-fc-count {
  position: static !important; margin-left: 4px; background: transparent !important; color: var(--text-muted, #6B7280) !important;
  font-size: 12px; font-weight: 700; box-shadow: none !important; min-width: 0; padding: 0; border: 0;
}


/* CHUNK_20260914 — Telegram / Instagram in-app browsers float a toolbar OVER the page. It is
   invisible to visualViewport, so the reader believed it had ~60px more room than Patrick can
   see and put its clean text boundary underneath that bar, and the toolbar's own labels behind
   it. Reserve the space as bottom padding: fit-snap measures the toolbar's height for its
   reserve, so this pushes the text up by the same amount it lifts the labels. */
@media (pointer: coarse) and (max-width: 820px) {
  /* must out-specify body.lk-reader .lk-bottom-toolbar, which also uses !important,
     and must NOT force border-box: the toolbar has to GROW so fit-snap reserves the space. */
  /* `html` prefix so this beats lexgo_form_pages.css, which declares the same selector with
     !important and loads later. An explicit min-height, not just padding: the toolbar carries a
     fixed height, so padding alone could never grow it. */
  html.lx-inapp body.lk-reader .lk-bottom-toolbar,
  html.lx-inapp body.lk-reader.right-panel-closed .lk-bottom-toolbar {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px) + 72px) !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 72px) !important;
    align-items: flex-start !important;
  }
}


/* ICONCOLOUR_20260914 — the rules above force rect/line/circle strokes for the FLASHCARD icon
   (white card, yellow lines). The sentence-mode review icon shares the same button and was
   inheriting them, so it came out navy + yellow + teal. A CSS rule beats a presentation
   attribute, so stroke="currentColor" in the markup could not win. Give the review state
   its own say. */
body.lx-sentence-mode #lk-flashcards-btn.lx-mode-review svg rect,
body.lx-sentence-mode #lk-flashcards-btn.lx-mode-review svg line,
body.lx-sentence-mode #lk-flashcards-btn.lx-mode-review svg polyline,
body.lx-sentence-mode #lk-flashcards-btn.lx-mode-review svg circle {
  stroke: currentColor !important;
  fill: none !important;
}


/* SENTENCEUI_20260914 — sentence mode was a 767px card with one centred line starting 177px
   down. Content to the top, text left-aligned: the biggest difference against referencia,
   and it needs no new feature. */
body.lx-sentence-mode #thetext {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding-top: 20px !important;
}
body.lx-sentence-mode .textsentence,
body.lx-sentence-mode #thetext .textsentence {
  text-align: left !important;
  font-size: clamp(20px, 3.2vw, 28px) !important;
  line-height: 1.45 !important;
}
body.lx-sentence-mode .lx-sentence-chrome {
  flex-direction: column; align-items: flex-start; gap: 12px;
  margin-bottom: 16px;
}
/* what you are reading */
.lx-s-lesson { display: flex; flex-direction: column; gap: 2px; }
.lx-s-lesson-title {
  font: 600 15px/1.35 var(--font-ui, Inter, system-ui, sans-serif);
  color: var(--text-strong, #0F172A);
}
.lx-s-lesson-src {
  font: 400 13px/1.2 var(--font-ui, Inter, system-ui, sans-serif);
  color: var(--text-muted, #6B7280);
}
/* how far through */
.lx-s-progress {
  height: 3px; border-radius: 999px;
  background: var(--surface-sunken, #F3F4F6);
  margin: 0 0 18px; overflow: hidden;
}
/* SEMCORTE_20261031 (#679) - so existe no modo frase. Fica no DOM ao sair (esta dentro do
   texto, antes da frase), e no modo pagina eram 21px no meio das linhas: cortava a ultima. */
body:not(.lx-sentence-mode) .lx-s-progress { display: none !important; }
.lx-s-progress-fill {
  height: 100%; border-radius: 999px;
  background: var(--color-brand-500, #4F46E5);
  transition: width 180ms ease;
}
/* the source-video button belongs here too: hear the line where it came from */
body.lx-sentence-mode #lk-video-btn.lx-hide { display: flex !important; }


/* SENTALIGN_20260914 — the centring was never on the sentence: #thetext is a flex column, and
   its align-items plus an inherited text-align centred everything inside. Targeting
   .textsentence was pointless — that element is display:block with font-size 0 in this mode, and
   the visible words live in .textitem spans that simply inherit. Set it on the container. */
body.lx-sentence-mode #thetext {
  align-items: flex-start !important;
  text-align: left !important;
  padding-top: 20px !important;
}
body.lx-sentence-mode #thetext .textitem {
  font-size: clamp(19px, 2.6vw, 26px) !important;
  line-height: 1.5 !important;
}


/* SENTSPACER_20260914 — fit-snap inserts blank blocks so a PAGE ends between sentences. In
   sentence mode only one sentence shows at a time, so those spacers are meaningless and were
   pushing the line ~150px down the card, recreating the empty-box look we just fixed. */
body.lx-sentence-mode .lx-fit-spacer { display: none !important; }
body.lx-sentence-mode #thetext { justify-content: flex-start !important; }


/* SENTPAD_20260914 — the last piece of the vertical gap: the active sentence carries
   padding: 114px 20px, which existed to centre a single line in the card. Now that the title,
   progress bar and sentence sit at the top, that padding just pushes the line 114px down and
   recreates the empty-box look. Keep the horizontal padding, drop the vertical. */
body.lx-sentence-mode #thetext .textsentence.lk-current-sentence,
body.lx-sentence-mode #thetext .textsentence.lx-tts-current {
  padding-top: 0 !important;
  padding-bottom: 24px !important;
}


/* SENTFIX2_20260914 — see patch notes. Two measured regressions, two rules. */

/* (1) The line was centred, not indented. This matches the 2026-06-29 selector exactly
   so that being later in the file is enough to win; the previous attempt was one class
   short and silently lost. Left padding drops to 0 so the sentence starts on the same
   column as the lesson title. */
body.lx-sentence-mode #thetext .textsentence.lk-current-sentence,
body.lx-sentence-mode #thetext .textsentence.lx-tts-current {
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* (2) The empty box: 21 paragraphs whose sentences are hidden but which still occupy
   39px each. Hiding the SPAN was never enough — the <p> around it has to go. */
body.lx-sentence-mode #thetext:has(.lk-current-sentence) > p:not(:has(.lk-current-sentence)) {
  display: none !important;
}


/* SENTFIX3_20260914 — the card now sizes to the sentence (fit-snap no longer forces a height
   here). The floor stops a two-word sentence collapsing the card and jumping the bottom
   toolbar around as you advance. */
/* SENTFIX5_20260914 — was `body.lx-sentence-mode #thetext` (0,1,1,1), which ties with the
   rules in lexgo_form_pages.css and loses on sheet order. Adding .lk-reader makes it
   (0,1,2,1) and it wins outright. */
body.lk-reader.lx-sentence-mode #thetext {
  height: auto !important;
  max-height: none !important;
  min-height: 220px !important;
  overflow: visible !important;
}


/* SENTFIX5_20260914 — same guard for the rest of the sentence-mode layout: any of these could be
   tied by a later sheet at (0,1,1,1). Restated one class stronger. */
body.lk-reader.lx-sentence-mode #thetext {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  text-align: left !important;
  padding-top: 20px !important;
}
body.lk-reader.lx-sentence-mode #thetext > p:not(:has(.lk-current-sentence)) {
  display: none !important;
}
body.lk-reader.lx-sentence-mode #thetext:not(:has(.lk-current-sentence)) > p {
  display: block !important;   /* fail-safe: nothing selected means hide nothing */
}


/* SENTFIX6_20260914 — zero-width-space separators were being rendered at 26px each. Verified on
   the served page: 0 of the 21 direct-child .textitem spans hold a real word; all 407
   words live inside a .textsentence. */
body.lk-reader.lx-sentence-mode #thetext > p > .textitem {
  display: none !important;
}
/* the gap under the line existed to separate it from the next sentence; nothing follows
   it here but the translation row. */
body.lk-reader.lx-sentence-mode #thetext .textsentence.lk-current-sentence {
  padding-bottom: 12px !important;
}


/* SENTFIX7_20260914 — phone: drop the 96px toolbar reserve in sentence mode. The class is
   repeated deliberately to reach (0,1,4,1) and beat the panel-state rule above, which is
   (0,1,3,1); an extra !important would have changed nothing. */
@media (max-width: 480px) {
  body.lk-reader.lx-sentence-mode.lx-sentence-mode.lx-has-topbar #thetext {
    padding: 20px 24px 32px !important;
  }
}


/* SENTFIX8_20260914 — the bottom mask covers a sliced last line while reading a PAGE. In
   sentence mode nothing overflows, and on a short card the 40px white block landed on top
   of the translation toggle and erased half of it. (0,1,2,1) beats the (0,1,1,1) rule. */
body.lk-reader.lx-sentence-mode #thetext::after {
  display: none !important;
  content: none !important;
}


/* TOOLBARSTD_20260914 — make the review button the same shape as the 'Frase' button beside it.
   Selector is (0,0,3,1) on purpose: this file already carries ~15 rules saying
   `body.lk-reader .toolbar-btn-fc { flex-direction: row !important }` at (0,0,2,1),
   and a 16th at equal weight would only win by accident of ordering. */
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  height: auto !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 2px 16px !important;
}
/* same icon size as the reference button */
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc svg {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 auto !important;
}
/* label + count as one row beneath the icon */
body.lk-reader .lk-bottom-toolbar .toolbar-fc-line {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  line-height: 1 !important;
}
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc .toolbar-label {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  margin: 0 !important;
  color: var(--btn-ink) !important;
}
/* an empty count must not reserve a gap (sentence mode blanks it) */
body.lk-reader .lk-bottom-toolbar .toolbar-fc-count:empty {
  display: none !important;
}

/* TOOLBARSTD_20260914 — the check keeps its own green; the rest of the icon follows the button
   ink like every other toolbar icon. Overrides the old flashcard-icon colour rules. */
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc.lx-mode-review svg rect,
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc.lx-mode-review svg line {
  stroke: currentColor !important;
  fill: none !important;
}
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc.lx-mode-review svg polyline {
  fill: none !important;
}

/* TOOLBARSTD_20260914 — speaker was the smallest glyph in the bar; match the video button. */
body.lk-reader .lk-bottom-toolbar .lx-tts-btn svg {
  width: 26px !important;
  height: 26px !important;
}


/* TOOLBARSTD2_20260914 — the 'Frase' <svg> is 57x33 but its viewBox is 0 0 24 24, so with the
   default preserveAspectRatio the glyph draws 33x33 centred in that box. 33 is therefore
   the size to match. Written as an ID selector because ~30 earlier
   `#lk-flashcards-btn svg { width: ... }` rules sit at (0,1,1,1) and outrank any class. */
body.lk-reader #lk-flashcards-btn svg {
  width: 33px !important;
  height: 33px !important;
}
/* the review icon is drawn at 2px stroke to match; older rules thinned it to 1.0-1.2 */
body.lk-reader #lk-flashcards-btn.lx-mode-review svg rect,
body.lk-reader #lk-flashcards-btn.lx-mode-review svg line {
  stroke-width: 2 !important;
  stroke: currentColor !important;
  fill: none !important;
}
body.lk-reader #lk-flashcards-btn.lx-mode-review svg polyline {
  fill: none !important;
}

/* TOOLBARSTD2_20260914 — speaker up from 22px, sized to sit with the 33px glyphs beside it. */
body.lk-reader .lk-bottom-toolbar .lx-tts-btn svg {
  width: 30px !important;
  height: 30px !important;
}


/* TOOLBARSTD3_20260914 — address the two polylines by name. A class on the element makes these
   (0,1,3,1), above the `svg polyline { stroke: currentColor !important }` rule that was
   painting the white halo the same colour as the check and fusing them into a blob. */
body.lk-reader #lk-flashcards-btn.lx-mode-review svg .lx-rv-halo {
  stroke: #FFFFFF !important;
  stroke-width: 5 !important;
  fill: none !important;
}
body.lk-reader #lk-flashcards-btn.lx-mode-review svg .lx-rv-check {
  stroke: #16A34A !important;
  stroke-width: 2.6 !important;
  fill: none !important;
}

/* TOOLBARSTD3_20260914 — and the card itself in the same ink as the 'Frase' icon, not teal. */
body.lk-reader #lk-flashcards-btn.lx-mode-review svg {
  color: var(--btn-ink, #1a1a2e) !important;
}


/* TOOLBARSTD4_20260914 — the reference icon draws its rect and lines at stroke-width 1.5
   (body.lk-reader #lk-sentence-btn svg rect/line), so at the same 33px render ours was
   coming out visibly heavier at 2. Match it. The check keeps its own weight. */
body.lk-reader #lk-flashcards-btn.lx-mode-review svg rect,
body.lk-reader #lk-flashcards-btn.lx-mode-review svg line {
  stroke-width: 1.5 !important;
}


/* TOOLBARSTD5_20260914 — "Revisar16": the count sits hard against the label because an
   earlier rule zeroes the gap on .toolbar-btn-fc and another sets the count margin to 0.
   An ID selector (0,1,2,1) settles it. */
body.lk-reader #lk-flashcards-btn .toolbar-fc-count {
  margin-left: 5px !important;
}


/* ARROWS_SPEED_20260916 — arrows in from the window edge (was 16px: thumb zone and back-swipe on
   a phone, adrift from the text on desktop). Higher specificity than the 16px rules. */
body.lk-reader .lk-side-nav.lk-side-nav-left { left: 28px !important; }
body.lk-reader .lk-side-nav.lk-side-nav-right { right: 28px !important; }
body.lk-reader:not(.right-panel-closed) .lk-side-nav.lk-side-nav-right {
  right: calc(var(--lk-right-w, 360px) + 28px) !important;
}
@media (max-width: 480px) {
  /* just outside the card rather than against the screen edge */
  body.lk-reader .lk-side-nav.lk-side-nav-left { left: 10px !important; }
  body.lk-reader .lk-side-nav.lk-side-nav-right { right: 10px !important; }
}

/* ARROWS_SPEED_20260916 — the Aa panel (font size + reading speed) */
.lx-aa-panel {
  position: fixed; top: 92px; right: 18px; z-index: 120;
  background: #fff; border: 1px solid var(--border-hairline, #E5E7EB);
  border-radius: 12px; padding: 12px 14px; min-width: 248px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  font: 400 13px/1.3 var(--font-ui, Inter, system-ui, sans-serif);
  color: var(--text-strong, #0F172A);
}
.lx-aa-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lx-aa-row + .lx-aa-row { margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border-hairline, #E5E7EB); }
.lx-aa-label { font-weight: 500; }
.lx-aa-ctrls { display: inline-flex; align-items: center; gap: 8px; }
.lx-aa-btn {
  -webkit-appearance: none; appearance: none; background: transparent;
  border: 1px solid var(--border-hairline, #E5E7EB); border-radius: 8px;
  min-width: 36px; height: 32px; font-size: 13px; font-weight: 600;
  color: var(--text-strong, #0F172A); cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .lx-aa-btn:hover { background: var(--surface-sunken, #F3F4F6); }
}
.lx-aa-panel input[type=range] { width: 108px; accent-color: var(--color-brand-500, #4F46E5); }
.lx-aa-val { min-width: 42px; text-align: right; color: var(--text-muted, #6B7280); }
@media (max-width: 480px) {
  .lx-aa-panel { right: 10px; left: 10px; min-width: 0; top: 84px; }
}


/* GUIDEFIX_20260919 — arrival guide: dim the page, ring the real control, explain it.
   (Re-written: the first attempt landed as one line of literal \n characters.) */
.lxg-veil {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(15, 23, 42, 0.45);
}
/* GUIDEB_20260919 — above the fixed topbar (1000) and the pop layer (1050). At 901 the ring
   was painted behind the topbar, which is why no ring was ever visible around the chip. */
.lxg-ring {
  position: absolute;
  z-index: 1060;
  border-radius: 12px;
  border: 2px solid var(--color-brand-500, #4F46E5);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  transition: all 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lxg-box {
  position: absolute;
  z-index: 1061;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
  font: 400 14px/1.45 var(--font-ui, Inter, system-ui, sans-serif);
  color: var(--text-strong, #0F172A);
}
.lxg-step {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted, #6B7280);
  margin-bottom: 6px;
}
.lxg-h {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
}
.lxg-p {
  margin: 0 0 14px;
  color: var(--text-muted, #4B5563);
}
.lxg-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lxg-skip {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted, #6B7280);
  cursor: pointer;
}
.lxg-next {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  cursor: pointer;
  background: var(--color-brand-500, #4F46E5);
  color: #fff;
  border-radius: 8px;
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
}
@media (max-width: 480px) {
  .lxg-box {
    max-width: none;
    left: 12px !important;
    right: 12px;
    width: auto;
  }
}

/* GUIDEB_20260919 — the current step's target sits just above the veil, so it reads as
   highlighted rather than dimmed. Relative + z-index only: nothing moves. */
.lxg-lift {
  position: relative;
  z-index: 901;
}

/* AUDIOOFFSET_20260922 — audio nudge controls in the sentence chrome. */
.lx-s-btn.lx-s-nudge { font-size: 12px; font-weight: 700; line-height: 1;
  letter-spacing: -.01em; padding: 0 8px; }
.lx-s-offset { font-size: 12px; font-weight: 600; color: var(--lx-text-muted, #6B7280);
  align-self: center; min-width: 34px; }

/* OFFSETROW_20260922 — keep the audio controls on one line inside the column chrome. */
.lx-s-audio-row { display: flex; flex-direction: row; align-items: center;
  gap: 10px; flex-wrap: wrap; }

/* NUDGEDESIGN_20260922 — the nudges are calibration, not playback: quieter than the speaker,
   still big enough for a thumb. Same prefix as the base rule plus the class, so it wins
   on specificity instead of !important. */
body.lk-reader .lx-sentence-chrome .lx-s-btn.lx-s-nudge,
.lx-sentence-chrome .lx-s-btn.lx-s-nudge {
  width: auto;
  min-width: 46px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--lx-text-muted, #6B7280);
  background: transparent;
  border: 1px solid var(--btn-border-thin, #E5E7EB);
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  body.lk-reader .lx-sentence-chrome .lx-s-btn.lx-s-nudge:hover,
  .lx-sentence-chrome .lx-s-btn.lx-s-nudge:hover {
  transform: none;
  box-shadow: none;
  color: var(--btn-ink, #0F172A);
  background: rgba(0, 0, 0, .03);
}
}
.lx-s-offset {
  font-size: 12px;
  font-weight: 600;
  color: var(--lx-text-muted, #6B7280);
  align-self: center;
}
/* the speaker leads; the nudges sit a little apart from it */
.lx-s-audio-row { gap: 8px; }
.lx-s-audio-row .lx-s-speak { margin-right: 2px; }

/* NUDGEDESIGN2_20260922 — overrides SENTENCE_CHROME_FORCED_20260629, which is all !important. */
body.lk-reader .lx-sentence-chrome .lx-s-btn.lx-s-nudge,
body.lk-reader button.lx-s-btn.lx-s-nudge {
  width: auto !important;
  min-width: 44px !important;
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--lx-text-muted, #6B7280) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid var(--btn-border-thin) !important;
  box-shadow: none !important;
}
@media (hover: hover) and (pointer: fine) {
  body.lk-reader .lx-sentence-chrome .lx-s-btn.lx-s-nudge:hover {
  transform: none !important;
  box-shadow: none !important;
  background-color: rgba(0, 0, 0, .03) !important;
  color: var(--btn-ink) !important;
}
}

/* SLIDEGROUP_20260922 — the panel moves the card, it does not squeeze it.

   Appended last and matching the specificity of the rules it replaces, so it wins on order
   rather than by piling on another !important tier. */

/* 1. The pane reserves the panel's width instead of spanning the window and relying on a
      margin that `width: 100%` was cancelling. */
body.lk-reader:not(.right-panel-closed) #read_pane_left {
  width: calc(100% - var(--lk-right-w)) !important;
  margin-right: 0 !important;
  transition: width var(--lk-dur) var(--lk-ease) !important;
}

/* 2. One ceiling for the card in both states, so opening the panel cannot re-wrap the text.
      max-width only caps: on a window too narrow for it, the card still fills what it has. */
body.lk-reader.right-panel-closed #thetext,
body.lk-reader:not(.right-panel-closed) #thetext {
  max-width: var(--lk-reading-max-w, 760px) !important;
}

/* SLIDEGROUP2_20260922 — one width for the card in both panel states.

   Matches the `div#thetext` specificity of the media queries above, which capped the card at
   610px and right-aligned it to dodge the panel. The pane now excludes the panel from its own
   width, so the card centres in genuinely free space and never re-wraps when the panel opens. */
body.lk-reader.right-panel-closed div#thetext,
body.lk-reader:not(.right-panel-closed) div#thetext {
  max-width: var(--lk-reading-max-w, 760px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* WORDSEL_20260922 — the selected word. Reads as the hover outline the reader already
   knows, but it stays put when the pointer leaves. Outline rather than border, so
   nothing on the line shifts when it appears. */
body.lk-reader .textitem.lx-word-selected {
  outline: 2px solid var(--btn-ink, #0F172A) !important;
  outline-offset: 1px;
  border-radius: 2px;
}


/* ==================================================================
 * FINISHUI_20260923 — end-of-text window
 * Shown when the reader reaches the end of a text, from the forward
 * button or the arrow key. Tokens only (see lexgo_design_tokens.css).
 * ================================================================== */
.lx-finish-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  transition: opacity 180ms ease;
}
.lx-finish-backdrop.is-in { opacity: 1; }

.lx-finish {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-6) var(--space-6) var(--space-5);
  text-align: center;
  position: relative;
  transform: translateY(8px) scale(0.98);
  transition: transform 180ms ease;
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
}
.lx-finish-backdrop.is-in .lx-finish { transform: none; }

.lx-finish-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: var(--space-8);
  height: var(--space-8);
  border: 0;
  background: transparent;
  color: var(--text-subtle);
  font-size: var(--text-lg);
  line-height: 1;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.lx-finish-close:hover { background: var(--color-gray-100); color: var(--text-body); }

.lx-finish-mark {
  line-height: 0;
  margin-bottom: var(--space-3);
  color: var(--color-brand-400);   /* FINISHPOLISH_20260923 — inline SVG, not an emoji */
}
.lx-finish:focus { outline: none; }
.lx-finish:focus-visible { box-shadow: var(--shadow-xl), var(--shadow-focus); }

.lx-finish-title {
  margin: 0 0 var(--space-1);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-strong);
}
.lx-finish-sub {
  margin: 0 0 var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.lx-finish-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  background: var(--color-gray-50);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}
.lx-finish-stat { min-width: 0; }
.lx-finish-stat b {
  display: block;
  font-size: var(--text-md);
  color: var(--color-brand-500);
  line-height: 1.2;
}
.lx-finish-stat span {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.25;
}

.lx-finish-next-label {
  display: block;
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  margin-bottom: var(--space-2);
}
.lx-finish-next-card {
  display: block;
  text-align: left;
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  transition: border-color 140ms ease, background 140ms ease;
}
.lx-finish-next-card:hover {
  border-color: var(--color-brand-300);
  background: var(--color-accent-soft);
}
.lx-finish-next-title {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}
.lx-finish-next-meta {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.lx-finish-actions { display: flex; gap: var(--space-2); }
.lx-finish-actions > * { flex: 1; }
.lx-finish-btn {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--btn-radius);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.lx-finish-btn-primary {
  background: var(--color-accent);
  color: var(--text-on-accent);
}
@media (hover: hover) and (pointer: fine) {
  .lx-finish-btn-primary:hover { background: var(--color-accent-hover); }
}
.lx-finish-btn-ghost {
  background: var(--color-white);
  border-color: var(--color-gray-200);
  color: var(--text-body);
}
@media (hover: hover) and (pointer: fine) {
  .lx-finish-btn-ghost:hover { background: var(--color-gray-50); }
}

/* Phone width: the four figures wrap to two rows rather than shrinking to nothing. */
@media (max-width: 420px) {
  .lx-finish-stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .lx-finish-actions { flex-direction: column; }
}


/* TAPSIZE_20260924 — the page arrows are 24px wide against a 64px height. Widen the hit area
   only; the arrow keeps its size and position. */
@media (pointer: coarse) {
  body.lk-reader .lk-side-nav::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: var(--touch-target-large);
    height: 100%;
  }
}

/* IOSAUDIO_20260924 — see lexgo_reader.js. */
#lx-audio-hint {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(8px);
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: var(--radius-full, 999px);
  background: var(--color-ink, #0F172A);
  color: var(--color-white, #FFF);
  font: var(--weight-medium, 500) 14px/1.35 var(--font-ui, system-ui);
  text-align: center;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(15,23,42,.24));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 200;
}
#lx-audio-hint.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }


/* === MARKPAGE_20261014 — a pergunta de marcar a pagina ===========================
   Herda .lx-finish-backdrop e .lx-finish (a janela de fim de texto), portanto o fundo, o
   raio, a sombra e a animacao sao os mesmos. So acrescenta o que e proprio: o texto
   alinhado a esquerda, porque e uma pergunta e nao uma celebracao, e a linha de botoes. */
.lx-markpage { text-align: left; }
.lx-markpage-t {
  margin: 0 0 var(--space-2);
  font: 700 18px/1.3 var(--font-ui, Inter, sans-serif);
  color: var(--text-strong, #0F172A);
}
.lx-markpage-b {
  margin: 0 0 var(--space-2);
  font: 400 15px/1.5 var(--font-ui, Inter, sans-serif);
  color: var(--text-body, #334155);
}
.lx-markpage-h {
  margin: 0 0 var(--space-5);
  font: 400 13px/1.4 var(--font-ui, Inter, sans-serif);
  color: var(--text-muted, #6B7280);
}
.lx-markpage-btns {
  display: flex;
  gap: var(--space-3, 12px);
  justify-content: flex-end;
}
.lx-markpage-btns .btn-secondary-link,
.lx-markpage-btns .btn-primary-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; cursor: pointer; white-space: nowrap;
}
@media (max-width: 420px) {
  /* no telemovel cada botao fica com metade da linha, com a mesma area de toque */
  .lx-markpage-btns { gap: 10px; }
  .lx-markpage-btns .btn-secondary-link,
  .lx-markpage-btns .btn-primary-link { flex: 1 1 0; }
}


/* === ALIGNTOP_20261014 — o cartao encosta ao topo da area de leitura ======================
   A sua altura e calculada desde esse topo ate ao fundo seguro (FITANCHOR_20261014), portanto
   centra-lo verticalmente dentro da mesma area so o empurra para baixo e deixa a faixa branca
   que o Patrick fotografou. A centragem HORIZONTAL (justify-content, de
   CENTER_TEXT_AND_VISIBLE_NAV_20260629) fica exactamente como estava. */
body.lk-reader #read_pane_left,
body.lk-reader.right-panel-closed #read_pane_left,
/* ALIGNTOP2_20261015 — o estado ABERTO tambem. Faltava, e uma regra :not(.right-panel-closed)
   com mais especificidade voltava a centrar: ao abrir o painel o cartao subia 18px entre o
   touchend e o click, e o toque acabava noutra palavra. */
body.lk-reader:not(.right-panel-closed) #read_pane_left,
body.lk-reader.word-selected #read_pane_left {
  align-items: flex-start !important;
}


/* === ICONCLEAR_20261014 — folga por baixo dos icones flutuantes ===========================
   Os icones (Aa, ..., painel) sao position:fixed por cima do topo do cartao. Com o cartao
   encostado ao topo sobravam 2px entre eles e a primeira linha -- o suficiente para hoje e para
   mais nada. Reservam-se 52px, que e a altura deles (36) mais ar dos dois lados. */
body.lk-reader #thetext {
  padding-top: 52px !important;
}


/* === CARDS_20261015 — margens do cartao ================================================
   O Patrick: "cada cartao tem margens e parte do texto fica centralizada dentro da margem".
   O cartao e sempre o mesmo rectangulo; o que muda e qual pedaco do texto esta la dentro. */
body.lk-reader #thetext {
  padding-left: 22px !important;
  padding-right: 22px !important;
}
/* o espacador do modelo antigo nao se usa mais; se algum ficar de uma sessao velha, nao abre
   buracos no meio do texto */
body.lk-reader .lx-fit-spacer { display: none !important; }


/* === SELBOX_20261015 — o rectangulo da seleccao ========================================
   Uma caixa por linha. Nao apanha o toque (pointer-events: none): quem decide se o toque caiu
   dentro e o codigo, pelas coordenadas, para que a caixa nunca tape a palavra por baixo. */
.lx-selbox { position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 40; }
.lx-selbox__r {
  position: absolute;
  border: 2px solid var(--color-brand-500, #4F46E5);
  border-radius: 6px;
  background: rgba(0, 97, 123, 0.06);
  pointer-events: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
}


/* === PROGLINE_20261015 — a linha de progresso do audio ===================================
   Fica ACIMA da barra de baixo e nao lhe tira espaco nenhum. A faixa desenha 6px mas o alvo de
   toque tem 28px: um alvo de 6px nao se acerta com um dedo. */
.lx-progline {
  /* PROGLINE2_20261015 — fixa, mesmo plano da barra de baixo (que e fixed; bottom:0). O
     `bottom`, o `left` e a largura sao escritos pelo JS a partir da barra real. z-index abaixo
     do 45 da barra: a linha acompanha-a, nunca lhe passa por cima. */
  position: fixed; z-index: 44;
  /* PROGLINE6_20261015 — centrado e curto. Era de margem a margem e lia-se como uma segunda
     barra; agora os tres (recomecar, calha, relogio) andam juntos no meio do ecra. */
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 14px 2px;
  background: var(--lk-bg, var(--surface-card, #fff));
}
.lx-progline__restart {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: none; border-radius: 50%; background: transparent; cursor: pointer;
  color: var(--color-brand-500, #4F46E5);
}
.lx-progline__restart:active { background: rgba(0, 97, 123, 0.10); }
/* LOOP_20261016 — o botao de repetir. Mesmo tamanho e mesmo alvo do recomecar: 32px, que
   e o que o dedo precisa. Apagado quando desligado, cor de marca e fundo quando ligado --
   um botao que nao diz se esta ligado obriga a pessoa a experimentar para saber. */
.lx-progline__loop {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: none; border-radius: 50%; background: transparent; cursor: pointer;
  color: var(--text-muted, #6B7280);
}
.lx-progline__loop:active { background: rgba(0, 97, 123, 0.10); }
.lx-progline__loop.is-on {
  color: var(--color-brand-500, #4F46E5);
  background: rgba(0, 97, 123, 0.12);
}
.lx-progline__track {
  /* PROGLINE6_20261015 — curta e com largura propria, em vez de esticar ate as margens.
     A ALTURA tocavel fica nos 28px: encolher o alvo para parecer mais arrumado era repetir
     de proposito o erro do controlo que so respondia ao rato. */
  flex: 0 1 170px; max-width: 170px;
  position: relative; height: 28px; cursor: pointer;
  display: flex; align-items: center;
}
/* a calha desenhada: 6px no meio dos 28px de alvo */
.lx-progline__track::before {
  content: ''; position: absolute; left: 0; right: 0; height: 6px;
  border-radius: 999px; background: var(--surface-sunken, #E5E7EB);
}
.lx-progline__fill {
  position: relative; height: 6px; width: 0;
  border-radius: 999px; background: var(--color-brand-500, #4F46E5);
}
/* === CIRCULO_20261025 — o circulo que se agarra ===========================================
   O preenchimento dizia a posicao por uma ARESTA, que numa calha de 6px nao se le de relance.
   Um ponto le-se. E e o que da a entender que isto se arrasta: uma calha lisa nao convida
   ninguem a tentar. */
.lx-progline__thumb {
  position: absolute; top: 50%; left: 0;
  width: 14px; height: 14px; margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--color-brand-500, #4F46E5);
  box-shadow: 0 0 0 2px var(--color-white, #fff);
  pointer-events: none;          /* quem recebe o toque e a faixa inteira, de 28px */
  transition: transform 90ms ease;
}
.lx-progline__track.is-grabbing .lx-progline__thumb {
  transform: translate(-50%, -50%) scale(1.35);
}
/* o arrasto nao pode ser confundido com rolar a pagina. So na faixa: o deslizar que vira a
   pagina vive no texto e nao se mexe aqui. */
.lx-progline__track { touch-action: none; }
.lx-progline__t {
  /* PROGLINE6_20261015 — o relogio anda no grupo, nao colado a margem direita */
  flex: none; min-width: 34px; text-align: left;
  font: 600 12px/1 "Inter", system-ui, sans-serif;
  color: var(--text-muted, #6B7280); font-variant-numeric: tabular-nums;
}


/* === VIDEOBAR_20261015 — a barra do video cabe no ecra =====================================
   Estava presa so a esquerda (left: 20px) sem `right` nem largura maxima: a largura era a soma
   dos dez controlos (~420px) e num telemovel o ultimo -- o fechar -- ficava de fora. */
@media (max-width: 560px) {
  body.lk-reader .lx-audio-widget {
    /* Havia ja uma regra a centrar com left:50% + translateX(-50%) (linha ~2590). Prender a
       esquerda e a direita SEM desligar o transform empurrava a barra meia largura para fora
       pela esquerda: media 374px e comecava em -179. */
    left: 8px !important;
    right: 8px !important;
    transform: none !important;
    max-width: calc(100vw - 16px);
    display: flex !important;
    justify-content: center;
    gap: 3px !important;
    padding: 8px 8px !important;
  }
  /* os botoes NAO encolhem: um alvo mais pequeno deixa de se acertar com o dedo */
  body.lk-reader .lx-audio-widget .lxaw-btn { width: 28px !important; height: 28px !important; flex: none; }
  body.lk-reader .lx-audio-widget .lxaw-speed { width: auto !important; padding: 0 4px; }
  body.lk-reader .lx-audio-widget .lxaw-time { font-size: 10px; min-width: 28px; flex: none; }
  /* so o progresso encolhe, que e o unico que pode perder largura sem perder funcao */
  body.lk-reader .lx-audio-widget .lxaw-prog { flex: 1 1 auto !important; min-width: 28px !important; }
  /* o fechar e o ultimo da fila: e o que caia para fora. Nunca encolhe nem e empurrado. */
  body.lk-reader .lx-audio-widget .lxaw-close { flex: none; margin-left: 2px; }
}


/* === DRAGSELECT_20261015 — segurar e arrastar para seleccionar ==============================
   Sem -webkit-touch-callout o iOS abre a lupa e o menu "Copiar" ao fim de meio segundo, por
   cima da seleccao que estamos a fazer. */
#thetext .textitem {
  -webkit-touch-callout: none;
}
/* enquanto se selecciona, o texto nao desliza: o gesto e todo da seleccao */
body.lx-a-seleccionar #thetext {
  touch-action: none;
}


/* === ARROWTARGET_20261015 — alvo das setas de pagina no telemovel ============================
   Media 22px de largura encostada a margem (x=369 em 390), que e onde o iOS tem o gesto de
   voltar atras do sistema: com o polegar ou se falha, ou se faz voltar o browser. A pergunta
   sobre as palavras azuis nunca aparecia porque a pagina nunca virava.
   Cresce a AREA tocavel; o simbolo fica do mesmo tamanho. */
@media (max-width: 560px) {
  body.lk-reader .lk-side-nav {
    /* ARROWSHAPE_20261015 — QUADRADO, senao o arredondamento da um ovo esticado: 48x72 com cantos
       redondos foi o que o Patrick viu como "deformado". 52x52 continua bem acima dos 44px que
       um dedo precisa. */
    /* SWIPEPAGE_20261015 — 44px de alvo (a regra do polegar) sem nada desenhado por tras. */
    width: 44px !important;
    height: 44px !important;
    /* afastada da margem: encostada ao limite disputa com o gesto do sistema */
    display: flex !important;
    align-items: center;
    justify-content: center;
    /* ARROWSHAPE_20261015 — sem fundo nem sombra, uma seta cinzenta clara sobre papel branco nao
       se distingue de nada. Mesmo tratamento dos outros botoes redondos da aplicacao. */
    /* SWIPEPAGE_20261015 — so o simbolo. O disco branco de 52px tapava o texto (na captura
       escondia "bezuinigingen"); um botao de navegacao nao pode esconder o que se esta a ler.
       Agora deslizar e o gesto principal e a seta e so a dica de que da para avancar.
       A sombra fica, porque e o que separa o simbolo do texto por baixo. */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--color-brand-500, #4F46E5) !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95), 0 0 6px rgba(255, 255, 255, 0.9) !important;
    font-size: 30px !important;
  }
  body.lk-reader .lk-side-nav-right { right: 4px !important; }
  body.lk-reader .lk-side-nav-left { left: 4px !important; }
  /* ARROWSHAPE_20261015 — com fundo e sombra proprios, a seta ja se ve sem ter de ser opaca a
     meio: 0.95 para nao competir com o texto, mas tambem para nao desaparecer nele. */
  body.lk-reader .lk-side-nav { opacity: 0.95 !important; }
}

/* SENTNOLINE_20261018 — no modo Frase o sublinhado de sincronia nao distingue nada.
   A linha existe para dizer QUAL das frases do ecra esta a ser falada. No modo Frase ha uma
   so frase no ecra, e sublinha-la risca o texto todo sem informar ninguem — foi o que o
   Patrick viu: tres linhas de texto todas traçadas. No leitor normal fica como esta. */
body.lx-sentence-mode #thetext .textsentence.lk-current-sentence,
body.lx-sentence-mode #thetext .textsentence.lk-current-sentence > .textitem {
  text-decoration-line: none !important;
}
/* SENTNOLINE2_20261018 - a primeira versao desta regra apontava so aos .textitem, os FILHOS,
   e o traco esta na propria .textsentence. Medi-a forcando as duas classes a mao, o que
   provou a regra e nao o ecra: em modo frase a verdadeira continuava la. O Patrick voltou a
   perguntar, com a captura. A frase tem font-size:0% e os filhos tamanho normal, por isso o
   sublinhado DELA sai partido palavra a palavra -- que e exactamente o que se via. */

/* ====================================================================
   SETASMARGEM_20261019 — as setas vivem na MARGEM, nunca por cima do texto.

   Medido no iPhone: coluna de texto 38 a 352 numa janela de 390; as setas ocupavam 10-54 e
   336-380, ou seja 16px dentro do texto de cada lado.

   A margem livre e 38px e o circulo tinha 44. Como nao cabem os dois, cede a LARGURA do alvo
   e compensa-se na altura: 34x56 tem mais area do que 44x44 e nao toca no texto. No
   computador nao se mexe -- la a margem tem 60px.

   Tem de levar !important porque a regra que poe os circulos a 44px tambem leva, em todas as
   propriedades.
   ==================================================================== */
@media (max-width: 768px) {
  /* SETAALVO_20261019 - 34x56 = 1904px^2, 32 abaixo da area de um alvo de 44x44.
     A largura esta presa pela margem de 38px; a altura nao esta presa por nada.
     34x58 = 1972, acima do minimo, e continua sem tocar no texto. */
  body.lk-reader .lk-side-nav {
    width: 34px !important;
    height: 58px !important;
    border-radius: 17px !important;
    font-size: 17px !important;
  }
  /* SETASMARGEM2_20261019 - NOVE regras disputam o left desta seta, seis com !important. A de
     ARROWS_SPEED_20260916 usa duas classes (.lk-side-nav.lk-side-nav-left) e ganhava a
     esta quando ela so usava uma: media 10px onde eu pedia 2, e a seta continuava 6px dentro
     do texto. Iguala-se a especificidade, e como esta regra vem depois, ganha.
     Quem acrescentar aqui outra regra: use as duas classes, ou nao tera efeito nenhum. */
  body.lk-reader .lk-side-nav.lk-side-nav-left { left: 2px !important; }
  body.lk-reader .lk-side-nav.lk-side-nav-right,
  body.lk-reader.right-panel-closed .lk-side-nav.lk-side-nav-right,
  body.lk-reader:not(.right-panel-closed) .lk-side-nav.lk-side-nav-right {
    right: 2px !important;
  }
  /* a area de toque invisivel esticava para os lados e entrava no texto: um toque na
     primeira palavra da linha caia na seta. Aqui o botao ja e o alvo. */
  body.lk-reader .lk-side-nav::after {
    width: 100% !important;
  }
}

/* ====================================================================
   SETATOQUE_20261019 — a seta acende enquanto se toca, e apaga a seguir.

   O estilo de realce estava em `:hover`. Num rato isso acaba quando o ponteiro sai; num
   telemovel nao ha ponteiro, e o iOS deixa o ultimo elemento tocado em `:hover` ate alguem
   tocar noutro sitio. Resultado: a seta ficava com a caixa branca presa depois de virar a
   pagina. O `:focus` fazia o mesmo por outro caminho.

   Onde nao ha ponteiro, so pintam `:active` (o dedo em baixo) e a classe curta que o
   JavaScript poe durante a mudanca de pagina. No computador nao se mexe.
   ==================================================================== */
@media (hover: none) {
  /* SETATOQUE2_20261019 - o repouso MEDIDO no telemovel e transparente e sem sombra, nao a
     pastilha de 92%. A primeira versao desta regra repunha a pastilha, e a seta ficava
     ligeiramente diferente depois do toque -- menos errado do que antes e na mesma visivel.
     Aqui repoe-se o que a seta e mesmo quando ninguem lhe tocou. */
  body.lk-reader .lk-side-nav:hover,
  body.lk-reader .lk-side-nav:focus,
  body.lk-reader .lk-side-nav:focus-visible {
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
  }
  body.lk-reader .lk-side-nav:active,
  body.lk-reader .lk-side-nav.lx-seta-activa {
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-50%) scale(1.06) !important;
  }
}
/* a transicao e a propria "demonstracao": acende depressa e apaga devagar, para o olho
   apanhar o aviso mesmo quando a pagina muda logo a seguir */
body.lk-reader .lk-side-nav {
  transition: background 90ms ease, box-shadow 90ms ease, transform 90ms ease !important;
}
body.lk-reader .lk-side-nav:not(.lx-seta-activa):not(:active) {
  transition: background 260ms ease, box-shadow 260ms ease, transform 260ms ease !important;
}


/* ====================================================================
   GUIA_20261019 — a linha fina que segue o audio, palavra a palavra.

   O Patrick: "a linha seleciona uma boa parte do texto... a leitura se perde. O referencia tem uma
   pequena linha de pontas suaves que se move junto com o audio."

   Um unico elemento, 3px, cantos redondos, que desliza para debaixo da palavra que soa. A cor
   e a espessura vem do sublinhado que ja existia (SYNCLINE_20261015): --color-brand-500 a 3px,
   escolhidos por serem visiveis contra o azul das palavras novas E contra o amarelo.

   Nao entra no layout (position absolute dentro de #thetext, que ja e position:relative) e nao
   recebe toques: o cartao do leitor esta TRANCADO.
   ==================================================================== */
body.lk-reader #lxGuia {
  position: absolute !important;
  /* GUIA5_20261019 - 4px porque a faixa agora cobre tres palavras: a 3px o afilamento
     das pontas nao se via. */
  /* GUIASUAVE_20261025 — ver tools/patch_guia2_20261025.py. A referencia que ele mandou
     (video na referencia) e um FIO cinzento translucido com as pontas a apagar-se. */
  height: 2px !important;
  min-width: 10px;
  border-radius: 999px !important;
  /* A elipse dava pontas finas, mas as pontas EXISTIAM -- uma aresta. "Suave" faz-se com uma
     mascara em gradiente: a cor desvanece em vez de acabar. */
  clip-path: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%,
                                      #000 86%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 14%,
                              #000 86%, transparent 100%);
  /* cinzento e nao a cor da marca: um guia fica POR BAIXO do texto, nao a competir com ele */
  background: var(--color-ink, #1a1a2e) !important;
  opacity: 0;
  pointer-events: none !important;
  z-index: 2;
  /* GUIASUAVE_20261025 — "a linha tem certa transparencia". O JS poe opacity 0 ou 1; a
     transparencia que ele pede vive aqui, no canal alfa da propria cor, para o 1 continuar a
     querer dizer "visivel" sem o JS saber de nada disto. */
  filter: opacity(0.45);
  /* o deslizar e o que guia o olho; sem ele isto seria um sublinhado que salta */
  /* GUIACOMPRIMENTO_20261025 — a largura deixa de ser animada porque deixa de mudar; quando
     muda (fim de linha) e melhor que mude de uma vez do que que se veja a esticar. */
  transition: left 140ms linear, top 140ms linear, opacity 160ms ease;
  will-change: left, top, width;
}

/* Enquanto a guia anda, o sublinhado da FRASE INTEIRA sai. Era ele o problema reportado:
   marcava um bloco de tres linhas e nao uma posicao. Em modo frase e sem audio continua a
   valer, porque ai nao ha guia nenhuma a dizer onde se vai. */
body.lk-reader.lx-guia-activa #thetext .textsentence.lk-current-sentence,
body.lk-reader.lx-guia-activa .lk-current-sentence {
  text-decoration-line: none !important;
}
/* GUIA4_20261019 - e nos FILHOS, que e onde a linha e mesmo desenhada: a caixa da frase tem
   altura zero, por isso a regra de cima sozinha nao apagava nada. A fotografia mostrou as duas
   linhas ao mesmo tempo -- a guia curta e o sublinhado comprido da frase. */
body.lk-reader.lx-guia-activa #thetext .textsentence.lk-current-sentence > .textitem {
  text-decoration-line: none !important;
}

/* GUIACONTINUA_20261030 - com tempos por palavra o JS desenha a cada fotograma; uma
   transicao de 140ms por cima so atrasaria a linha em relacao ao audio. */
body.lk-reader #lxGuia.lx-guia-continua { transition: opacity 160ms ease; }

@media (prefers-reduced-motion: reduce) {
  body.lk-reader #lxGuia { transition: opacity 160ms ease !important; }
}


/* === PAINELLISTA_20261024 — a lista de palavras do painel ============================
 *
 * Um painel aberto e vazio ficava POR CIMA do texto a apanhar os toques (medido a 390px:
 * z-index 60, o iframe a receber o toque no meio do texto). Duas coisas aqui:
 *   1. enquanto estiver vazio, o painel inteiro deixa passar os toques;
 *   2. deixa de poder estar vazio: mostra as palavras desta pagina.
 */
body.lk-reader #read_pane_right.lx-pane-vazio {
  pointer-events: none;
}
body.lk-reader #read_pane_right.lx-pane-vazio #lxPanelLista {
  pointer-events: auto;      /* a lista em si continua a aceitar toques */
}

#lxPanelLista {
  padding: var(--space-3, 12px) var(--space-4, 16px) var(--space-6, 24px);
  overflow-y: auto;
  max-height: 100%;
  font-family: var(--font-ui);
  background: var(--color-white, #fff);
}
#lxPanelLista[hidden] { display: none; }

.lxpl-cab {
  font-size: var(--text-base, 14px);
  font-weight: 700;
  color: var(--text-body, #1a1a2e);
  padding: var(--space-2, 8px) 0 var(--space-3, 12px);
}
.lxpl-cab .lxpl-n {
  color: var(--text-muted, #6b7280);
  font-weight: 400;
  margin-left: var(--space-1, 4px);
}
.lxpl-vazio {
  color: var(--text-muted, #6b7280);
  font-size: var(--text-base, 14px);
  line-height: 1.5;
  margin: 0;
}

.lxpl-lista { list-style: none; margin: 0; padding: 0; }
.lxpl-lista li { margin: 0; }

.lxpl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
  width: 100%;
  min-height: 44px;                       /* alvo de telemovel */
  padding: var(--space-2, 8px) var(--space-2, 8px);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-hairline, #eef0f2);
  border-radius: var(--radius-lg, 10px);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lxpl-item:active { background: var(--color-gray-50, #f7f8f9); }

.lxpl-p {
  font-size: var(--text-md, 16px);
  color: var(--text-body, #1a1a2e);
  overflow-wrap: anywhere;
}

/* as pastilhas repetem as cores com que a palavra aparece no texto */
.lxpl-e {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: var(--radius-full, 999px);
  color: #1a1a2e;
  white-space: nowrap;
}
.lxpl-e0 { background: #C6DFFF; }
.lxpl-e1 { background: var(--status-1-bar, #FBBF24); }
.lxpl-e2 { background: var(--status-2-bar, #FCD34D); }
.lxpl-e3 { background: var(--status-3-bar, #FDE68A); }
.lxpl-e4 {
  background: transparent;
  border: 1px dashed #9CA3AF;
  color: var(--text-muted, #6b7280);
  padding: 4px 7px;
}


/* === PAINELSAIDA_20261024 — uma saida visivel do painel no telemovel ==================
 *
 * A regra la em cima esconde o botao de fechar do painel em todos os ecras. Num ecra largo
 * nao faz falta -- o painel esta AO LADO do texto. Num telemovel o painel esta POR CIMA do
 * texto todo (medido: x=8, largura 374, num ecra de 390), e sem botao fica um beco sem
 * saida: nao se pode tocar no texto e nao se ve como voltar.
 *
 * Mesmo criterio de "telemovel" que a folha ja usa noutro sitio: ponteiro grosso ate 820px.
 */
@media (pointer: coarse) and (max-width: 820px) {
  body.lk-reader #read_pane_right:not(.lx-pane-vazio) .read-pane-right-close-btn {
    display: flex !important;
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 44px;                 /* alvo de dedo, nao de rato */
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full, 999px);
    background: var(--color-gray-100, #eef0f2);
    color: var(--text-body, #1a1a2e);
    font: 400 22px/1 var(--font-ui);
    cursor: pointer;
  }
  body.lk-reader #read_pane_right:not(.lx-pane-vazio) .read-pane-right-close-btn::before {
    content: "\00D7";           /* o botao nasce vazio na marcacao do Lute */
  }
  body.lk-reader #read_pane_right:not(.lx-pane-vazio) .read-pane-right-close-btn:active {
    background: var(--color-gray-200, #e3e6e8);
  }
  /* BOARDALTO_20261025 — ERA `padding-top: 44px` aqui, e foi um erro meu: o painel ja so
     tinha 202px uteis para 436px de formulario, e a faixa tirou-lhe mais 44 e deixou um
     vazio no topo (fotografia do Patrick, 25/10 09:16, "Erro"). Um botao de 44px no canto
     nao precisa de uma faixa para si: precisa de um fundo que o torne legivel. */
  body.lk-reader #read_pane_right:not(.lx-pane-vazio) .read-pane-right-close-btn {
    box-shadow: 0 0 0 4px var(--color-white, #fff);
  }
}


/* === PAINELFOLHA_20261024 — a lista e uma folha em baixo, nao um painel fora do ecra ====
 *
 * Medido antes: com o painel aberto pelo botao, `#read_pane_right` ficava em x=382 num ecra
 * de 390 (invisivel) e `#read_pane_left` passava a x=40 w=390 (40px de texto fora do ecra).
 * O posicionamento so acontece quando Lute abre o formulario de uma palavra (`.open-dict`),
 * e o botao de cima nao passa por ai.
 */
@media (pointer: coarse) and (max-width: 820px) {
  body.lk-reader #read_pane_right.lx-pane-vazio {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    /* PAINEL2_20261025 — 78svh: a area de leitura toda (relato #528). */
    /* BOARDTOPO_20261025 - do fundo da fila do "Aa / ..." ate ao fundo do ecra.
        e medido em JS; os 78svh ficam como recurso para o instante antes da
       primeira medicao, e como piso para o board nunca ser baixo demais. */
    top: var(--lx-board-top, 22svh) !important;
    height: auto !important;
    max-height: none !important;
    min-height: 78svh;
    transform: none !important;
    border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
    background: var(--color-white, #fff);
    opacity: 1 !important;
    overflow: hidden;
    /* a folha ESTA no ecra, portanto aceita os toques dela: o remendo de lhos tirar era para
       quando estava por cima do texto, e ja nao esta. */
    pointer-events: auto;
    display: flex !important;
    flex-direction: column;
  }
  /* PAINELFOLHA2_20261024 — esconde-se o IFRAME, e nao o contentor: a lista vive dentro
     dele, e escondendo o contentor a lista ficava com 94 itens e 0x0 pixeis. */
  body.lk-reader #read_pane_right.lx-pane-vazio .wordframecontainer {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
  }
  body.lk-reader #read_pane_right.lx-pane-vazio #wordframeid {
    display: none !important;
  }
  /* PAINEL2_20261025 — a lista saiu; a mensagem volta a ser o conteudo do painel vazio. */
  body.lk-reader #read_pane_right.lx-pane-vazio .lk-rp-empty {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3, 12px);
    padding: var(--space-6, 24px);
    text-align: center;
  }
  body.lk-reader #read_pane_right.lx-pane-vazio .dictcontainer {
    display: none !important;
  }
  body.lk-reader #read_pane_right.lx-pane-vazio #lxPanelLista {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* a pega, para se perceber que se arrasta/fecha */
  body.lk-reader #read_pane_right.lx-pane-vazio::before {
    content: "";
    flex: 0 0 auto;
    width: 40px;
    height: 4px;
    margin: 8px auto 2px;
    border-radius: var(--radius-full, 999px);
    background: var(--color-gray-200, #e3e6e8);
  }
  body.lk-reader #read_pane_right.lx-pane-vazio .read-pane-right-close-btn {
    display: flex !important;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full, 999px);
    background: var(--color-gray-100, #eef0f2);
    color: var(--text-body, #1a1a2e);
    font: 400 22px/1 var(--font-ui);
  }
  body.lk-reader #read_pane_right.lx-pane-vazio .read-pane-right-close-btn::before {
    content: "\00D7";
  }
  /* e o cartao deixa de ser empurrado para fora do ecra por um painel que ja nao esta la */
  body.lk-reader:not(.right-panel-closed) #read_pane_left:has(~ #read_pane_right.lx-pane-vazio) {
    width: auto !important;
  }
}


/* === BOARDALTO_20261025 — o painel da palavra cabe no telemovel =====================
 *
 * "Fazer o board cobrindo mais campo abaixo." (Patrick, 25/10 08:42)
 *
 * Medido: o painel dava 292px de altura num ecra de 664, e o formulario da palavra precisa de
 * 436px. Nao era apertado -- era menos de metade do necessario, e por isso ficava sempre
 * cortado independentemente do que se mexesse por dentro.
 *
 * Mesmo desenho da folha da lista (PAINELFOLHA_20261024): os dois estados do painel sao a
 * mesma coisa vista em dois momentos, e pareciam dois componentes diferentes.
 */
@media (pointer: coarse) and (max-width: 820px) {
  body.lk-reader #read_pane_right.open-dict:not(.lx-pane-vazio) {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    /* PAINEL2_20261025 — 78svh: "cobrir toda a area de leitura" (relato #528). */
    /* BOARDTOPO_20261025 - do fundo da fila do "Aa / ..." ate ao fundo do ecra.
        e medido em JS; os 78svh ficam como recurso para o instante antes da
       primeira medicao, e como piso para o board nunca ser baixo demais. */
    top: var(--lx-board-top, 22svh) !important;
    height: auto !important;
    max-height: none !important;
    min-height: 78svh;
    transform: none !important;
    padding-top: 0 !important;
    border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
    background: var(--color-white, #fff);
    opacity: 1 !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
  }
  body.lk-reader #read_pane_right.open-dict:not(.lx-pane-vazio) .wordframecontainer {
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 0 !important;
  }
  body.lk-reader #read_pane_right.open-dict:not(.lx-pane-vazio) #wordframeid {
    width: 100% !important;
    height: 100% !important;
  }
  /* a pega, igual a da folha da lista */
  body.lk-reader #read_pane_right.open-dict:not(.lx-pane-vazio)::before {
    content: "";
    flex: 0 0 auto;
    width: 40px;
    height: 4px;
    margin: 8px auto 4px;
    border-radius: var(--radius-full, 999px);
    background: var(--color-gray-200, #e3e6e8);
  }
}


/* === TRANSICAO_20261025 — a janela entre inserir o texto novo e saber onde o cortar ====
 *
 * `visibility` e nao `display`: o calculo dos cartoes mede alturas, e um elemento com
 * display:none nao tem altura nenhuma. Invisivel continua a ser medivel.
 */
body.lk-reader #thetext.lx-a-calcular {
  visibility: hidden;
}


/* === PAINEL2_20261025 — nada de palavra antiga enquanto a nova carrega ============ */
body.lk-reader #read_pane_right.lx-pane-carregando #wordframeid {
  visibility: hidden;
}
body.lk-reader #read_pane_right.lx-pane-carregando .lk-rp-empty {
  display: none !important;
}


/* === BARRALIMPA_20261025 — a barra de baixo com os rotulos todos iguais ==============
 *
 * Fotografia do Patrick (25/10 10:05): "Listen" ao lado do altifalante numa pastilha, o
 * numero 20372 colado ao "Review", e "Review" maior do que "Sentence". Seis regras
 * diferentes definiam `.toolbar-label` em sitios diferentes desta folha -- esta vem depois
 * de todas e passa a ser a unica que decide.
 */
body.lk-reader .lk-bottom-toolbar .toolbar-label {
  display: block;
  font: 500 11px/1.2 var(--font-ui) !important;
  letter-spacing: .01em;
  color: var(--text-body, #1a1a2e);
  margin-top: 2px;
  text-align: center;
}

/* o rotulo do botao de ouvir sai: era o unico AO LADO do icone */
body.lk-reader .lk-bottom-toolbar .lx-tts-btn .toolbar-label,
body.lk-reader .lk-bottom-toolbar #lk-listen-btn .toolbar-label {
  display: none !important;
}
/* e sem rotulo a pastilha cinzenta a volta deixa de fazer sentido */
body.lk-reader .lk-bottom-toolbar .lx-tts-btn,
body.lk-reader .lk-bottom-toolbar #lk-listen-btn {
  background: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* BARRALIMPA2_20261025 - o rotulo de "Review" ficava a 13px porque ha uma regra mais
   especifica () com !important. Um
   !important nao ganha a outro !important mais especifico: e preciso igualar a especificidade,
   e nao basta vir depois no ficheiro. Medido: 13px contra os 11px dos outros. */
body.lk-reader .lk-bottom-toolbar .toolbar-btn-fc .toolbar-label,
body.lk-reader .lk-bottom-toolbar .toolbar-btn-stack .toolbar-label {
  font-size: 11px !important;
  font-weight: 500 !important;
}

/* o numero do botao de rever nao se mostra */
body.lk-reader .lk-bottom-toolbar .toolbar-fc-count { display: none !important; }


/* === SEMBOTAOPAINEL_20261025 — o botao de abrir o painel sai do telemovel ================
 *
 * Com a lista removida (PAINEL2_20261025), abrir o painel a mao so mostra "toque numa
 * palavra" -- abre-se um painel para ser mandado fazer outra coisa. O board abre quando ha
 * o que mostrar e fecha-se pelo X ou tocando fora.
 *
 * Num ecra largo o painel fica AO LADO do texto: la o botao continua a servir.
 */
@media (pointer: coarse) and (max-width: 820px) {
  /* SEMBOTAOPAINEL2_20261025 - com o TIPO no selector.
     Havia  com
     , cuja lista apanha este botao: tres classes E dois
     tipos, mais especifico do que as minhas tres classes e um tipo. Um !important nao ganha
     a outro !important mais especifico, e vir depois no ficheiro so decide entre iguais.
     Medido: a regra existia, a media query batia, e o display continuava . */
  body.lk-reader .lk-top-icons button.lk-panel-toggle {
    display: none !important;
  }
}


/* === BOARDTOPO_20261025 - animacao de carregamento no board ========================
 *
 * "Se necessario tempo de carregamento, considerar animacao de carregamento entao usuario
 * sabera o que acontece" (Patrick, 25/10). Sem isto o intervalo le-se como avaria.
 */
body.lk-reader #read_pane_right.lx-pane-carregando::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  /* LOADING2_20261025 - Patrick, 25/10 10:50: "Considere animacao melhor. Barra
     preenchendo, ou linha movendo em circulo como video carregando."
     Era um anel com um quarto colorido: le-se como quatro tracos a saltar. Agora e um ARCO
     com cauda esbatida (conic-gradient recortado por uma mascara em anel), que e o que ele
     descreve -- a linha a correr a volta, sem principio nem fim visiveis. */
  background: conic-gradient(from 0turn,
                             rgba(0, 97, 123, 0) 0%,
                             rgba(0, 97, 123, .15) 35%,
                             var(--color-brand-500, #4F46E5) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  border-radius: var(--radius-full, 999px);
  animation: lxBoardGira 900ms linear infinite;
}
@keyframes lxBoardGira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body.lk-reader #read_pane_right.lx-pane-carregando::after { animation: none; }
}


/* === LIBORDEM_20261025 — a ordem da biblioteca ==================================== */
.lib-ordem-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
}
.lib-ordem-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;                      /* alvo de dedo */
  padding: 0 var(--space-3, 12px);
  border: 1px solid var(--border-default, #e3e6e8);
  border-radius: var(--radius-full, 999px);
  background: var(--color-white, #fff);
  font: 500 13px/1 var(--font-ui);
  color: var(--text-body, #1a1a2e);
  cursor: pointer;
  white-space: nowrap;
}
.lib-ordem-btn:active { background: var(--color-gray-50, #f7f8f9); }
.lib-ordem-ico { font-size: 14px; color: var(--text-muted, #6b7280); }

.lib-ordem-fundo {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .28);
  display: flex;
  align-items: flex-end;
}
.lib-ordem-fundo[hidden] { display: none; }
.lib-ordem-folha {
  width: 100%;
  background: var(--color-white, #fff);
  border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
  padding: var(--space-2, 8px) var(--space-4, 16px) var(--space-6, 24px);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
}
.lib-ordem-pega {
  width: 40px;
  height: 4px;
  margin: 0 auto var(--space-3, 12px);
  border-radius: var(--radius-full, 999px);
  background: var(--color-gray-200, #e3e6e8);
}
.lib-ordem-folha h4 {
  margin: 0 0 var(--space-2, 8px);
  font: 700 14px/1.3 var(--font-ui);
  color: var(--text-muted, #6b7280);
}
.lib-ordem-op {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-2, 8px);
  border: 0;
  border-bottom: 1px solid var(--border-hairline, #eef0f2);
  background: none;
  font: 400 16px/1.3 var(--font-ui);
  color: var(--text-body, #1a1a2e);
  text-align: left;
  cursor: pointer;
}
/* HIDDENVENCE_20261102 - o display de cima vencia o atributo hidden */
.lib-ordem-op[hidden], .lib-card-menu-item[hidden] { display: none; }
.lib-ordem-op:last-child { border-bottom: 0; }
.lib-ordem-op.is-on { font-weight: 700; }
/* RESETTEXTO_20261102 - o resultado do menu do texto, dentro da propria folha */
.lx-menu-texto-msg { margin: 8px 0 4px; font-size: 16px; line-height: 1.4; }
.lib-ordem-op.is-on::after { content: " ✓"; color: var(--color-brand-500, #4F46E5); }


/* === LOOPFRASE_20261025 — o botao de repetir diz o que esta a fazer ================
 *
 * Tres prints do Patrick (24/10) mostravam tres aspectos do mesmo botao e nenhum tinha nome:
 * "Nao sei se ta ligado". Ligado passa a ser uma pastilha cheia COM A PALAVRA.
 */
body.lk-reader .lx-progline__loop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  /* PASTILHACABE_20261028 (#624) - a regra de base dava `width: 32px`, a largura de um
     circulo. Depois pos-se-lhe uma PALAVRA dentro e ela passou a ser cortada: ele fotografou
     "entenc", o meio de "sentence". A largura passa a ser o conteudo, com o minimo de 32px
     que o dedo precisa quando nao ha palavra. Serve qualquer idioma sem eu escolher numeros. */
  width: auto;
  min-width: 32px;
  flex: none;
  white-space: nowrap;
  border-radius: var(--radius-full, 999px);
  transition: background-color 140ms ease, color 140ms ease;
}
body.lk-reader .lx-progline__loop-txt {
  font: 600 11px/1 var(--font-ui);
  letter-spacing: .01em;
}
body.lk-reader .lx-progline__loop.is-on {
  background: var(--color-brand-500, #4F46E5);
  color: var(--color-white, #fff);
}
body.lk-reader .lx-progline__loop.is-on svg { stroke: currentColor; }
/* LOOPHOVER_20261119 - com o HOVERCONTRASTE (#833) o `button:hover` generico passou a ter a forca do
   proprio `button`, e estes dois botoes de fundo transparente (classe) deixaram de reagir ao rato.
   Hover proprio, so com rato de verdade, no mesmo tom do :active -- nao o circulo escuro de antes. */
@media (hover: hover) and (pointer: fine) {
  body.lk-reader .lx-progline__restart:hover,
  body.lk-reader .lx-progline__loop:not(.is-on):hover { background: rgba(0, 97, 123, 0.08); }
}


/* BARRAGRELHA2_20261025 - o bloco da grelha mudou-se para lexgo_form_pages.css, que e a
   folha que o base.html carrega DEPOIS desta. Aqui perdia a corrida da ordem:
   medido, a barra continuava em  apesar de um . */


/* LEITORPC_20261106 - Patrick: "posicao do menu ruim". A folha de baixo e do telefone: no computador
   atravessava a tela inteira para mostrar quatro linhas. O menu do texto abre junto do "...", e as
   outras folhas ficam como uma janela no centro. Guarda: tools/leitorpc_check.py. */
@media (min-width: 901px) {
  .lib-ordem-fundo { align-items: center; justify-content: center; }
  .lib-ordem-folha { width: min(420px, calc(100vw - 48px)); border-radius: var(--radius-xl, 16px);
                     padding: var(--space-4, 16px); box-shadow: 0 8px 24px rgba(15, 23, 42, .14); }
  .lib-ordem-pega { display: none; }
  #lxMenuTexto { align-items: flex-start; justify-content: flex-end; background: transparent;
                 padding: 100px 24px 0; }
  #lxMenuTexto .lib-ordem-folha { box-sizing: border-box; width: 260px; border-radius: 12px; border: 1px solid #E5E7EB; }
}

/* VELOLISTA_20261119 (#844) - a lista das velocidades, por cima do botao */
.lx-rate-pop { position: fixed; z-index: 260; min-width: 132px; padding: 6px; background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E5E7EB); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.lx-rate-pop__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent !important;
  color: var(--color-text-strong, #1A1A2E) !important; font: 600 15px/1 var(--lexgo-font-stack, Inter, sans-serif); cursor: pointer; }
.lx-rate-pop__item[aria-checked="true"] { background: var(--brand-accent-light, #EEF2FF) !important; color: var(--brand-accent, #4F46E5) !important; }
@media (hover: hover) and (pointer: fine) { .lx-rate-pop__item:hover { background: #F3F4F6 !important; } }
.lx-rate-pop__ok { color: var(--brand-accent, #4F46E5); font-weight: 700; min-width: 1em; text-align: right; }

/* MARGEMBAIXO_20261119 (#856) - "texto sem margem inferior". A margem de baixo do cartao no telefone e
   a faixa branca do ::after (CARD_HIDDEN_WITH_MASK_AND_PAGINATION_20260629), mas ela era ABSOLUTA
   dentro de um cartao que rola o texto por scrollTop: um filho absoluto rola com o conteudo, por
   isso cobria a margem so na primeira "pagina" -- depois de rolar subia com o texto e a linha de
   baixo ficava cortada a seco na borda (a fotografia). Pegajosa, fica no fundo do que se ve em
   qualquer rolagem. Gradiente em vez de branco cheio: o fim da linha esmaece em vez de sumir.
   Nao e mask-image (tentado a 29/06: apagava a borda arredondada). So no telefone: no portatil o
   ::after e o espaco do flex (lexgo_form_pages.css) e la a margem ja estava certa.
   SEMDESBOTAR_20261119 (#867 "texto desbotado"): o sticky recua o padding-bottom do cartao, e o JS
   poe ali a "cauda" (303px no texto dele) -- a faixa ficava 303px acima do fundo, por cima de uma
   linha a meio do cartao. `bottom` compensa a cauda (--lx-cauda, posta pelo JS) e a faixa ja nao
   tem margem negativa: no ultimo cartao fica DEPOIS do texto, nao em cima da ultima linha.
   Guarda: tools/margembaixo_check.py */
@media (max-width: 768px) {
  body.lk-reader #thetext::after {
    content: "" !important;
    display: block !important;
    position: sticky !important;
    left: auto !important;
    right: auto !important;
    bottom: calc(-1 * var(--lx-cauda, 0px)) !important;
    height: 32px !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #FFFFFF 85%) !important;
    pointer-events: none !important;
    z-index: 2 !important;
  }
}


/* === D2PP_20261119 (#863) - estados de palavra: azul que desbota + pontos que diminuem ===============
 * Pedido do Patrick ("D2", 19/11), com mais contraste e degraus que crescem para o claro, e os
 * ajustes do conselho da agencia (council-20261119-1840): pontos escuros (>= 3:1 em todos os
 * fundos), contorno de selecao neutro, cluster de pontos com largura minima para palavras curtas.
 * Substitui o amarelo que clareia + tracejado no nivel 4 (parecido com o do concorrente, auditoria #863).
 * So PALAVRAS (.word): o Lute da a classe status0 tambem aos espacos, e pinta-los fazia lascas
 * azuis e linhas de pontos continuas entre as palavras (visto no ecra a 19/11).
 * Guarda: tools/d2cores_check.py */
body.lk-reader #thetext span.textitem.word.status0:not(.newmultiterm) { background-color: var(--status-0-bg) !important; }
body.lk-reader #thetext span.textitem.word.status1:not(.newmultiterm) { background-color: var(--status-1-bg) !important; }
body.lk-reader #thetext span.textitem.word.status2:not(.newmultiterm) { background-color: var(--status-2-bg) !important; }
body.lk-reader #thetext span.textitem.word.status3:not(.newmultiterm) { background-color: var(--status-3-bg) !important; }
body.lk-reader #thetext span.textitem.word.status4:not(.newmultiterm),
body.lk-reader #thetext span.textitem.word.status5:not(.newmultiterm),
body.lk-reader #thetext span.textitem.word.status99:not(.newmultiterm) {
  background-color: transparent !important;
  border-bottom: 0 !important;
  text-decoration: none !important;
}
body.lk-reader #thetext span.textitem.word:is(.status0, .status1, .status2, .status3, .status4) {
  position: relative;
}
body.lk-reader #thetext span.textitem.word:is(.status0, .status1, .status2, .status3, .status4)::after {
  position: absolute;
  left: 50%;
  bottom: -1.02em;                /* abaixo das letras que descem (g, j, p) e acima da linha seguinte */
  transform: translateX(-50%);
  min-width: 20px;                 /* palavras curtas ("de", "a"): o cluster nao encolhe */
  text-align: center;
  white-space: nowrap;
  font: 700 9px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 1px;
  color: var(--status-dot, #172554);
  pointer-events: none;
}
/* NOVALILAS_20261120 - Patrick (20/11): a palavra nova mal mudava ao ser marcada (azul -> azul mais claro, 5 -> 4 pontos). Opcao 6 que ele escolheu: nova LILAS, SEM pontos e com contorno vermelho fino; ao marcar vira azul e ganha os pontos. */
body.lk-reader #thetext span.textitem.word.status0::after { content: none !important; }
body.lk-reader #thetext span.textitem.word.status0:not(.newmultiterm) { box-shadow: inset 0 0 0 1.5px var(--status-0-borda, #111827) !important; }
body.lk-reader #thetext span.textitem.word.status1::after { content: "\2022\2022\2022\2022"; }
body.lk-reader #thetext span.textitem.word.status2::after { content: "\2022\2022\2022"; }
body.lk-reader #thetext span.textitem.word.status3::after { content: "\2022\2022"; }
body.lk-reader #thetext span.textitem.word.status4::after { content: "\2022"; }

/* PONTOSQUEBRA_20261122 (#899) - "8 pontos?" (foto do Patrick: um termo com 4 pontos e outros 4
   soltos ao lado). Um termo de varias palavras (o data-text leva U+200B entre as palavras; palavra solta nao) pode partir
   por duas linhas. O ::after dos pontos e `position:absolute` dentro de um span EM LINHA, e a caixa
   de um span partido nao e a de nenhum dos pedacos: o grupo de 4 ficava no meio de nada, longe
   do termo (medido: x=288 css, y=252, com os pedacos a 39..300 e 199..258) e ainda havia o do
   pedaco onde o termo comeca. Nao se corrige com uma posicao: regra e que um elemento partido
   nao tem UM sitio. Aqui os pontos sao fundo do proprio span, que o navegador pinta pedaco a
   pedaco (box-decoration-break: clone): cada linha em que o termo cai leva os seus pontos por
   baixo dela, no sitio de sempre. Faixa de 5px de enchimento por baixo da caixa (num span em
   linha o enchimento nao mexe na altura da linha); a cor do estado fica numa camada que nao a
   cobre. A marca vermelha/azul (.kwordmarked / .wordhover, border-bottom de 1px do Lute) fica
   logo por baixo da caixa de cor, como estava, e nao por baixo dos pontos.
   Palavras soltas ficam como estavam (::after). Guarda: tools/pontosquebra_check.py */
body.lk-reader #thetext span.textitem.word[data-text*="\200B"]:is(.status1, .status2, .status3, .status4):not(.newmultiterm) {
  --lx-ponto: radial-gradient(circle at 50% 50%, var(--status-dot, #172554) 1.7px, transparent 2px);
  --lx-marca: linear-gradient(transparent, transparent);
  padding: 1px 0 6px !important;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-origin: padding-box !important;
  background-clip: padding-box !important;
}
body.lk-reader #thetext span.textitem.word[data-text*="\200B"]:is(.status1, .status2, .status3, .status4):not(.newmultiterm)::after { content: none !important; }
body.lk-reader #thetext span.textitem.word[data-text*="\200B"].kwordmarked:is(.status1, .status2, .status3, .status4):not(.newmultiterm) { --lx-marca: linear-gradient(red, red); border-bottom-color: transparent !important; }
body.lk-reader #thetext span.textitem.word[data-text*="\200B"].wordhover:is(.status1, .status2, .status3, .status4):not(.newmultiterm) { --lx-marca: linear-gradient(blue, blue); border-bottom-color: transparent !important; }
body.lk-reader #thetext span.textitem.word[data-text*="\200B"].status1:not(.newmultiterm) {
  background-image: var(--lx-ponto), var(--lx-ponto), var(--lx-ponto), var(--lx-ponto),
                    linear-gradient(var(--status-1-bg), var(--status-1-bg)), var(--lx-marca) !important;
  background-position: calc(50% - 9px) 100%, calc(50% - 3px) 100%, calc(50% + 3px) 100%, calc(50% + 9px) 100%,
                       0 0, 0 calc(100% - 5px) !important;
  background-size: 6px 5px, 6px 5px, 6px 5px, 6px 5px, 100% calc(100% - 5px), 100% 1px !important;
}
body.lk-reader #thetext span.textitem.word[data-text*="\200B"].status2:not(.newmultiterm) {
  background-image: var(--lx-ponto), var(--lx-ponto), var(--lx-ponto),
                    linear-gradient(var(--status-2-bg), var(--status-2-bg)), var(--lx-marca) !important;
  background-position: calc(50% - 6px) 100%, 50% 100%, calc(50% + 6px) 100%,
                       0 0, 0 calc(100% - 5px) !important;
  background-size: 6px 5px, 6px 5px, 6px 5px, 100% calc(100% - 5px), 100% 1px !important;
}
body.lk-reader #thetext span.textitem.word[data-text*="\200B"].status3:not(.newmultiterm) {
  background-image: var(--lx-ponto), var(--lx-ponto),
                    linear-gradient(var(--status-3-bg), var(--status-3-bg)), var(--lx-marca) !important;
  background-position: calc(50% - 3px) 100%, calc(50% + 3px) 100%,
                       0 0, 0 calc(100% - 5px) !important;
  background-size: 6px 5px, 6px 5px, 100% calc(100% - 5px), 100% 1px !important;
}
body.lk-reader #thetext span.textitem.word[data-text*="\200B"].status4:not(.newmultiterm) {
  background-image: var(--lx-ponto), linear-gradient(transparent, transparent), var(--lx-marca) !important;
  background-position: 50% 100%, 0 0, 0 calc(100% - 5px) !important;
  background-size: 6px 5px, 100% calc(100% - 5px), 100% 1px !important;
}

/* IDIOMAFIXO_20261120 - aviso "este texto e em X" (fixo: nao mexe na paginacao dos cartoes) */
/* AVISOCAMADA_20261124 - era 1001: tapava o painel Aa (120) no telefone; fica por cima do texto e por baixo do que se abre */
.lx-idioma-outro { position: fixed; z-index: 115; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 72px); max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: #111827; color: #FFFFFF; border-radius: 999px; padding: 6px 6px 6px 14px;
  font: 500 14px/1.3 var(--font-ui, Inter, system-ui, sans-serif); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.lx-idioma-outro form { margin: 0; }
.lx-idioma-outro__btn { background: #FFFFFF; color: #111827; border: 0; border-radius: 999px; min-height: 36px; padding: 6px 14px;
  font: 600 14px/1 var(--font-ui, Inter, system-ui, sans-serif); cursor: pointer; }

/* CARTAOTOPO_20261122 (#916, "Esta pagina esta o melhor possivel?") - no telemovel o topo do cartao
   tinha dois restos do Lute: a faixa azul de 6px (#79b7e7, era a barra de arrastar para mudar a altura
   -- o LenkenGo ja nao a usa) e a pega 40x4 que herdava do Lute `position:absolute; right:0;
   translate(0,-100%)` e ficava pendurada FORA do cartao, no canto direito. A pega volta ao sitio
   pensado (ao centro, dentro); o spinner de carregar (::after com .lx-pane-carregando) fica.
   tools/cartaotopo_check.py */
@media (pointer: coarse) and (max-width: 820px) {
  body.lk-reader #read_pane_right:not(.lx-pane-carregando)::after { display: none !important; }
  body.lk-reader #read_pane_right.open-dict::before,
  body.lk-reader #read_pane_right.lx-pane-vazio::before {
    position: static !important;
    transform: none !important;
    background-image: none !important;
    cursor: default !important;
  }
}

/* SINCAUTO_20261124 - "a sincronizar o audio": discreto, por cima da barra de baixo, nao recebe toques */
.lx-sinc-aviso { position: fixed; z-index: 114; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 118px); max-width: calc(100vw - 32px); pointer-events: none; white-space: nowrap;
  background: #EEF2FF; color: #312E81; border: 1px solid #C7D2FE; border-radius: 999px; padding: 3px 12px;
  font: 500 12px/1.35 var(--font-ui, Inter, system-ui, sans-serif); text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
html.lx-escuro body .lx-sinc-aviso:not(#_) { background: #262A33; color: #E7E9EE; border-color: #3A404C; }

/* NARRAFUNDO_20261128 - a faixa da narracao, por cima da barra de baixo (a mensagem ja nao vai dentro do botao) */
.lx-narr-msg { margin: 0 12px 6px; padding: 8px 12px; border-radius: 10px; font: 500 13px/1.35 var(--font-ui, Inter, system-ui, sans-serif);
  background: var(--surface-card, #FFFFFF); color: var(--pd-tinta, #111827); border: 1px solid var(--pd-borda, #DDE3EA); }
.lx-narr-msg[hidden] { display: none; }
html.lx-escuro .lx-narr-msg { background: var(--esc-sup, #1C1F26); color: var(--esc-tinta, #E7E9EE); border-color: var(--esc-div, #3A404C); }
#lx-narr-btn .toolbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ARRASTARFECHA_20261129 - a pega agora arrasta o cartao para baixo (fecha-o): a faixa a volta dela
   passa de 16px para 28px, para dar para acertar com o dedo. tools/arrastarfecha_check.py */
@media (pointer: coarse) and (max-width: 820px) {
  body.lk-reader #read_pane_right.open-dict:not(.lx-pane-vazio)::before { margin: 12px auto 12px !important; }
}

/* DEITADO_20261130 - Patrick (30/11, opcao A): com o celular deitado o cabecalho comia 56 dos ~390px
   e sobravam 4 linhas por cartao. Enquanto le deitado, o cabecalho sai; em pe volta. */
@media (orientation: landscape) and (max-height: 500px) {
  body.lk-reader #lxTopbar { display: none !important; }
  html body.lk-reader.lx-has-topbar { padding-top: 0 !important; }   /* vence o unified_components, que vem depois */
}
