/* Shared by the portal and its console document. Preserve words, not whole lines.
   break-word is an emergency fallback for an unbroken URL/identifier wider than
   its container; unlike anywhere it does not shrink min-content word widths. */
html {
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}
button, input, select, textarea, option {
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}
button { white-space: normal; }
.workspace > .panel, .translation-block, .lang-block, .lang-text,
.reference-pair > section, .translation-editor > div { min-inline-size: 0; }
.check-card { min-inline-size: 0; flex-wrap: wrap; }
.check-card input { flex-shrink: 0; }
@media (max-width: 640px) {
  .language-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .check-card small { margin-inline-start: 0; }
}
h1, h2, h3, h4, label, legend, summary, th {
  word-break: keep-all;
  line-break: strict;
}
/* Short state tokens must remain atomic; long action labels may wrap at spaces. */
.step, .live-badge, .queue-badge, .history-readonly,
#copyRawKoreanBtn {
  white-space: nowrap;
  flex-shrink: 0;
}
/* The title owns its row at every panel width, including desktop's two columns. */
.transcript-panel .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.transcript-panel .section-head > div:first-child {
  display: flex;
  align-items: center;
  min-inline-size: 0;
}
.transcript-panel .section-head h2 {
  flex: 1 1 auto;
  min-inline-size: 0;
  overflow-wrap: normal;
}
.transcript-panel .panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-inline-size: 0;
  max-inline-size: 100%;
}
.transcript-panel .draft-save-status {
  white-space: normal;
  min-inline-size: 0;
  max-inline-size: 100%;
}
/* Native CJK prose still needs normal line opportunities; do not change RTL. */
:lang(ja), :lang(zh) { word-break: normal; }
