/* ===== Reihenweise ===== */

.r-table {
  background: radial-gradient(circle at 50% 0%, #3a2238 0%, #22183a 85%);
}

/* Reihen */
.r-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.r-row {
  --r-w: min(calc((100vw - 124px) / 6), 60px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.r-row-head {
  width: 30px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.r-row-head strong {
  font-size: 1.05rem;
}
.r-row-head small {
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.r-row-cards {
  display: flex;
  gap: 4px;
}
.r-row.full .r-card.sixth {
  border-color: var(--bad);
  color: var(--bad);
  opacity: 0.9;
}
.r-row.can {
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--accent);
}
.r-row.can:hover {
  background: rgba(255, 184, 48, 0.15);
}
.r-row:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.r-row.taken {
  animation: r-flash 0.7s ease-out;
}
@keyframes r-flash {
  0% { background: rgba(255, 93, 115, 0.45); }
  100% { background: rgba(0, 0, 0, 0.18); }
}

/* Karten */
.r-card {
  width: var(--r-w, 52px);
  height: calc(var(--r-w, 52px) * 1.38);
  border-radius: 8px;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3px 2px 5px;
  flex: none;
  user-select: none;
  color: #2a1a10;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.5), transparent 60%), var(--r-bg, #f4ead6);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.r-card i {
  font-style: normal;
  font-size: calc(var(--r-w, 52px) * 0.19);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -1px;
}
.r-card b {
  font-size: calc(var(--r-w, 52px) * 0.42);
  font-weight: 800;
  line-height: 1;
  margin-bottom: auto;
  margin-top: auto;
}
.r-card.h1 { --r-bg: #f4ead6; }
.r-card.h2 { --r-bg: #f7d56e; }
.r-card.h3 { --r-bg: #f59a4c; }
.r-card.h5 { --r-bg: #e2434f; color: #fff6ef; }
.r-card.h7 { --r-bg: #6d2bb3; color: #fff6ef; }
.r-card.h7 { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 2px #f7d56e; }

.r-card.empty {
  background: transparent;
  box-shadow: none;
  border: 2px dashed rgba(255, 255, 255, 0.1);
}
.r-card.sixth {
  background: transparent;
  box-shadow: none;
  border: 2px dashed rgba(255, 93, 115, 0.35);
  justify-content: center;
  font-size: calc(var(--r-w, 52px) * 0.36);
  opacity: 0.45;
}
.r-card.fresh {
  animation: r-land 0.5s ease-out;
}
@keyframes r-land {
  0% { transform: translateY(-16px) scale(1.15); }
  100% { transform: none; }
}

/* Aufgedeckte Karten des Zugs */
.r-revealed {
  --r-w: 42px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}
.r-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 64px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.r-reveal small {
  font-size: 0.7rem;
  color: var(--text-dim);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.r-reveal.mine small {
  color: var(--accent);
  font-weight: 700;
}
.r-reveal.done {
  opacity: 0.3;
}
.r-reveal.now {
  transform: translateY(-4px);
}
.r-reveal.now .r-card {
  box-shadow: 0 0 0 3px var(--accent), 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Hand */
.r-hand {
  --r-w: min(calc((100vw - 110px) / 5), 58px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.r-hand .r-card.can {
  cursor: pointer;
}
.r-hand .r-card.can:hover {
  transform: translateY(-3px);
}
.r-hand .r-card.picked {
  transform: translateY(-8px);
  box-shadow: 0 0 0 3px var(--accent), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.r-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.r-hint {
  margin: 10px 0 0;
  text-align: center;
}

/* Mitspielende */
.r-players {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.r-players li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-input);
}
.r-players li.you {
  outline: 2px solid rgba(255, 184, 48, 0.5);
}
.r-players li > span:last-child {
  white-space: nowrap;
}
#rround-card .primary {
  margin-top: 12px;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .r-card.fresh,
  .r-row.taken {
    animation: none;
  }
}
