:root {
  color-scheme: dark;
  --bg: #0d1111;
  --surface: #141a19;
  --surface-2: #1d2523;
  --surface-3: #25302b;
  --line: rgba(232, 238, 224, 0.14);
  --line-strong: rgba(232, 238, 224, 0.24);
  --text: #f5f2e8;
  --muted: #aeb9ad;
  --accent: #eab85f;
  --accent-2: #8cc084;
  --danger: #d46a6a;
  --felt: #174832;
  --card: #fbf7ec;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  height: 100%;
  max-width: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(234, 184, 95, 0.08), transparent 230px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
.discord-login,
.portal-login {
  font: inherit;
}

button,
.discord-login,
.portal-login {
  min-height: 44px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: #1d1509;
  font-weight: 850;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button:hover:not(:disabled),
.discord-login:hover,
.portal-login:hover {
  filter: brightness(1.05);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.control-hidden {
  display: none !important;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 184, 95, 0.16);
}

.app-shell {
  width: min(1180px, 100%);
  height: 100dvh;
  margin: 0 auto;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  z-index: 30;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin: -12px -12px 8px;
  padding: 8px 12px;
  background: rgba(13, 17, 17, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 238, 224, 0.08);
}

.topbar-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.brand-block {
  min-width: 0;
}

.topbar h1,
.section-head h2,
.table-status h2,
.login-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.18rem, 2.2vw, 1.65rem);
}

body[data-view="table"] .topbar {
  min-height: 48px;
}

body[data-view="table"] .topbar .eyebrow {
  display: none;
}

body[data-view="table"] .top-game-strip {
  display: none;
}

body[data-view="login"] .top-game-strip {
  display: none;
}

body[data-view="table"] .topbar h1 {
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  padding: 0;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
  font-size: 1.5rem;
}

.profile-menu {
  position: relative;
}

.profile-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  padding: 0;
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.profile-button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--accent);
  color: #1d1509;
  font-weight: 950;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 220px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(20, 26, 25, 0.98);
  box-shadow: var(--shadow);
}

.profile-popover strong {
  display: block;
  overflow: hidden;
  margin-bottom: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-popover button {
  width: 100%;
}

.ghost-button,
.game-chip {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.danger {
  color: #ffd4d4;
}

.is-hidden {
  display: none !important;
}

.topbar > .icon-button.is-hidden {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

.profile-button.is-hidden {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

.login-view {
  height: 100%;
  display: grid;
  align-items: center;
}

main,
#lobbyView,
#tableView {
  min-height: 0;
}

main {
  height: 100%;
  overflow: hidden;
}

.login-panel {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(29, 37, 35, 0.98), rgba(20, 26, 25, 0.98));
  box-shadow: var(--shadow);
}

.login-panel h2 {
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  line-height: 1.05;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.login-form label {
  color: var(--muted);
  font-weight: 800;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.discord-login,
.portal-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 22px;
  text-decoration: none;
}

.portal-login {
  background: var(--accent);
  color: #1d1509;
}

.guest-login {
  margin-top: 14px;
}

.guest-login summary {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.guest-login summary:hover,
.guest-login[open] summary {
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.table-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 4px;
}

.table-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.section-head h2,
.table-status h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
}

.table-status h2 {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

#lobbyView > .game-strip {
  display: none;
}

.top-game-strip {
  padding-bottom: 0;
}

.game-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
}

.game-chip.is-active {
  background: rgba(140, 192, 132, 0.18);
  border-color: rgba(140, 192, 132, 0.42);
  color: #d9f4d5;
}

.lobby-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 8px;
  min-width: 0;
}

.lobby-actions button {
  min-height: 38px;
  padding: 0 12px;
}

.krimi-case-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}

.krimi-case-choice {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: rgba(245, 242, 232, 0.06);
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.krimi-case-choice strong,
.krimi-case-choice span,
.krimi-case-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.krimi-case-choice span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.krimi-case-choice small {
  color: rgba(245, 242, 232, 0.82);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: normal;
}

.krimi-case-choice:hover,
.krimi-case-choice:focus-visible,
.krimi-case-choice.is-selected {
  border-color: var(--accent);
  background: rgba(234, 184, 95, 0.12);
  outline: none;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  grid-auto-rows: minmax(98px, 1fr);
  gap: 8px;
  min-height: 0;
}

.lobby-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
}

.lobby-pager span {
  color: var(--muted);
  font-weight: 900;
}

#lobbyView {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.player-stats-panel {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(78px, 0.6fr)) repeat(2, minmax(118px, 1fr));
  align-items: stretch;
  gap: 6px;
  margin: 0 0 8px;
}

.player-stats-title,
.stat-cell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(245, 242, 232, 0.06);
}

.player-stats-title strong,
.stat-cell strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-cell span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-cell strong {
  margin-top: 2px;
  font-size: 1.08rem;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}

.table-card {
  display: grid;
  gap: 7px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(29, 37, 35, 0.96), rgba(20, 26, 25, 0.96));
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.table-card.game-laufspiel {
  border-color: rgba(107, 173, 215, 0.35);
  background: linear-gradient(160deg, rgba(27, 38, 48, 0.96), rgba(19, 27, 31, 0.96));
}

.table-card.game-mensch {
  border-color: rgba(216, 87, 92, 0.38);
  background: linear-gradient(160deg, rgba(42, 29, 34, 0.96), rgba(21, 24, 25, 0.96));
}

.table-card.game-krimi {
  border-color: rgba(190, 151, 89, 0.46);
  background: linear-gradient(160deg, rgba(44, 39, 32, 0.96), rgba(17, 22, 24, 0.96));
}

.table-card.game-einunddreissig {
  border-color: rgba(140, 192, 132, 0.42);
  background: linear-gradient(160deg, rgba(25, 48, 38, 0.96), rgba(17, 22, 24, 0.96));
}

.table-card.game-spider {
  border-color: rgba(98, 166, 210, 0.42);
  background: linear-gradient(160deg, rgba(23, 42, 48, 0.96), rgba(17, 22, 24, 0.96));
}

