.play-page #game {
  position: relative;
}
.play-page #game .learn-invite {
  grid-column: 3;
  justify-self: end;
  align-self: center;
  min-height: 32px;
  padding: 4px 7px;
  background: transparent;
  border: 1px solid #b5c3a8;
  color: #fff5cd;
  font: 12px/1.25 system-ui;
  box-shadow: none;
}
.play-page #coach {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  color: #283924;
  background: #fff3cc;
  border: 1px solid #caba84;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}
.play-page .coach-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.play-page #coach button {
  color: #283924;
  background: #fffdf5;
  border: 1px solid #a9a279;
  min-height: 36px;
  font-size: 14px;
  padding: 5px 8px;
  box-shadow: none;
}
.play-page #coach-toggle {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 700;
}
.play-page #coach-close {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  flex-shrink: 0;
  font-size: 22px;
}
.play-page #coach-content {
  overflow: auto;
  min-height: 0;
}
.play-page #coach h2 {
  margin: 3px 0 12px;
  font: 700 21px/1.2 system-ui;
  color: inherit;
}
.play-page #coach p {
  margin: 0 0 12px;
  font: 16px/1.45 system-ui;
  color: inherit;
}
.play-page #coach .coach-step {
  font: 600 12px/1.3 system-ui;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.play-page #coach #coach-detail {
  font-size: 14px;
}
.play-page #coach-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.play-page #coach-cards .playing-card {
  width: 45px;
  height: 64px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: 0 0 45px;
}
.play-page #coach-cards .card-face {
  width: 100%;
  height: 100%;
  --index-size: 17px;
}
.play-page #coach-cards .card-center,
.play-page #coach-cards .card-bottom,
.play-page #coach-cards .card-pips {
  display: none;
}
.play-page .coach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.play-page #coach-action {
  flex: 1 1 100%;
  font-weight: 700;
}
.play-page #coach.collapsed #coach-content,
.play-page #coach.collapsed .coach-actions {
  display: none;
}
.play-page #coach.collapsed {
  grid-template-rows: auto;
}
.play-page .coach-target {
  outline: 3px solid #ffdf77 !important;
  outline-offset: 3px;
}
.play-page .turn-note:has(#table-notice:not([hidden])) {
  z-index: 12 !important;
}
.play-page #card-words-dialog dt {
  font-weight: 700;
  margin-top: 16px;
}
.play-page #card-words-dialog dd {
  margin: 4px 0;
}
@media (min-width: 1100px) and (min-height: 541px) {
  .play-page #game.with-coach {
    max-width: 1450px;
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 12px;
  }
  .play-page #game.with-coach .table-layout {
    grid-column: 1;
    grid-row: 1;
  }
  .play-page #game.with-coach .table-bottom {
    grid-column: 1;
    grid-row: 2;
  }
  .play-page #coach {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
  }
  .play-page #game.with-coach .team-area {
    width: calc(100% - 140px);
  }
}
@media (max-width: 1099px), (max-height: 540px) {
  .play-page #coach {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 8;
    width: min(330px, calc(100% - 16px));
    height: var(--coach-height, 130px);
    max-height: var(--coach-height, 130px);
    padding: 6px 8px;
    gap: 4px;
    box-shadow: 0 4px 18px #13291f55;
  }
  .play-page #coach.collapsed {
    width: min(220px, calc(100% - 16px));
    height: auto;
  }
  .play-page #coach.collapsed #coach-toggle {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .play-page #coach button {
    min-height: 26px;
    font-size: 12px;
    padding: 2px 6px;
  }
  .play-page #coach-close {
    width: 26px;
    height: 26px;
    min-height: 26px;
  }
  .play-page #coach h2 {
    font-size: 15px;
    margin: 2px 0 5px;
  }
  .play-page #coach p {
    font-size: 13px;
    margin: 0 0 6px;
    line-height: 1.3;
  }
  .play-page #coach #coach-detail {
    font-size: 12px;
  }
  .play-page #coach .coach-step {
    font-size: 10px;
  }
  .play-page #coach-action {
    flex: 1 1 auto;
  }
  .play-page #coach-words {
    margin-left: auto;
  }
}
@media (max-height: 540px) and (min-width: 601px) {
  .play-page #game .learn-invite {
    padding: 1px 6px;
    min-height: 24px;
    font-size: 10px;
  }
  .play-page #game .learn-invite br {
    display: none;
  }
}
.play-page #coach #coach-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 700;
}
@media (min-width: 1100px) and (min-height: 541px) {
  .play-page #game #learn-invite {
    display: none;
  }
}
@media (max-width: 1099px), (max-height: 540px) {
  .play-page #coach .coach-step {
    display: none;
  }
}
.play-page #coach-cards:empty {
  display: none;
}
@media (max-width: 600px) and (max-height: 620px) {
  .play-page #coach-content:has(#coach-cards:not(:empty)) #coach-title {
    display: none;
  }
}
