/* The other styles of Mahjong (docs/MULTI-VARIANT-PLAN.md): what they draw that the
   Singapore table does not. Loaded after the table styles. */

/* Riichi: the declaring discard lies sideways in the river. */
.scattered-discard .tile.riichi-tile {
  transform: rotate(90deg);
  transform-origin: center;
  box-shadow: 0 0 0 2px var(--accent, #b8463a);
}

/* Riichi: a red five wears its plain five's face with a red mark in the corner. */
.tile.red-five {
  position: relative;
}
.tile.red-five::after {
  content: '';
  position: absolute;
  right: 9%;
  top: 8%;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: #c0392b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}
.tile.red-five .tile-face {
  filter: sepia(0.35) saturate(1.6) hue-rotate(-20deg);
}

/* American: the joker wears a blank face and its letter; a joker in the river is dead. */
.tile.joker {
  position: relative;
}
.tile.joker .tile-face {
  filter: saturate(0.3) brightness(1.04);
}
.tile.joker .joker-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font:
    700 1em/1 Georgia,
    'Times New Roman',
    serif;
  color: #b8463a;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.tile.tiny .joker-mark,
.tile.small .joker-mark {
  font-size: 0.7em;
}
.scattered-discard .tile.joker {
  opacity: 0.55;
}

/* A typed table option (the American card) takes the whole row of the setup form. */
.settings-grid .field-wide {
  grid-column: 1 / -1;
}
.field-wide textarea {
  width: 100%;
  box-sizing: border-box;
  font:
    0.8em/1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  white-space: pre;
  overflow: auto;
}
.card-table code {
  font-size: 0.95em;
  letter-spacing: 0.04em;
}

/* The other styles' corner of the home page (dist/variants/chooser.js). */
#play-menu .styles-choice::before {
  background: var(--club-ink, #2d3a35);
  color: var(--club-paper, #fbf4e4);
}
.style-entries {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.style-entry {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: var(--club-paper, #fbf4e4);
  border: 1px solid var(--club-line, #dfc796);
  border-radius: 10px;
}
.style-entry .style-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 58px;
  background: var(--club-selection, #eef3ee);
  color: var(--club-teal, #2f6f63);
  border: 1px solid var(--club-line, #dfc796);
  border-bottom: 4px solid var(--club-lattice, #c9b27a);
  border-radius: 4px;
  font:
    700 26px 'Noto Sans SC',
    serif;
}
.style-entry h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.style-entry h2 span {
  font-weight: 400;
  opacity: 0.75;
  margin-left: 6px;
}
.style-entry p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.style-entry .style-facts {
  margin-top: 4px;
  opacity: 0.75;
}
.style-entry .entry-primary {
  white-space: nowrap;
}
@media (max-width: 560px) {
  .style-entry {
    grid-template-columns: 44px 1fr;
  }
  .style-entry .entry-primary {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }
}
#landing-styles p a {
  white-space: nowrap;
}

/* A style's own panel beside the wall: the dora, the sticks and the counter. */
.variant-panel .variant-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}
.variant-panel .variant-lines {
  margin: 4px 0 0;
  font-size: 0.9em;
  opacity: 0.85;
}
.variant-panel .variant-lines span + span::before {
  content: ' · ';
}
.table-toolbar .round-pill .variant-status {
  opacity: 0.85;
}