.table-card.game-klondike {
  border-color: rgba(215, 168, 96, 0.44);
  background: linear-gradient(160deg, rgba(49, 38, 24, 0.96), rgba(17, 22, 24, 0.96));
}

.table-card.game-doppelkopf {
  border-color: rgba(87, 174, 139, 0.42);
  background: linear-gradient(160deg, rgba(24, 43, 37, 0.96), rgba(17, 23, 24, 0.96));
}

.table-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.table-card .status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-pill,
.turn-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(234, 184, 95, 0.15);
  color: #ffd98a;
  font-size: 0.78rem;
  font-weight: 900;
}

.table-view {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 6px;
  height: 100%;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.table-status {
  grid-row: 1;
}

.players-row {
  grid-row: 2;
}

.rules-panel {
  grid-row: 3;
}

.playmat {
  grid-row: 4;
}

.hand-panel {
  grid-row: 5;
}

.message-line {
  display: none;
}

.players-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.player-seat {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 7px;
  background: var(--surface-2);
  color: var(--text) !important;
  font: inherit;
  text-align: left;
  white-space: normal;
}

.player-seat.seat-tone-1 {
  border-color: rgba(198, 63, 82, 0.48);
}

.player-seat.seat-tone-2 {
  border-color: rgba(45, 117, 196, 0.48);
}

.player-seat.seat-tone-3 {
  border-color: rgba(212, 155, 39, 0.5);
}

.player-seat.seat-tone-4 {
  border-color: rgba(63, 155, 95, 0.5);
}

.player-seat.is-active {
  border-color: var(--accent);
  background: rgba(234, 184, 95, 0.12);
}

.player-seat.is-auto {
  border-color: rgba(212, 106, 106, 0.6);
}

.player-seat.can-join,
.player-seat.can-preview {
  cursor: pointer;
}

.player-seat.can-join:hover,
.player-seat.can-join:focus-visible,
.player-seat.can-preview:hover,
.player-seat.can-preview:focus-visible,
.player-seat.is-previewed {
  border-color: var(--accent);
  background: rgba(234, 184, 95, 0.12);
  outline: none;
}

.player-seat strong,
.player-seat span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-seat strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 0.84rem;
}

.player-name,
.player-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name {
  flex: 1 1 auto;
}

.player-meta {
  flex: 0 0 auto;
  color: var(--muted);
}

.table-view[data-game="krimi"] .player-seat,
.table-view[data-game="krimi"] .player-seat strong,
.table-view[data-game="krimi"] .player-name {
  color: var(--text) !important;
}

.table-view[data-game="krimi"] .player-meta {
  color: var(--muted) !important;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  align-items: center;
  gap: 6px;
  width: min(100%, 620px);
  min-width: 0;
}

.table-actions button {
  min-height: 38px;
  padding: 0 12px;
  flex: 0 1 auto;
}

#joinButton {
  min-width: 0;
}

.seat-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 720px);
  flex: 1 1 100%;
  margin: 0 0 2px;
}

.seat-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 42px;
  border-color: var(--line);
  background: rgba(245, 242, 232, 0.06);
  color: var(--text);
}

.seat-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-view[data-game="krimi"] .player-seat strong,
.table-view[data-game="krimi"] .player-seat span {
  white-space: normal;
  line-height: 1.22;
}

.table-view[data-game="krimi"] .players-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seat-choice.is-selected {
  border-color: var(--accent);
  background: rgba(234, 184, 95, 0.16);
  box-shadow: inset 0 0 0 1px rgba(234, 184, 95, 0.22);
}

.seat-choice.is-taken {
  opacity: 0.42;
}

.seat-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 0;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.rules-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 2.1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(20, 26, 25, 0.92);
}

.rules-panel.is-locked {
  opacity: 0.82;
}

.rules-panel strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.rules-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
}

.rule-field,
.rule-toggle,
.rule-static {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.05);
}

.rule-field,
.rule-static {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.rule-field span,
.rule-toggle span,
.rule-static span,
.rule-note {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-static strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-field select {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  outline: none;
}

.rule-field option {
  color: #151712;
}

.rule-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rule-toggle input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
}

.primary-action {
  background: linear-gradient(180deg, #f2c468, #dea94e);
}

.primary-action.is-rolling {
  animation: diceButtonPulse 0.42s ease-in-out infinite;
}

.playmat {
  --table-card-w: clamp(44px, 5vw, 64px);
  --table-pile-w: clamp(46px, 6.1vw, 62px);
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(140, 192, 132, 0.25);
  border-radius: 8px;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%) 0 0 / 28px 28px,
    linear-gradient(120deg, #174832, #123a2a);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.28);
}

.pile-zone {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
  position: relative;
  z-index: 3;
}

.pile {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--table-pile-w) + 4px);
  height: calc(var(--table-pile-w) * 1.395 + 6px);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
  touch-action: manipulation;
}

.pile.discard {
  background: transparent;
  color: #1d1f1b;
}

