.extra-game {
  margin-block: 24px;
  min-width: 0;
}
.extra-preview {
  flex-shrink: 0;
}
.extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 14px;
}
.extra-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: 0 20px;
}
.extra-scores > span {
  display: flex;
  flex-direction: column;
}
.extra-scores strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.team-scores {
  justify-content: space-between;
}
.extra-turn-controls {
  margin-top: 18px;
}
.checker-board,
.checker-preview {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1;
}
.checker-board {
  max-width: 520px;
  margin-inline: auto;
  border: 8px solid var(--green);
  border-radius: 8px;
  overflow: hidden;
}
.checker-square {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 8%;
  aspect-ratio: 1;
  min-width: 0;
}
.checker-square.light {
  background: #e9eddf;
}
.checker-square.dark {
  background: #769682;
}
.checker-square:disabled {
  opacity: 1;
}
.checker-square.selected {
  box-shadow: inset 0 0 0 4px var(--orange);
}
.checker-square:not(:disabled):hover {
  box-shadow: inset 0 0 0 3px var(--green);
}
.checker-square:focus-visible {
  z-index: 1;
  outline-offset: -4px;
}
.checker-piece {
  display: inline-flex;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid #344e3f;
  background: #fffdf8;
  box-shadow:
    inset 0 0 0 3px #d9ddd0,
    0 2px 3px #00000026;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.checker-piece.side-2 {
  background: #203c32;
  border-color: #142d25;
  box-shadow:
    inset 0 0 0 3px #4b6e5b,
    0 2px 3px #00000026;
}
.checker-piece svg {
  width: 65%;
  fill: none;
  stroke: #203c32;
  stroke-width: 2;
}
.checker-piece.side-2 svg {
  stroke: #fffdf8;
}
.checker-target {
  position: absolute;
  width: 24%;
  aspect-ratio: 1;
  background: var(--green);
  border: 2px solid var(--surface);
  border-radius: 50%;
}
.checker-preview {
  width: 220px;
  border: 4px solid #d1dfcd;
  border-radius: 4px;
  overflow: hidden;
}
.checker-preview .checker-piece {
  width: 72%;
  border-width: 1px;
  box-shadow: none;
}
.dots-board {
  display: grid;
  grid-template-columns: 12px 1fr 12px 1fr 12px 1fr 12px 1fr 12px;
  grid-template-rows: 12px 1fr 12px 1fr 12px 1fr 12px 1fr 12px;
  max-width: 450px;
  aspect-ratio: 1;
  margin: 24px auto;
  padding: 12px;
}
.dot-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  z-index: 2;
}
.dot-edge {
  border: 0;
  background: #dde3d7;
  position: relative;
  padding: 0;
  border-radius: 5px;
}
.dot-edge.horizontal {
  height: 8px;
  align-self: center;
}
.dot-edge.vertical {
  width: 8px;
  justify-self: center;
}
.dot-edge::after {
  content: "";
  position: absolute;
  inset: -10px;
}
.dot-edge.side-1,
.dot-edge:not(:disabled):hover {
  background: var(--green);
}
.dot-edge.side-2 {
  background: var(--orange);
}
.dot-edge:disabled {
  opacity: 1;
}
.dot-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 1.4rem;
}
.dot-box.side-1 {
  background: #e0ecab;
  color: var(--green);
}
.dot-box.side-2 {
  background: #f6e1d1;
  color: #803b22;
}
.dots-preview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px;
  width: 210px;
  padding: 24px;
}
.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1dfcd;
  position: relative;
}
.preview-dot.linked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 8px;
  width: 30px;
  height: 4px;
  background: #d1dfcd;
}
.bg-legend,
.bg-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
}
.bg-legend {
  margin-bottom: 8px;
}
.backgammon-board {
  border: 8px solid var(--green);
  border-radius: 10px;
  overflow: hidden;
  background: #e9eddf;
}
.bg-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.bg-point {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 0;
  height: clamp(130px, 21vw, 210px);
  border: 0;
  padding: 22px 2px 4px;
  background: transparent;
  isolation: isolate;
}
.bg-point::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  z-index: -1;
}
.bg-point.clay::before {
  background: #d1a185;
}
.bg-point.forest::before {
  background: #769682;
}
.bg-point:disabled {
  opacity: 1;
}
.bg-point:not(:disabled) {
  box-shadow: inset 0 0 0 2px var(--green);
}
.bg-point.selected {
  box-shadow: inset 0 0 0 3px var(--orange);
}
.bg-coordinate {
  position: absolute;
  top: 1px;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--ink);
}
.bg-point .checker-piece {
  width: min(90%, 33px);
  border-width: 2px;
  margin-bottom: -1px;
}
.bg-row.bottom .bg-point {
  transform: rotate(180deg);
}
.bg-row.bottom .bg-coordinate,
.bg-row.bottom .bg-count {
  transform: rotate(180deg);
}
.bg-count {
  background: var(--surface);
  border-radius: 4px;
  padding-inline: 5px;
  font-size: 0.75rem;
}
.bg-bar {
  direction: rtl;
  background: var(--green);
  color: var(--surface);
  padding: 12px;
}
.backgammon-preview {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 240px;
  border: 5px solid #d1dfcd;
  border-radius: 6px;
  overflow: hidden;
  background: #e9eddf;
}
.backgammon-preview .bg-point {
  height: 95px;
  padding-top: 8px;
}
.backgammon-preview .bg-point:nth-child(n + 7) {
  transform: rotate(180deg);
}
.domino-tile {
  display: inline-flex;
  flex-direction: column;
  width: 62px;
  border: 1px solid #acb8a8;
  border-radius: 6px;
  background: #fffdf8;
  color: #203c32;
  box-shadow: 0 3px 6px #00000012;
  flex-shrink: 0;
}
.domino-tile svg {
  width: 100%;
  fill: currentColor;
}
.domino-tile svg + svg {
  border-top: 1px solid #acb8a8;
}
.domino-preview {
  display: flex;
  gap: 14px;
  transform: rotate(-10deg);
  padding-inline: 28px;
}
.domino-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 24px 14px;
  min-height: 140px;
  background: #e9eddf;
  border-radius: 10px;
  align-items: center;
}
.domino-chain .domino-tile {
  flex-direction: row;
  width: 74px;
}
.domino-chain .domino-tile svg {
  width: 50%;
}
.domino-chain .domino-tile svg + svg {
  border-top: 0;
  border-left: 1px solid #acb8a8;
}
.domino-hand,
.uno-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: start;
}
.domino-option,
.uno-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.domino-option > div {
  display: flex;
  gap: 4px;
}
.domino-option .btn {
  padding-inline: 10px;
  font-size: 0.85rem;
}
.uno-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100px;
  height: 150px;
  border: 5px solid #fffdf8;
  outline: 1px solid #bbc4b3;
  border-radius: 10px;
  padding: 5px 8px;
  color: #fffdf8;
  background: #203c32;
  box-shadow: 0 4px 8px #00000015;
}
.uno-card > span {
  font-size: 0.72rem;
  font-weight: 650;
}
.uno-card > span:last-child {
  align-self: end;
}
.uno-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  border-radius: 50%;
  background: #fffdf8;
  color: #203c32;
  font-size: 1.55rem;
}
.uno-red {
  background: #a23830;
}
.uno-blue {
  background: #285b85;
}
.uno-green {
  background: #174c3c;
}
.uno-yellow {
  background: #dfb94b;
  color: #203c32;
}
.uno-preview {
  display: flex;
  gap: 8px;
  transform: rotate(-8deg);
}
.uno-preview .uno-card {
  width: 85px;
  height: 132px;
}
.uno-center {
  display: flex;
  justify-content: center;
  padding-block: 24px;
  background: #e9eddf;
  border-radius: 10px;
}
.wild-colors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  max-width: 160px;
}
.wild-colors .btn {
  padding-inline: 10px;
}
.hokm-trump {
  padding-block: 8px 18px;
  font-weight: 700;
}
.hokm-trick {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 20px 10px;
  background: #e9eddf;
  border-radius: 10px;
}
.hokm-trick > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hokm-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hand-card {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 10px;
}
.hand-card:disabled {
  opacity: 0.75;
}
.hand-card:not(:disabled):hover {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.hokm-hand .playing-card {
  width: 90px;
}
.sea-fleets,
.sea-public {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.sea-fleets > section:only-child {
  grid-column: 1 / -1;
  max-width: 480px;
  width: 100%;
  margin-inline: auto;
}
.sea-fleets h3,
.sea-public h3 {
  margin-bottom: 12px;
}
.sea-board,
.sea-preview {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  border: 1px solid #a9b9ad;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #e9eddf;
}
.sea-cell {
  min-width: 0;
  aspect-ratio: 1;
  border: 0;
  border-right: 1px solid #c8d4c8;
  border-bottom: 1px solid #c8d4c8;
  background: transparent;
  position: relative;
  padding: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.sea-cell > span {
  font-size: clamp(0.45rem, 0.8vw, 0.65rem);
  align-self: start;
  position: absolute;
  top: 0;
  left: 1px;
}
.sea-cell.ship {
  background: #769682;
}
.sea-cell.hit {
  background: #f1d1b9;
}
.sea-cell.hit svg {
  width: 70%;
  stroke: #803b22;
  stroke-width: 3;
}
.sea-cell.miss i {
  width: 18%;
  height: 18%;
  background: var(--ink);
  border-radius: 50%;
}
.sea-cell:disabled {
  opacity: 1;
}
.sea-cell:not(:disabled):hover {
  background: var(--lime);
  box-shadow: inset 0 0 0 2px var(--green);
}
.sea-cell:focus-visible {
  outline-offset: -3px;
  z-index: 1;
}
.sea-preview {
  width: 220px;
  background: #e9eddf;
}
.ship-placement {
  padding-bottom: 22px;
}
.word-preview {
  width: 240px;
  border-top: 2px solid #d1dfcd;
  border-bottom: 2px solid #d1dfcd;
  padding-block: 20px;
}
.word-preview > strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.word-preview > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.word-preview span {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-inline-end: 1px solid #769682;
  padding-inline: 12px;
}
.word-preview span:last-child {
  border: 0;
}
.word-round {
  margin-bottom: 20px;
}
.word-round [role="timer"] {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  color: var(--green);
}
.word-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-block: 12px 24px;
  color: var(--muted);
}
.word-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.word-fields input {
  margin-top: 6px;
}
.word-results {
  overflow-x: auto;
  scrollbar-color: var(--muted) var(--paper);
}
.word-results table {
  border-collapse: collapse;
  min-width: 540px;
  width: 100%;
  text-align: start;
}
.word-results th,
.word-results td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.word-results th {
  text-align: start;
}
.word-answer {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 2px;
  min-height: 48px;
}
.word-answer:disabled {
  opacity: 1;
}
.word-answer:not(:disabled):hover {
  background: var(--lime);
}
.word-answer.wrong-letter {
  color: var(--danger);
}
.word-answer.rejected {
  text-decoration: line-through;
  color: var(--danger);
}
.word-answer small {
  display: block;
  text-decoration: none;
}
@media (max-width: 700px) {
  .sea-fleets,
  .sea-public {
    grid-template-columns: 1fr;
  }
  .sea-cell > span {
    font-size: 0.6rem;
  }
  .sea-fleets .sea-board {
    max-width: 420px;
    margin-inline: auto;
  }
  .bg-point {
    padding-top: 20px;
    height: 135px;
  }
  .bg-point .checker-piece {
    border-width: 1px;
    box-shadow: none;
  }
  .bg-bar {
    flex-direction: column;
    gap: 2px;
    padding: 6px;
  }
  .backgammon-board {
    border-width: 5px;
  }
  .domino-hand,
  .uno-hand {
    gap: 12px 8px;
  }
  .domino-tile {
    width: 54px;
  }
  .uno-hand .uno-card {
    width: 82px;
    height: 125px;
  }
  .uno-hand .btn {
    font-size: 0.8rem;
    padding-inline: 9px;
  }
  .hokm-hand .playing-card {
    width: 70px;
  }
  .hokm-trick .playing-card {
    width: 85px;
  }
  .checker-preview {
    width: 190px;
  }
  .word-fields {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .extra-game *,
  .extra-game *::before {
    transition: none;
    animation: none;
  }
}
