.foot-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px clamp(16px, 2.2vw, 32px);
  min-width: 0;
}
.foot-actions nav { align-items: center; }
.language-picker {
  position: relative;
  flex: none;
  color: #fcf7e7;
  font: 600 14px/1.35 DM, "DM Sans", system-ui, sans-serif;
  text-align: start;
}
.language-picker > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid #7d927e;
  border-radius: 6px;
  color: inherit;
  background: #203b2e;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.language-picker > summary::-webkit-details-marker { display: none; }
.language-chevron {
  width: 7px; height: 7px;
  margin: 3px 1px 0 3px;
  border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.language-picker[open] .language-chevron { transform: rotate(225deg); margin-top: -3px; }
.language-picker[open] > summary, .language-picker > summary:hover { background: #304f3d; }
.language-picker .language-options {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + 7px);
  z-index: 12;
  box-sizing: border-box;
  padding: 5px;
  width: min(205px, calc(100vw - 40px));
  max-height: min(390px, 65vh);
  max-height: min(390px, 65dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #c6c8b8;
  border-radius: 8px;
  background: #fffdf7;
  color: #20372b;
  box-shadow: 0 6px 22px #0a201b30;
}
.language-options button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 42px; padding: 8px 12px;
  color: inherit; background: transparent; border: 0; border-radius: 4px;
  text-align: start; font: inherit; font-weight: 500; cursor: pointer;
}
.language-options button:hover, .language-options button:focus-visible { background: #ebf0e6; }
.language-options button[aria-pressed="true"] { background: #e3ebdd; font-weight: 700; }
.language-options button[aria-pressed="true"]::after { content: "✓"; color: #265d3c; }
.language-options button:focus-visible { outline: 2px solid #946b24; outline-offset: -2px; }
.language-picker > summary:focus-visible { outline: 2px solid #f5d58a; outline-offset: 3px; }
:where(html:not(:lang(en))) :is(.table-guide, .prose, .offline-note, .chapter, .cr-login-dialog) {
  overflow-wrap: anywhere;
}
:where(html:lang(ja), html:lang(ko)) :is(.chapter h1, .table-guide h1, .table-guide h2, .prose h2) {
  line-height: 1.32; letter-spacing: normal;
}
.game-toolbar .table-guide-links { flex-wrap: wrap; }
html:not(:lang(en)) .game-toolbar .difficulty-switch button { white-space: normal; }
html:not(:lang(en)) :is(.seat-role,.score-target,.declaration-heading,.captured-caption,.seat-name,.round-info) { overflow-wrap: anywhere; }
html:not(:lang(en)) .modal :is(button, label) { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .foot-actions { width: 100%; }
  .foot-actions > nav { flex: 1 1 200px; min-width: 0; }
  .language-picker { margin-inline-start: auto; }
  :where(html:not(:lang(en))) .site-mast nav a { white-space: normal; }
  html:not(:lang(en)) .game-shell > .game-toolbar { display: flex; flex-wrap: wrap; gap: 4px; }
  html:not(:lang(en)) .game-toolbar > .difficulty-switch { flex: 1 1 auto; width: auto; max-width: 100%; }
  html:not(:lang(en)) .game-toolbar > .table-settings { max-width: 100%; flex-wrap: wrap; }
  html:not(:lang(en)) .game-toolbar .table-guide-links { min-width: 0; }
  html:not(:lang(en)) .cr-provider { min-height: 44px; height: auto; padding-block: 6px; }
}
/* Translated action labels determine their own column width in the mobile hand. */
@media (max-width: 1150px) {
  html:not(:lang(en)) .game-table .play-controls {
    grid-template-columns: minmax(76px, 1fr) max-content minmax(156px, 1.8fr);
  }
  html:not(:lang(en)) .game-table .play-controls > .selection-meta,
  html:not(:lang(en)) .game-table .selection-meta > button { width: auto; }
  html:not(:lang(en)) .game-table .selection-meta > button {
    min-width: 44px;
    padding-inline: 5px;
    white-space: nowrap;
  }
}
@media (max-width: 680px) {
  html:not(:lang(en)) .game-table :is(.seat-1,.seat-3) .seat-identity,
  html:not(:lang(en)) .game-table :is(.seat-1,.seat-3) .seat-name,
  html:not(:lang(en)) .game-table :is(.seat-1,.seat-3) .dealer-tag {
    min-width: 0;
    max-width: 100%;
  }
  html:not(:lang(en)) .game-table :is(.seat-1,.seat-3) .dealer-tag {
    padding-inline: 2px;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 1150px) and (min-width: 681px) and (max-height: 560px) {
  html:not(:lang(en)) .game-toolbar > .speed-controls > button { flex: 0 0 auto; }
}
@media (min-width: 340px) and (max-width: 680px) and (orientation: portrait) {
  html:not(:lang(en)) .game-table .declare-stage.is-dealing {
    grid-template-columns: minmax(0, 1fr) clamp(94px, 25%, 115px);
  }
  html:not(:lang(en)) .game-table .declare-stage > .deal-stage { padding-inline: 3px; }
}
@media (max-width: 680px) {
  html:not(:lang(en)) .game-table .declare-stage .deal-heading {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
    text-align: center;
  }
}
