/* Cross-language dictionary: /translate/, /lang/ and /lang/<code>/.
   Mobile first. Every control is at least 44px tall; no fixed widths and
   every word cell can break, so 360px never scrolls sideways. */

.x-page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.x-kicker {
  margin: 0 0 0.4rem;
  color: var(--ink-faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.x-title {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.x-lede {
  max-width: 46rem;
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

.x-form {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  margin: 0 0 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.x-field,
.x-select {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.x-field > span,
.x-select > span {
  color: var(--ink-faint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.x-field input,
.x-select select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* keeps mobile Safari from zooming the page */
}

.x-field input:focus-visible,
.x-select select:focus-visible,
.x-swap:focus-visible,
.x-submit:focus-visible,
.x-chips a:focus-visible,
.x-chips button:focus-visible,
.x-form a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.x-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  min-width: 0;
}

.x-swap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--sunken);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.x-swap:hover {
  color: var(--accent);
  border-color: var(--line-strong);
}

.x-submit {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.x-submit:hover {
  background: var(--accent-strong);
}

.x-hint {
  margin: 0 0 0.8rem;
  color: var(--ink-faint);
  font-size: 0.82rem;
  line-height: 1.45;
}

.x-chips-label {
  margin: 0 0 0.45rem;
  color: var(--ink-faint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.x-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.x-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.x-chips a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.x-chips a span {
  margin-inline-start: 0.35rem;
  color: var(--ink-faint);
  font-size: 0.72rem;
}

/* Auto-detect status and one-tap language overrides. */
.x-detect-row {
  display: block;
  min-width: 0;
  margin: 0 0 0.9rem;
}

.x-detect-row[hidden] {
  display: none;
}

.x-detected {
  margin: 0 0 0.35rem;
  font-variant-numeric: tabular-nums;
}

.x-override {
  margin: 0.15rem 0 0.35rem;
}

.x-chips button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.x-chips button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.x-chips button[aria-pressed="true"] {
  border-color: var(--line-strong);
  background: var(--wash);
  color: var(--accent);
  font-weight: 700;
}

.x-results {
  min-width: 0;
  min-height: 12rem;
}

.x-status {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.x-status strong {
  color: var(--ink);
}

.x-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  min-width: 0;
}

.x-cell {
  min-width: 0;
  padding: 0.8rem 0.85rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.x-cell-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.6rem;
  margin: 0 0 0.45rem;
}

.x-cell-name {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.x-forms {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One block per homograph sense; the label is a quiet gloss, not a heading. */
.x-sense {
  min-width: 0;
}

.x-sense + .x-sense {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.x-sense-label {
  margin: 0 0 0.3rem;
  color: var(--ink-faint);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.x-form-item {
  min-width: 0;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}

.x-form-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.x-form-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.x-form-word {
  min-width: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a.x-form-word:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.x-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.x-badge.is-direct {
  border-color: var(--line-strong);
  background: var(--wash);
  color: var(--accent);
}

.x-badge.is-approx {
  border-style: dashed;
  color: var(--ink-soft);
}

.x-src {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0 0.3rem;
  border-radius: 4px;
  background: var(--sunken);
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.x-chain {
  margin: 0.35rem 0 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.x-chain a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.x-chain a:hover {
  color: var(--accent);
}

.x-chain .x-arrow {
  padding: 0 0.15rem;
}

.x-empty {
  padding: 0.9rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.x-empty p {
  margin: 0 0 0.55rem;
  line-height: 1.55;
}

.x-empty p:last-child {
  margin-bottom: 0;
}

.x-attrib {
  max-width: 58rem;
  margin: 1.6rem 0 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
  line-height: 1.6;
}

.x-attrib a {
  color: var(--ink-soft);
}

.x-lang-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.x-lang-card {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.x-lang-card h2 {
  margin: 0 0 0.2rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.x-lang-card .x-meta {
  margin: 0 0 0.45rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.x-lang-card p {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.x-lang-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  min-width: 0;
}

.x-lang-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.x-letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
  margin: 0 0 1.3rem;
  padding: 0;
  list-style: none;
}

.x-letter-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}

.x-letter-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.x-letter {
  margin: 0 0 1.2rem;
  min-width: 0;
}

.x-letter h2 {
  margin: 0 0 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.x-word-list {
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.x-word-list li {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}

.x-word-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.55rem;
  min-height: 44px;
  padding: 0.35rem 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.x-word-list a:hover {
  color: var(--accent);
}

.x-word-list .x-gloss {
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.x-entry-head {
  margin: 0 0 1.2rem;
  min-width: 0;
}

.x-entry-title {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 7vw, 2.9rem);
  font-weight: 600;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.x-entry-pos {
  margin: 0 0 0.4rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.x-glosses {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.x-glosses li {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.x-glosses .x-gloss-lang {
  color: var(--ink-faint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-inline-end: 0.35rem;
}

.x-entry-grid {
  margin: 1.4rem 0 0;
}

.x-section-title {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.x-sources {
  margin: 1.4rem 0 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.x-sources p {
  margin: 0 0 0.4rem;
}

.x-sources p:last-child {
  margin-bottom: 0;
}

.x-action-link {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 1.2rem 0 0;
}

.x-action-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
}

.x-back {
  margin: 1.6rem 0 0;
  font-size: 0.92rem;
}

.x-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
}

.x-back a:hover {
  color: var(--accent);
}

@media (min-width: 560px) {
  .x-page { padding-top: 1.8rem; }
  .x-form { padding: 1rem; }
  .x-pair {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    align-items: end;
  }
  .x-swap { width: 44px; padding: 0; font-size: 0; }
  .x-swap::before { content: "⇄"; font-size: 1.15rem; }
  .x-submit { justify-self: start; width: auto; min-width: 10rem; }
}

@media (min-width: 680px) {
  .x-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .x-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .x-lang-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .x-word-list.is-long { columns: 2; column-gap: 2rem; }
}

@media (max-width: 359px) {
  .x-page { padding-inline: 0; }
  .x-form { padding: 0.65rem; }
  .x-cell { padding: 0.65rem; }
  .x-form-word { font-size: 1.08rem; }
  .x-chips a { padding-inline: 0.55rem; font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .x-page * { transition: none !important; animation: none !important; }
}

/* B1 compact translate shell (Phase 1 UX, 2026-11-16) ---------------------- */

.x-form.x-shell {
  display: block;
  width: 100%;
  max-width: 60rem;
  margin: 0 0 0.9rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
}

.x-shell .x-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.25rem;
  min-height: 56px;
  padding: 4px 8px 4px 4px;
}

.x-shell .x-search-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  line-height: 24px;
  appearance: none;
}

.x-shell .x-search-row input:focus { outline: none; }

.x-shell .x-search-row:focus-within {
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.x-shell .x-clear {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.x-shell .x-clear[hidden] { display: none; }

.x-shell .x-clear:hover { background: var(--wash); color: var(--ink); }

.x-shell .x-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 44px;
  margin: 0 4px 0 0;
  padding: 0 1rem;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.x-spinner {
  display: none;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.x-shell.is-busy .x-spinner {
  display: inline-block;
  animation: x-spin 800ms linear infinite;
}

@keyframes x-spin {
  to { transform: rotate(360deg); }
}

.x-pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  min-height: 56px;
  padding: 5px 12px;
  border-top: 1px solid var(--line);
}

.x-pair-row .x-select {
  position: relative;
  display: block;
  min-width: 0;
  padding-top: 12px;
}

.x-pair-row .x-select > span {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 16px;
  text-transform: uppercase;
}

.x-pair-row .x-select select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 24px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.x-pair-row .x-select select:hover { background: var(--wash); }

.x-pair-row .x-select::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 20px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-faint);
  border-bottom: 1.5px solid var(--ink-faint);
  transform: rotate(45deg);
  pointer-events: none;
}

.x-pair-row .x-swap {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
}

.x-pair-row .x-swap:hover { background: var(--wash); color: var(--accent); }

.x-chips a { position: relative; min-height: 40px; padding: 0.2rem 0.75rem; font-size: 14px; }
.x-chips a::after { content: ""; position: absolute; inset: -2px; }
.x-chips .x-chip-sep { margin: 0 0.3rem; color: var(--ink-faint); }
.x-chips .x-chip-lang { margin: 0; color: var(--ink-faint); font-size: 12px; }

.x-chips-more { margin: 0 0 1.1rem; }
.x-chips-more summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.x-chips-more[open] summary { margin-bottom: 0.35rem; }
.x-chips-more .x-chips { margin-bottom: 0.35rem; }

.x-chip-redundant { display: none; }

.x-more { margin-top: 0.5rem; }
.x-more summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.x-more .x-forms { margin-top: 0.4rem; }

.x-badge { min-height: 24px; padding: 0.15rem 0.5rem; font-size: 12px; }
.x-badge.is-direct {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
}
.x-src { min-height: 24px; font-size: 12px; }
.x-src:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.x-results:empty { min-height: 0; }
.x-results.is-stale { opacity: 0.7; }

@media (min-width: 640px) {
  .x-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  #x-chips-examples > .x-chip-wide { display: none; }
  .x-shell .x-search-row { min-height: 52px; }
  .x-shell .x-search-row input { height: 44px; font-size: 16px; }
  .x-shell .x-submit { min-width: 88px; margin-right: 0; }
}

@media (max-width: 359px) {
  .x-pair-row { grid-template-columns: minmax(0, 1fr); }
  .x-pair-row .x-swap { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .x-results { transition: none; }
  .x-shell.is-busy .x-spinner { animation: none; }
}

/* Plain-text summaries still clear the 44 px target floor in both axes. */
.x-chips-more summary,
.x-more summary { min-width: 44px; }

/* Translate composer: language controls precede their panels. */
.x-form.x-composer { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; max-width: none; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.x-composer .x-language-row { display: flex; min-width: 0; align-items: center; gap: .25rem; }
.x-composer .x-tabs { display: flex; min-width: 0; overflow: hidden; }
.x-composer .x-tab { min-height: 44px; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; padding: 0 .6rem; background: transparent; color: var(--ink-soft); font: inherit; font-size: .85rem; cursor: pointer; }
.x-composer .x-tab[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.x-composer .x-select { flex: 1; min-width: 44px; }
.x-composer .x-select select { min-width: 44px; height: 44px; padding: 0 .4rem; font-size: 16px; }
.x-composer .x-swap { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-self: center; font-size: 1.25rem; }
.x-composer .x-swap::before { content: none; }
.x-input-panel, .x-output-panel { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 190px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.x-output-panel { background: var(--sunken); padding: 1rem; gap: .75rem; }
.x-input-panel textarea { resize: none; width: 100%; min-width: 0; min-height: 125px; flex: 1; padding: 1rem 3.5rem 1rem 1rem; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 18px; line-height: 1.5; }
.x-input-panel textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.x-composer .x-clear { position: absolute; right: .35rem; top: .35rem; width: 44px; min-width: 44px; height: 44px; font-size: 1.5rem; }
.x-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .4rem .6rem; color: var(--ink-faint); font-size: .8rem; }
.x-composer .x-submit { width: auto; }
.x-output { flex: 1; min-width: 0; min-height: 0; overflow-wrap: anywhere; }
.x-output p { margin: 0 0 .4rem; }
.x-output-lang { color: var(--ink-faint); font: 700 .72rem/1.35 var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.x-output-word { font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; }
.x-output-list { display: grid; margin: 0; padding: 0; list-style: none; }
.x-output-row { display: grid; grid-template-columns: minmax(6.5rem, 0.4fr) minmax(0, 1fr); gap: .35rem .85rem; align-items: baseline; margin: 0; padding: .5rem 0; border-top: 1px solid var(--line); }
.x-output-row:first-child { padding-top: 0; border-top: 0; }
.x-output-forms { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .45rem; min-width: 0; }
.x-output.is-all { overflow-y: auto; }
.x-output.is-all .x-output-word { font-size: 1.15rem; line-height: 1.3; }
@media (max-width: 719px) {
  .x-output-panel { max-height: none; }
  .x-output-row { grid-template-columns: minmax(5.5rem, 0.42fr) minmax(0, 1fr); padding: .45rem 0; }
}
@media (min-width: 720px) {
  .x-output.is-all { max-height: 22rem; }
}
.x-copy { flex-shrink: 0; align-self: flex-end; min-width: 44px; min-height: 44px; padding: 0 .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font: inherit; cursor: pointer; }
.x-copy:disabled { opacity: .5; cursor: default; }
.x-tab:focus-visible, .x-copy:focus-visible, .x-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 720px) {
  .x-form.x-composer { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
  .x-source-row { grid-column: 1; grid-row: 1; }
  .x-composer .x-swap { grid-column: 2; grid-row: 1; }
  .x-target-row { grid-column: 3; grid-row: 1; }
  .x-input-panel { grid-column: 1 / 2; grid-row: 2; }
  .x-output-panel { grid-column: 3 / 4; grid-row: 2; }
}

/* Noto Serif 600, uniquely named so it cannot collide with the site
   "Noto Serif" Yakut face (weight 100-900). Mongolian script is a
   separate family, applied only to Mongolian runs. */
@font-face {
  font-family: "Noto Translate";
  src: url("/assets/fonts/noto-serif-translate.woff2?v=e937e7faad") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Noto Mongolian Translate";
  src: url("/assets/fonts/noto-sans-mongolian-translate.woff2?v=234f022700") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.x-form-word, .x-output-word {
  font-family: "Noto Translate", serif;
  font-weight: 600;
}
.x-form-word .x-mongolian, .x-output-word .x-mongolian {
  font-family: "Noto Mongolian Translate", sans-serif;
  font-weight: 400;
}
.x-badge {
  display: inline-flex;
  align-items: center;
  align-self: baseline;
  min-height: 0;
  padding: 0 .4em;
  line-height: 1.2;
  vertical-align: baseline;
}
@media (max-width: 719px) {
  .x-source-row { grid-row: 1; }
  .x-input-panel { grid-row: 2; }
  .x-composer .x-swap { grid-row: 3; }
  .x-target-row { grid-row: 4; }
  .x-output-panel { grid-row: 5; }
}
.x-output-approx { color: var(--ink-faint); font-size: .75rem; }
