/* Integration spacing only; the original catalog and translator keep their UI. */
html[data-lux-view="translator"] .site-header { padding-right: 42px; }
html[data-lux-view="dictionary"] .dictionary-entry { min-width: 0; }
html[data-lux-view="dictionary"] .dictionary-entry > svg { flex-shrink: 0; }
/* Catalog signs (lux-glyphs-corte-b2, near-square): the ink fills the upstream box height and
 * the width follows each sign's own advance, so wide signs are neither squeezed nor clipped.
 * The dictionary popup keeps its upstream box and fits the sign inside it. */
html[data-lux-view="dictionary"] :is(.dictionary-entry, .alphabet-cell, .glyph-button) > svg[data-lux-sign] { width: auto; aspect-ratio: var(--lux-aspect); }
html[data-lux-view="dictionary"] .dictionary-entry .entry-info { flex: 1; min-width: 0; overflow: hidden; }
html[data-lux-view="dictionary"] .dictionary-entry .entry-surface { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
html[data-lux-view="translator"] .translation-result { white-space: pre-wrap; overflow-wrap: anywhere; }
html[data-lux-view="translator"] .lux-structure-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 16px 0; color: #aaa; font-size: 12px; }
html[data-lux-view="translator"] .lux-structure-key > span { display: inline-flex; align-items: center; gap: 7px; }
html[data-lux-view="translator"] .lux-structure-key > span { --lux-cap: 13px; }
html[data-lux-view="translator"] .lux-structure-key .lux-cell { margin: 0; }
html[data-lux-view="translator"] #romanized-text { margin-top: 16px; white-space: pre-wrap; overflow-wrap: anywhere; color: #ddd; }
html[data-lux-view="translator"] #review-section > summary { cursor: pointer; color: #aaa; font-size: 12px; padding: 16px 0; }
html[data-lux-view="translator"] .translation-status:empty { margin: 0; min-height: 0; }
html[data-lux-view="translator"] [hidden] { display: none !important; }
html[data-lux-view="translator"] .lux-modes { display: flex; gap: 26px; margin: 0 0 18px; border-bottom: 1px solid #292929; }
html[data-lux-view="translator"] .lux-modes button { appearance: none; color: #888; background: transparent; border: 0; border-bottom: 1px solid transparent; padding: 12px 0; margin-bottom: -1px; font: inherit; font-size: 15px; cursor: pointer; }
html[data-lux-view="translator"] .lux-modes button[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
html[data-lux-view="translator"] .conversion-languages { grid-template-columns: 1fr 1fr; gap: 42px; }
html[data-lux-view="translator"] #script-target { color: #ddd; font-size: 13px; letter-spacing: 0; padding: 10px 4px; }
@media(max-width:700px) {
  html[data-lux-view="translator"] .conversion-languages { gap: 16px; }
  html[data-lux-view="translator"] #script-target { display: block; padding: 8px 0; font-size: 12px; }
  html[data-lux-view="translator"] .lux-modes { margin-bottom: 12px; }
  html[data-lux-view="translator"] .lux-modes button { min-height: 44px; }
}

/* Form controls: flat, dark and square in every engine (no WebKit gloss or rounded
 * native ring). Focus is a 1 px low-contrast ring for keyboard use only; text
 * fields show it only after Tab (bridge.js sets data-lux-focus), since browsers
 * match :focus-visible on every text-field click. */
html[data-lux-view] select {
  -webkit-appearance: none; appearance: none; border-radius: 0;
  background-color: #050505; color: #fff; border: 1px solid #333;
  font-family: inherit; line-height: 1.2; cursor: pointer;
  padding-left: 10px; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px 6px;
}
html[data-lux-view] select:hover { border-color: #555; }
html[data-lux-view] select option { background: #050505; color: #fff; }
html[data-lux-view] :is(button, input:not([type="checkbox"]):not([type="radio"]), textarea) { -webkit-appearance: none; appearance: none; border-radius: 0; }
html[data-lux-view] :is(button, select, summary, a, [tabindex]):focus { outline: none; }
html[data-lux-view] :is(button, select, summary, a, [tabindex]):focus-visible { outline: 1px solid #666; outline-offset: 2px; }
html[data-lux-view] textarea:focus, html[data-lux-view] input:not([type="checkbox"]):not([type="radio"]):focus { outline: none !important; box-shadow: none; }
html[data-lux-view="translator"] #input-text:focus { background: transparent; }
html[data-lux-view] .translation-input:focus-within,
html[data-lux-view] .search-field:focus-within { outline: none; }
html[data-lux-focus="keyboard"] .translation-input:focus-within { outline: 1px solid #666; outline-offset: -1px; }
html[data-lux-focus="keyboard"] .search-field:focus-within,
html[data-lux-focus="keyboard"] .lux-vocabulary-search:focus { outline: 1px solid #666 !important; outline-offset: 1px; }
html[data-lux-view="translator"] .language-bar select { border: 1px solid #333; padding-top: 9px; padding-bottom: 9px; }
html[data-lux-view="translator"] .language-bar button:hover { border-color: #555; }

/* Lux signs read as luminous green with a soft halo on every Lux system page.
 * (The landing home Lux block uses the same green.) */
@media screen {
  html[data-lux-view] svg[data-lux-sign] {
    color: #9eebc2;
    filter: drop-shadow(0 0 1.5px rgba(150, 235, 190, .5)) drop-shadow(0 0 5px rgba(150, 235, 190, .22));
  }
}
/* Tabs switch state instantly: WebKit otherwise animates them from native button styles on load. */
html[data-lux-view] :is(.lux-catalog-tabs, .lux-modes) button { background: transparent; transition: none; }

/* «Transcribe»: a visible entry to the transcriber, beside the dictionary tabs. */
.lux-catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lux-catalog-bar .lux-catalog-tabs { flex: 1; }
.lux-transcribe {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid #9eebc2; color: #9eebc2; background: transparent;
  font: inherit; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
}
.lux-transcribe::after { content: "↗"; }
.lux-transcribe:hover { background: #9eebc2; color: #000; }
html[data-lux-focus="keyboard"] .lux-transcribe:focus-visible { outline: 1px solid #666; outline-offset: 2px; }

/* Discreet «In development» status beside the LUX brand. */
.site-header { justify-content: flex-start; gap: 14px; }
.site-header .back-link, .site-header .credits-link { margin-left: auto; }
.lux-status { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #6f6f6f; border: 1px solid #2a2a2a; padding: 3px 7px; line-height: 1; }

/* The transcriber input grows with its text (bridge.js); no height cap. */
html[data-lux-view="translator"] #input-text { max-height: none; flex: none; }

/* Narrow phones: the Transcribe button wraps under the tabs instead of overflowing. */
@media (max-width: 380px) {
  .lux-catalog-bar { flex-wrap: wrap; gap: 10px; }
  .lux-transcribe { padding: 8px 12px; font-size: 10px; letter-spacing: .1em; }
}