.pile-count,
.discard-empty {
  position: absolute;
  top: -2px;
  right: 0;
  min-width: 30px;
  min-height: 30px;
  border: 2px solid rgba(245, 242, 232, 0.82);
  border-radius: 999px;
  background: rgba(13, 17, 17, 0.84);
  font-size: 0.95rem;
  font-weight: 950;
  color: #f5f2e8;
  display: grid;
  place-items: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.discard-empty {
  top: 38px;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  font-size: 1.45rem;
}

.pile > span:last-child {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.pile-card-img {
  width: var(--table-pile-w);
  height: calc(var(--table-pile-w) * 1.395);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.melds-area {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  align-items: flex-start;
  gap: 5px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.meld-row {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 4px;
  background: rgba(13, 17, 17, 0.36);
  overflow: hidden;
  scrollbar-width: none;
}

.meld-row .card {
  --card-w: var(--table-card-w);
}

.table-view[data-game="spider"] {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.table-view[data-game="spider"] .players-row {
  grid-template-columns: 1fr;
}

.table-view[data-game="spider"] .playmat {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.table-view[data-game="spider"] .melds-area {
  display: block;
  height: 100%;
  max-height: none;
  overflow: visible;
}

.spider-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 100%;
}

.spider-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
}

.spider-head strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spider-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.spider-stats span,
.spider-foundation {
  border: 1px solid rgba(245, 242, 232, 0.16);
  border-radius: 8px;
  background: rgba(13, 17, 17, 0.28);
}

.spider-stats span {
  min-height: 28px;
  padding: 5px 8px;
}

.spider-piles {
  display: grid;
  grid-template-columns: minmax(64px, 86px) minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
}

.spider-stock,
.spider-foundation {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 78px;
  border: 1px solid rgba(245, 242, 232, 0.16);
  border-radius: 8px;
  padding: 5px;
  background: rgba(13, 17, 17, 0.28);
  color: var(--accent);
  font-weight: 950;
}

.spider-stock {
  color: var(--text);
}

.spider-stock img,
.spider-foundation img {
  width: clamp(38px, 5vw, 52px);
  border-radius: 6px;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.28);
}

.spider-stock span {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(13, 17, 17, 0.86);
  color: #f5f2e8;
  font-size: 0.78rem;
}

.spider-stock strong,
.spider-foundation strong,
.spider-foundation span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.spider-foundations {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.spider-foundation.is-filled {
  border-color: rgba(234, 184, 95, 0.5);
  background: rgba(234, 184, 95, 0.12);
}

.spider-tableau {
  display: grid;
  grid-template-columns: repeat(10, minmax(54px, 1fr));
  gap: 6px;
  min-height: 390px;
}

.spider-column {
  position: relative;
  min-height: 100%;
  border: 1px solid rgba(245, 242, 232, 0.14);
  border-radius: 8px;
  padding: 4px;
  background: rgba(13, 17, 17, 0.18);
  overflow: visible;
  cursor: pointer;
}

.spider-column.is-empty {
  background: rgba(245, 242, 232, 0.07);
}

.spider-column.is-source {
  border-color: rgba(234, 184, 95, 0.65);
  background: rgba(234, 184, 95, 0.1);
}

.spider-column.can-target {
  border-color: rgba(140, 192, 132, 0.68);
  background: rgba(140, 192, 132, 0.14);
  box-shadow: inset 0 0 0 2px rgba(140, 192, 132, 0.18);
}

.spider-column.can-target::after {
  content: "Ziel";
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 30;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(13, 17, 17, 0.82);
  color: #d9f4d5;
  font-size: 0.72rem;
  font-weight: 950;
}

.spider-column:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.spider-card {
  position: absolute;
  left: 50%;
  top: calc(4px + var(--i) * clamp(18px, 3.2dvh, 27px));
  width: clamp(48px, 7.2vw, 74px);
  transform: translateX(-50%);
  border-radius: 8px;
  cursor: pointer;
}

.spider-card .card-img {
  width: 100%;
  height: auto;
}

.spider-card.is-selected .card-img {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-4px);
}

.table-view[data-game="klondike"] .players-row {
  grid-template-columns: 1fr;
}

.table-view[data-game="klondike"] .playmat {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.table-view[data-game="klondike"] .melds-area {
  display: block;
  height: 100%;
  max-height: none;
  overflow: visible;
}

.klondike-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 100%;
}

.klondike-head,
.klondike-piles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.klondike-piles {
  grid-template-columns: 76px 76px minmax(0, 1fr);
}

.klondike-stock,
.klondike-waste,
.klondike-foundation {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px solid rgba(245, 242, 232, 0.16);
  border-radius: 8px;
  padding: 5px;
  background: rgba(13, 17, 17, 0.28);
  color: var(--text);
}

.klondike-stock img,
.klondike-waste img,
.klondike-foundation img {
  width: clamp(48px, 6vw, 62px);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.klondike-stock span,
.klondike-waste span {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(13, 17, 17, 0.86);
  color: #f5f2e8;
  font-size: 0.78rem;
  font-weight: 950;
}

.klondike-waste.is-selected img,
.klondike-card.is-selected .card-img {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-4px);
}

.klondike-foundations {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 6px;
}

.klondike-foundation.can-target,
.klondike-column.can-target {
  border-color: rgba(140, 192, 132, 0.68);
  background: rgba(140, 192, 132, 0.14);
  box-shadow: inset 0 0 0 2px rgba(140, 192, 132, 0.18);
}

.klondike-tableau {
  display: grid;
  grid-template-columns: repeat(7, minmax(68px, 1fr));
  gap: 7px;
  min-height: 390px;
}

.klondike-column {
  position: relative;
  min-height: 100%;
  border: 1px solid rgba(245, 242, 232, 0.14);
  border-radius: 8px;
  padding: 4px;
  background: rgba(13, 17, 17, 0.18);
  cursor: pointer;
}

.klondike-column.is-empty {
  background: rgba(245, 242, 232, 0.07);
}

.klondike-card {
  position: absolute;
  left: 50%;
  top: calc(4px + var(--i) * clamp(22px, 4.1dvh, 33px));
  width: clamp(54px, 8vw, 82px);
  transform: translateX(-50%);
  border-radius: 8px;
  cursor: pointer;
}

.klondike-card .card-img {
  width: 100%;
  height: auto;
}

.meld-label {
  flex: 0 0 auto;
  max-width: 142px;
  margin: 0 6px 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-view[data-game="canasta"] .meld-row {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px 0;
}

.table-view[data-game="canasta"] .meld-label {
  flex-basis: 100%;
  max-width: 100%;
  margin: 0 0 2px;
}

.meld-row.can-attach {
  cursor: pointer;
}

.meld-row.can-attach:hover {
  border-color: rgba(255, 255, 255, 0.42);
}

.thirtyone-panel {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  min-height: 0;
}

.thirtyone-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.thirtyone-head strong {
  display: block;
  font-size: 1.05rem;
}

.thirtyone-head span {
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}

.thirtyone-center {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 112px;
  padding: 10px;
  border: 1px solid rgba(245, 242, 232, 0.16);
  border-radius: 8px;
  background: rgba(13, 17, 17, 0.28);
}

.thirtyone-center .card {
  --card-w: clamp(58px, 7vw, 82px);
}

.thirtyone-status {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(245, 242, 232, 0.14);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(20, 26, 25, 0.72);
}

.thirtyone-status strong,
.thirtyone-status span {
  overflow-wrap: anywhere;
}

.thirtyone-status span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.thirtyone-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.thirtyone-scores div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(20, 26, 25, 0.76);
}

.thirtyone-scores .is-winner {
  border-color: var(--accent);
  background: rgba(234, 184, 95, 0.14);
}

.thirtyone-scores strong,
.thirtyone-scores span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thirtyone-scores span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.doko-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  width: min(820px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
}

.doko-head,
.doko-tricks,
.doko-last {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(13, 17, 17, 0.38);
}

.doko-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.doko-head strong {
  display: block;
}

.doko-trick-count {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.doko-table {
  display: grid;
  grid-template-areas:
    ". top ."
    "left center right"
    ". bottom .";
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.25fr) minmax(120px, 1fr);
  grid-template-rows: minmax(90px, 1fr) minmax(120px, 1.2fr) minmax(90px, 1fr);
  gap: 8px;
  min-height: 0;
  border: 1px solid rgba(87, 174, 139, 0.2);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(87, 174, 139, 0.12), transparent 45%),
    rgba(8, 14, 13, 0.35);
}

.doko-table::before {
  content: "";
  grid-area: center;
  align-self: stretch;
  justify-self: stretch;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.doko-seat {
  display: grid;
  gap: 5px;
  align-content: center;
  justify-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: rgba(20, 26, 25, 0.62);
}

.doko-seat.is-active {
  border-color: rgba(234, 184, 95, 0.58);
  box-shadow: 0 0 0 2px rgba(234, 184, 95, 0.12);
}

.doko-seat-1 { grid-area: bottom; }
.doko-seat-2 { grid-area: left; }
.doko-seat-3 { grid-area: top; }
.doko-seat-4 { grid-area: right; }

.doko-seat strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doko-played-card {
  display: grid;
  place-items: center;
  min-height: 76px;
  color: var(--muted);
  font-weight: 900;
}

.doko-played-card .card-img {
  --card-w: clamp(48px, 5vw, 68px);
  width: var(--card-w);
  height: calc(var(--card-w) * 1.395);
}

.doko-tricks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.doko-tricks div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.doko-tricks strong,
.doko-tricks span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doko-tricks span,
.doko-last {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.doko-last {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
}

.doko-last div {
  display: flex;
  flex-shrink: 0;
}

.doko-mini-card {
  width: 28px;
  height: calc(28px * 1.395);
  border-radius: 4px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

.doko-mini-card + .doko-mini-card {
  margin-left: -12px;
}

.board-panel {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.board-panel.is-finished {
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
}

.board-panel.is-finished .board-head {
  display: none;
}

.board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.board-head strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.krimi-panel {
  display: grid;
  grid-template-rows: auto;
  gap: 10px;
  width: min(1180px, 100%);
  min-height: 100%;
  margin: 0 auto;
  align-content: start;
}

.krimi-briefing,
.krimi-role-card,
.krimi-act-card {
  border: 1px solid rgba(245, 242, 232, 0.15);
  border-radius: 8px;
  background: rgba(13, 17, 17, 0.42);
}

.krimi-briefing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  gap: 14px;
  padding: 14px;
}

.krimi-briefing.is-waiting {
  align-self: center;
}

.krimi-briefing h3,
.krimi-head h3,
.krimi-role-card h4,
.krimi-act-card h4 {
  margin: 0;
  letter-spacing: 0;
}

.krimi-briefing p,
.krimi-role-card p,
.krimi-act-card p {
  color: rgba(245, 242, 232, 0.82);
  line-height: 1.42;
}

.krimi-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.krimi-facts div {
  min-width: 0;
  border: 1px solid rgba(245, 242, 232, 0.1);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.krimi-facts dt,
.krimi-facts dd {
  margin: 0;
}

.krimi-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.krimi-facts dd {
  margin-top: 3px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.25;
}

.krimi-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.krimi-head h3 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.krimi-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.krimi-roster-panel {
  display: grid;
  gap: 8px;
}

.krimi-roster-summary {
  justify-self: start;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
}

.krimi-roster-summary:hover,
.krimi-roster-summary:focus-visible,
.krimi-roster-panel.is-open .krimi-roster-summary {
  border-color: var(--accent);
  background: rgba(234, 184, 95, 0.12);
  outline: none;
}

.krimi-roster-panel.is-open .krimi-roster-summary {
  margin-bottom: 8px;
}

.krimi-roster-summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--accent);
}

.krimi-roster-panel.is-open .krimi-roster-summary::before {
  content: "-";
}

.krimi-roster {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.krimi-roster-panel.is-open .krimi-roster {
  display: grid;
}

.krimi-own-role-content {
  display: none;
  border: 1px solid rgba(234, 184, 95, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(13, 17, 17, 0.42);
}

.krimi-own-role-panel.is-open .krimi-own-role-content {
  display: block;
}

.krimi-roster-role {
  display: grid;
  gap: 3px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(245, 242, 232, 0.06);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.krimi-roster-role:hover,
.krimi-roster-role:focus-visible,
.krimi-roster-role.is-selected {
  border-color: var(--accent);
  background: rgba(234, 184, 95, 0.12);
  outline: none;
}

.krimi-roster-role strong,
.krimi-roster-role span {
  overflow-wrap: anywhere;
  white-space: normal;
}

.krimi-roster-role span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.krimi-roster-role p {
  margin: 4px 0 0;
  color: rgba(245, 242, 232, 0.82);
  font-size: 0.82rem;
  line-height: 1.32;
}

.krimi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.krimi-role-card,
.krimi-act-card,
.krimi-preview-card {
  min-width: 0;
  padding: 14px;
  overflow: visible;
}

.krimi-act-card {
  min-height: clamp(260px, 42dvh, 560px);
}

.krimi-act-card p,
.krimi-act-card .clue-box span {
  font-size: 1rem;
  line-height: 1.55;
}

.krimi-role-card h4,
.krimi-act-card h4,
.krimi-preview-card h4 {
  font-size: 1.1rem;
}

.krimi-role-card.is-before-start {
  border: 1px solid rgba(234, 184, 95, 0.24);
  border-radius: 8px;
  background: rgba(13, 17, 17, 0.42);
}

.krimi-preview-card {
  border: 1px solid rgba(140, 192, 132, 0.22);
  border-radius: 8px;
  background: rgba(140, 192, 132, 0.08);
}

.krimi-preview-card h4 {
  margin: 0;
}

.krimi-preview-card > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 850;
}

.krimi-preview-card p:last-child {
  color: rgba(245, 242, 232, 0.84);
  line-height: 1.42;
}

.secret-box,
.clue-box,
.act-task-box {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  border: 1px solid rgba(234, 184, 95, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(234, 184, 95, 0.08);
}

.secret-box strong,
.clue-box strong,
.act-task-box > strong {
  color: #ffd98a;
}

.secret-box span,
.clue-box span {
  color: var(--text);
  line-height: 1.42;
}

.act-task-box {
  border-color: rgba(140, 192, 132, 0.24);
  background: rgba(140, 192, 132, 0.08);
}

.act-task-box dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.act-task-box dt,
.act-task-box dd {
  margin: 0;
}

.act-task-box dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.act-task-box dd {
  margin-top: 3px;
  color: var(--text);
  line-height: 1.38;
}

.krimi-progress {
  display: grid;
  gap: 8px;
}

.krimi-progress-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.krimi-ready-count {
  color: #d9f4d5;
  font-size: 0.78rem;
  font-weight: 900;
}

.krimi-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.krimi-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid rgba(245, 242, 232, 0.12);
  border-radius: 8px;
  padding: 6px;
  color: rgba(245, 242, 232, 0.46);
  font: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
}

.krimi-step:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.krimi-step.is-open {
  cursor: pointer;
}

.krimi-step.is-open:hover,
.krimi-step.is-open:focus-visible {
  border-color: rgba(140, 192, 132, 0.48);
  background: rgba(140, 192, 132, 0.1);
  outline: none;
}

.krimi-step span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 900;
}

.krimi-step strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.krimi-step.is-open {
  color: var(--text);
}

.krimi-step.is-current {
  border-color: rgba(234, 184, 95, 0.52);
  background: rgba(234, 184, 95, 0.12);
}

.krimi-step.is-viewed {
  box-shadow: inset 0 0 0 2px rgba(245, 242, 232, 0.18);
}

.laufspiel-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  width: min(100%, clamp(190px, calc(100dvh - 300px), 440px));
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
    #16302d;
  box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.24);
}

.table-view[data-game="laufspiel"],
.table-view[data-game="mensch"] {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
}

.table-view[data-game="mensch"] .board-head {
  gap: 8px;
}

.table-view[data-game="mensch"] .board-head .eyebrow {
  display: none;
}

.table-view[data-game="mensch"] .board-head button {
  min-height: 38px;
}

.table-view[data-game="laufspiel"] .melds-area,
.table-view[data-game="mensch"] .melds-area {
  height: 100%;
  align-content: center;
}

.table-view[data-game="laufspiel"] .playmat,
.table-view[data-game="mensch"] .playmat {
  min-height: 0;
  padding: 12px;
}

.table-view[data-game="krimi"] .playmat {
  border-color: rgba(234, 184, 95, 0.3);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(234, 184, 95, 0.09), transparent 210px),
    linear-gradient(120deg, #202421, #101719);
}

.table-view[data-game="krimi"] .melds-area {
  height: auto;
  min-height: 100%;
  max-height: none;
  overflow: visible;
}

.table-view[data-game="mensch"] .playmat {
  border-color: transparent;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.table-view[data-game="laufspiel"] .player-seat,
.table-view[data-game="mensch"] .player-seat {
  min-height: 62px;
}

.board-cell {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(245, 242, 232, 0.13);
}

.track-cell:nth-child(4n + 1) {
  background: rgba(234, 184, 95, 0.22);
}

.mensch-panel {
  width: 100%;
  justify-items: center;
}

.mensch-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  width: min(100%, clamp(300px, calc(100dvh - 370px), 520px));
  aspect-ratio: 1;
  margin: 0 auto;
  border: 2px solid rgba(26, 30, 24, 0.35);
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(90deg, rgba(26, 30, 24, 0.045) 1px, transparent 1px) 0 0 / 9.09% 9.09%,
    linear-gradient(0deg, rgba(26, 30, 24, 0.045) 1px, transparent 1px) 0 0 / 9.09% 9.09%,
    #f3f0df;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.34),
    inset 0 0 0 8px rgba(255, 255, 255, 0.35);
}

.mensch-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.mensch-svg-field,
.mensch-svg-home-slot,
.mensch-svg-goal {
  stroke: rgba(34, 31, 24, 0.34);
  stroke-width: 0.8;
  fill: #fbf8e8;
  filter: drop-shadow(0 0.4px 0 rgba(0, 0, 0, 0.16));
}

.mensch-start-field {
  stroke-width: 1.7;
  fill: #fffdf2;
}

.mensch-start-disc {
  stroke-width: 2.25;
  stroke: rgba(255, 255, 255, 0.88);
  filter: drop-shadow(0 0.7px 1px rgba(0, 0, 0, 0.22));
}

.mensch-start-inner {
  fill: #fffdf2;
  stroke: rgba(34, 31, 24, 0.28);
  stroke-width: 0.55;
}

.mensch-start-arrow {
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 0.45;
}

.mensch-svg-home-base {
  opacity: 0.92;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.mensch-svg-home-slot {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(255, 255, 255, 0.88);
}

.mensch-svg-goal {
  opacity: 0.58;
  stroke: rgba(255, 255, 255, 0.58);
}

.mensch-dice-halo {
  fill: none;
  stroke: rgba(242, 196, 104, 0.9);
  stroke-width: 1.4;
  transform-box: fill-box;
  transform-origin: center;
  animation: diceHaloPulse 0.62s ease-in-out infinite;
}

.mensch-die-token {
  transform-box: fill-box;
  transform-origin: center;
}

.mensch-die-token.is-rolling {
  animation: diceRollAcross var(--dice-roll-duration, 1550ms) cubic-bezier(0.17, 0.86, 0.28, 1) both;
}

.mensch-die-inner {
  transform-box: fill-box;
  transform-origin: center;
}

.mensch-die-token.is-rolling .mensch-die-inner {
  animation: diceTumble 0.38s cubic-bezier(0.28, 0.74, 0.32, 1.02) infinite;
}

.mensch-die-body {
  fill: #fff7df;
  stroke: rgba(34, 31, 24, 0.38);
  stroke-width: 0.85;
  filter:
    drop-shadow(0 1.3px 1.8px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 5px rgba(242, 196, 104, 0.24));
}

.mensch-die-token.is-rolling .mensch-die-body {
  fill: #fff0a6;
  stroke: #dea94e;
  filter:
    drop-shadow(0 2.4px 2.6px rgba(0, 0, 0, 0.36))
    drop-shadow(0 0 7px rgba(242, 196, 104, 0.8));
}

.mensch-die-gloss {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1;
  stroke-linecap: round;
  pointer-events: none;
}

.mensch-die-pip {
  fill: #17160f;
  pointer-events: none;
}

.mensch-die-shadow {
  fill: rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.mensch-die-token.is-rolling .mensch-die-shadow {
  animation: diceShadowPulse 0.38s ease-in-out infinite;
}

.mensch-die-placeholder {
  fill: #11130f;
  font-size: 7px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: middle;
}

.mensch-die-trail {
  pointer-events: none;
}

.mensch-die-arc {
  fill: none;
  stroke: rgba(242, 196, 104, 0.48);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 4 4;
  animation: diceTrailDash var(--dice-roll-duration, 1550ms) ease-out both;
}

.mensch-die-ghost {
  opacity: 0;
}

.mensch-die-ghost-body {
  fill: #fff0a6;
  stroke: rgba(222, 169, 78, 0.7);
  stroke-width: 0.65;
  filter: drop-shadow(0 1px 1.6px rgba(0, 0, 0, 0.24));
}

.mensch-die-ghost-pip {
  fill: rgba(23, 22, 15, 0.86);
}

.mensch-die-ghost.ghost-1 {
  animation: diceGhostOne var(--dice-roll-duration, 1550ms) ease-out both;
}

.mensch-die-ghost.ghost-2 {
  animation: diceGhostTwo var(--dice-roll-duration, 1550ms) ease-out both;
}

.mensch-die-ghost.ghost-3 {
  animation: diceGhostThree var(--dice-roll-duration, 1550ms) ease-out both;
}

.mensch-svg-active {
  fill: #526052;
  font-size: 2.7px;
  font-weight: 850;
  text-anchor: middle;
}

.mensch-svg-pawn {
  cursor: default;
}

.mensch-svg-pawn circle {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.9;
  filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.32));
}

.mensch-svg-pawn text {
  fill: #fff;
  font-size: 3.5px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.mensch-svg-pawn.can-move {
  cursor: pointer;
}

.mensch-svg-pawn.can-move circle {
  stroke: var(--accent);
  stroke-width: 1.5;
  animation: pulsePawn 1.1s ease-in-out infinite;
}

.mensch-svg-home-base.pawn-seat-1,
.mensch-svg-home-slot.pawn-seat-1,
.mensch-svg-goal.pawn-seat-1,
.mensch-svg-pawn.pawn-seat-1 circle {
  fill: #c63f52;
}

.mensch-svg-home-base.pawn-seat-2,
.mensch-svg-home-slot.pawn-seat-2,
.mensch-svg-goal.pawn-seat-2,
.mensch-svg-pawn.pawn-seat-2 circle {
  fill: #2d75c4;
}

.mensch-svg-home-base.pawn-seat-3,
.mensch-svg-home-slot.pawn-seat-3,
.mensch-svg-goal.pawn-seat-3,
.mensch-svg-pawn.pawn-seat-3 circle {
  fill: #d49b27;
}

.mensch-svg-home-base.pawn-seat-4,
.mensch-svg-home-slot.pawn-seat-4,
.mensch-svg-goal.pawn-seat-4,
.mensch-svg-pawn.pawn-seat-4 circle {
  fill: #3f9b5f;
}

.mensch-start-field.start-seat-1 {
  stroke: #c63f52;
}

.mensch-start-field.start-seat-2 {
  stroke: #2d75c4;
}

.mensch-start-field.start-seat-3 {
  stroke: #d49b27;
}

.mensch-start-field.start-seat-4 {
  stroke: #3f9b5f;
}

.mensch-start-disc.pawn-seat-1,
.mensch-start-arrow.pawn-seat-1 {
  fill: #c63f52;
}

.mensch-start-disc.pawn-seat-2,
.mensch-start-arrow.pawn-seat-2 {
  fill: #2d75c4;
}

.mensch-start-disc.pawn-seat-3,
.mensch-start-arrow.pawn-seat-3 {
  fill: #d49b27;
}

.mensch-start-disc.pawn-seat-4,
.mensch-start-arrow.pawn-seat-4 {
  fill: #3f9b5f;
}

.mensch-cell {
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: 82%;
  aspect-ratio: 1;
  border: 2px solid rgba(26, 30, 24, 0.22);
  border-radius: 999px;
  background: radial-gradient(circle at 36% 32%, #ffffff 0 26%, #f7f2de 27% 100%);
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.6);
}

.mensch-start-cell {
  border-width: 2px;
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.6);
}

.mensch-home-dot,
.mensch-goal-dot {
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 999px rgba(255, 255, 255, 0.22),
    inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.mensch-home-dot.is-empty,
.mensch-goal-dot {
  opacity: 0.42;
}

.mensch-goal-dot.is-filled {
  opacity: 1;
  box-shadow:
    inset 0 0 0 999px rgba(255, 255, 255, 0.22),
    0 2px 7px rgba(0, 0, 0, 0.18);
}

.mensch-center {
  z-index: 5;
  grid-row: 6;
  grid-column: 6;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 96%;
  aspect-ratio: 1;
  border: 2px solid rgba(26, 30, 24, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 26%, rgba(234, 184, 95, 0.2), transparent 34%),
    #fffaf0;
  color: #151712;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.mensch-center small {
  display: none;
}

.board-center {
  grid-row: 4 / span 5;
  grid-column: 4 / span 5;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  gap: 5px;
  width: min(100%, 128px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(13, 17, 17, 0.76);
  color: var(--text);
}

.die-face {
  display: grid;
  place-items: center;
  width: clamp(38px, 6vw, 54px);
  height: clamp(38px, 6vw, 54px);
  border-radius: 8px;
  background: #f7f1df;
  color: #151712;
  font-size: 1.6rem;
  font-weight: 950;
}

.mensch-center .die-face {
  width: 74%;
  height: 74%;
  font-size: clamp(1rem, 3vw, 1.45rem);
}

.board-center small {
  width: 100%;
  padding: 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pawn {
  z-index: 2;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: clamp(24px, 6vw, 34px);
  height: clamp(24px, 6vw, 34px);
  min-width: 0;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.32);
}

.mensch-board .pawn {
  z-index: 4;
  width: 82%;
  height: auto;
  aspect-ratio: 1;
  font-size: clamp(0.62rem, 1.9vw, 0.82rem);
}

.pawn:disabled {
  opacity: 1;
}

.pawn.can-move {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  animation: pulsePawn 1.1s ease-in-out infinite;
}

.pawn-seat-1 {
  background: #c63f52;
}

.pawn-seat-2 {
  background: #2d75c4;
}

.pawn-seat-3 {
  background: #d49b27;
}

.pawn-seat-4 {
  background: #3f9b5f;
}

.pawn-yards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pawn-yard {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(13, 17, 17, 0.42);
}

.pawn-yard strong,
.pawn-yard span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pawn-yard span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.yard-pawns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  margin-top: 8px;
}

.yard-pawns .pawn {
  position: static;
}

.yard-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

@keyframes pulsePawn {
  50% {
    transform: scale(1.08);
  }
}

@keyframes diceHaloPulse {
  0% {
    opacity: 0.35;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }

  100% {
    opacity: 0.35;
    transform: scale(0.94);
  }
}

@keyframes diceRollAcross {
  0% {
    transform: translate(-24px, -10px) scale(0.82);
  }

  13% {
    transform: translate(-15px, -22px) scale(1.02);
  }

  27% {
    transform: translate(0, -14px) scale(1.12);
  }

  43% {
    transform: translate(17px, -1px) scale(0.98);
  }

  59% {
    transform: translate(11px, 12px) scale(1.08);
  }

  74% {
    transform: translate(-5px, 7px) scale(1.02);
  }

  89% {
    transform: translate(1px, -1px) scale(1);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes diceTumble {
  0% {
    transform: rotate(-34deg) skewX(0) skewY(0) scale(1);
  }

  22% {
    transform: rotate(72deg) skewX(-8deg) scale(0.9, 1.1);
  }

  46% {
    transform: rotate(184deg) skewY(7deg) scale(1.12, 0.9);
  }

  72% {
    transform: rotate(302deg) skewX(8deg) scale(0.94, 1.07);
  }

  100% {
    transform: rotate(430deg) skewX(0) skewY(0) scale(1);
  }
}

@keyframes diceShadowPulse {
  0%, 100% {
    opacity: 0.16;
    transform: scaleX(0.7);
  }

  48% {
    opacity: 0.34;
    transform: scaleX(1.2);
  }
}

@keyframes diceTrailDash {
  0% {
    opacity: 0;
    stroke-dashoffset: 22;
  }

  18% {
    opacity: 0.85;
  }

  76% {
    opacity: 0.48;
  }

  100% {
    opacity: 0;
    stroke-dashoffset: -28;
  }
}

@keyframes diceGhostOne {
  0%, 20%, 100% {
    opacity: 0;
  }

  32%, 58% {
    opacity: 0.32;
  }
}

@keyframes diceGhostTwo {
  0%, 32%, 100% {
    opacity: 0;
  }

  44%, 70% {
    opacity: 0.24;
  }
}

@keyframes diceGhostThree {
  0%, 48%, 100% {
    opacity: 0;
  }

  62%, 84% {
    opacity: 0.18;
  }
}

@keyframes diceButtonPulse {
  50% {
    filter: brightness(1.12);
    transform: translateY(-1px);
  }
}

.hand-panel {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: rgba(20, 26, 25, 0.98);
  box-shadow: var(--shadow);
}

.hand-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.hand-toolbar strong {
  display: block;
  white-space: nowrap;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.toolbar-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.hand-cards {
  display: flex;
  align-items: flex-end;
  min-height: 98px;
  overflow: hidden;
  overflow-y: visible;
  padding: 18px 6px 10px;
  isolation: isolate;
  scrollbar-width: none;
  -ms-overflow-style: none;
  --card-spacing: 8px;
}

.card {
  --card-w: clamp(50px, 6.2vw, 76px);
  --overlap: clamp(38px, 5.2vw, 56px);
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  height: calc(var(--card-w) * 1.395);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transition: transform 0.12s ease, margin 0.12s ease;
}

.card:disabled {
  cursor: default;
  opacity: 1;
}

.hand-cards .card + .card {
  margin-left: var(--card-spacing);
}

.meld-row .card + .card {
  margin-left: calc(var(--card-w) * -0.68);
}

.meld-row .card:hover:not(:disabled):not(.is-selected) {
  transform: none;
}

.card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover:not(:disabled):not(.is-selected) {
    transform: translateY(-10px);
  }
}

.card-img {
  display: block;
  width: var(--card-w);
  height: calc(var(--card-w) * 1.395);
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.26);
}

.card.is-selected {
  transform: none;
  z-index: auto;
}

.card.is-dragging {
  opacity: 0.55;
}

.card.is-selected .card-img {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.card.must-play-joker .card-img {
  outline: 3px solid var(--danger);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18), 0 10px 24px rgba(0, 0, 0, 0.32);
}

.card.must-play-joker::after {
  content: "Muss raus";
  position: absolute;
  right: -5px;
  bottom: -7px;
  z-index: 2;
  max-width: calc(var(--card-w) + 12px);
  border: 1px solid rgba(127, 29, 29, 0.28);
  border-radius: 999px;
  padding: 2px 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.message-line {
  display: none;
  min-height: 18px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 14px;
  bottom: 14px;
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(234, 184, 95, 0.35);
  border-radius: 8px;
  padding: 12px 14px;
  background: #251f16;
  color: var(--text);
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .topbar {
    margin: -14px -14px 10px;
    padding: 8px 14px;
  }

  .card {
    --card-w: 76px;
    --overlap: 50px;
  }

  .playmat {
    --table-card-w: clamp(72px, 5.6vw, 100px);
    --table-pile-w: clamp(62px, 5.2vw, 92px);
  }

  .thirtyone-center .card {
    --card-w: clamp(72px, 5.6vw, 100px);
  }

  .doko-played-card .card-img {
    --card-w: clamp(68px, 5.2vw, 94px);
  }

  .spider-card {
    width: clamp(60px, 4.7vw, 88px);
  }

  .klondike-card {
    width: clamp(68px, 5.2vw, 96px);
  }

  .klondike-stock img,
  .klondike-waste img,
  .klondike-foundation img {
    width: clamp(62px, 5vw, 88px);
  }
}

@media (max-width: 520px) {
  .card {
    --card-w: 58px;
    --overlap: 46px;
  }

  .hand-cards {
    min-height: 92px;
    padding: 12px 4px 8px;
  }

  .card:hover:not(:disabled),
  .card:focus-visible,
  .card.is-selected {
    transform: none;
  }

  .seat-picker {
    grid-template-columns: 1fr;
    width: min(100%, 280px);
  }
}

@media (max-width: 380px) {
  .card {
    --card-w: 52px;
    --overlap: 43px;
  }
}

@media (max-width: 760px) {
  .players-row,
  .rules-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seat-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pawn-yards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .krimi-grid,
  .krimi-head,
  .krimi-briefing {
    grid-template-columns: 1fr;
  }

  .krimi-facts {
    grid-template-columns: 1fr;
  }

  .krimi-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .krimi-roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .krimi-case-picker {
    grid-template-columns: 1fr;
  }

  .player-stats-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-stats-title,
  .stat-cell-wide {
    grid-column: span 3;
  }

  .doko-table {
    grid-template-columns: minmax(82px, 1fr) minmax(104px, 1.1fr) minmax(82px, 1fr);
    grid-template-rows: minmax(78px, 1fr) minmax(96px, 1.1fr) minmax(78px, 1fr);
    padding: 6px;
  }

  .doko-seat {
    padding: 5px;
  }

  .doko-tricks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doko-last {
    display: none;
  }

  .table-view[data-game="krimi"] .players-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tables-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 8px;
  }

  .topbar {
    grid-template-columns: 38px 1fr 38px;
    min-height: 88px;
    align-items: start;
    margin: -8px -8px 6px;
    padding: 6px 8px;
  }

  body[data-view="table"] .topbar {
    min-height: 42px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .profile-button {
    width: 38px;
    height: 38px;
  }

  .profile-button span {
    width: 24px;
    height: 24px;
  }

  .topbar-main {
    gap: 6px;
  }

  .top-game-strip {
    margin-right: -46px;
  }

  .game-chip {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .topbar .eyebrow {
    display: none;
  }

  .topbar h1 {
    font-size: 1.15rem;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .rules-panel,
  .rules-controls {
    grid-template-columns: 1fr;
  }

  .section-head,
  .table-status {
    align-items: stretch;
    gap: 6px;
  }

  .table-status {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .section-head {
    align-items: center;
    flex-direction: row;
  }

  .section-head .ghost-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .lobby-actions {
    gap: 6px;
  }

  .lobby-actions button {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.8rem;
  }

  .player-stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-stats-title,
  .stat-cell-wide {
    grid-column: span 2;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 5px;
  }

  .toolbar-actions button {
    min-height: 32px;
    padding: 0 6px;
    font-size: 0.78rem;
  }

  .hand-toolbar {
    align-items: center;
    gap: 8px;
  }

  .hand-toolbar > div:first-child {
    min-width: 88px;
    flex: 0 0 88px;
  }

  .playmat {
    min-height: 0;
    padding: 5px;
  }

  .table-status {
    margin-bottom: 4px;
  }

  .table-status h2 {
    font-size: 1.08rem;
  }

  .table-title-row {
    gap: 6px;
  }

  .table-status > div:first-child {
    min-width: 0;
  }

  .table-status .turn-badge {
    flex: 0 0 auto;
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .table-actions {
    justify-content: end;
    width: auto;
    max-width: 46vw;
  }

  .table-actions button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .pile {
    width: 58px;
    height: 76px;
  }

  .pile-card-img {
    width: 50px;
    height: 70px;
  }

  .melds-area {
    gap: 4px;
  }

  .meld-row {
    min-height: 34px;
    padding: 3px;
  }

  .meld-row .card {
    --card-w: 44px;
  }

  .meld-row .card + .card {
    margin-left: calc(var(--card-w) * -0.68);
  }

  .board-head {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.55fr);
  }

  .board-head button {
    width: 100%;
  }

  .laufspiel-board {
    width: min(100%, clamp(190px, calc(100dvh - 330px), 292px));
    padding: 4px;
  }

  .mensch-board {
    width: min(100%, clamp(280px, calc(100dvh - 420px), 330px));
    padding: 4px;
  }

  .die-face {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
  }

  .pawn-yards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .table-view[data-game="laufspiel"] .players-row,
  .table-view[data-game="mensch"] .players-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .table-view[data-game="laufspiel"] .player-seat,
  .table-view[data-game="mensch"] .player-seat {
    min-height: 42px;
    padding: 6px;
  }

  .table-view[data-game="laufspiel"] .player-seat strong,
  .table-view[data-game="mensch"] .player-seat strong {
    font-size: 0.86rem;
  }

  .table-view[data-game="laufspiel"] .player-seat span,
  .table-view[data-game="mensch"] .player-seat span {
    margin-top: 2px;
    font-size: 0.72rem;
  }

  .table-view[data-game="laufspiel"] .table-actions,
  .table-view[data-game="mensch"] .table-actions {
    justify-content: end;
  }

  .seat-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .pawn-yard {
    padding: 7px;
  }

  .yard-pawns {
    min-height: 28px;
    gap: 4px;
  }
}
