.dalmuti {
  --bg: #101c1b;
  --panel: #172725;
  --panel-2: #20322e;
  --line: #35463b;
  --accent: #d9b875;
  --ink: #f0e6d2;
  --dim: #b3b3a0;
  background: radial-gradient(ellipse at 35% 20%, #203831, var(--bg) 70%);
}
.dalmuti .brand {
  letter-spacing: 0.14em;
  font-size: 1.15rem;
}
.dalmuti .bar {
  gap: 20px;
}
.dalmuti .lobby-title h1 {
  font-size: clamp(3.2rem, 6vw, 6.8rem);
  line-height: 1.03;
  max-width: 650px;
}
.dalmuti .lobby-title p {
  max-width: 420px;
}
.dalmuti .lobby-cards {
  margin-top: 35px;
}
.dalmuti .lobby-cards .rank-card {
  position: absolute;
  top: 18px;
  left: 10px;
  width: 118px;
  min-height: 176px;
  transform: rotate(-15deg);
}
.dalmuti .lobby-cards .rank-card:nth-child(2) {
  left: 94px;
  top: 3px;
  transform: rotate(2deg);
}
.dalmuti .lobby-cards .rank-card:nth-child(3) {
  left: 180px;
  top: 18px;
  transform: rotate(17deg);
}
.rank-card {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 108px;
  min-height: 155px;
  padding: 9px;
  border: 1px solid #bca97d;
  border-radius: 9px;
  background: #efe5cf;
  color: #263b32;
  box-shadow: 0 3px 8px #0003;
  font-family: Georgia, serif;
  vertical-align: top;
}
button.rank-card {
  cursor: pointer;
}
.rank-card .rank-corner {
  align-self: flex-start;
  font-size: 1.15rem;
  line-height: 1;
}
.rank-card .rank-mark {
  font-size: 2.6rem;
  line-height: 1;
  color: #806b38;
}
.rank-card .rank-name {
  overflow-wrap: anywhere;
  max-width: 100%;
  font: 600 0.68rem/1.2 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}
.rank-card .rank-foot {
  align-self: flex-end;
  font-size: 1.15rem;
  line-height: 1;
}
.rank-card.jester {
  background: #56364b;
  color: #fff0df;
  border-color: #c492af;
}
.rank-card.jester .rank-mark {
  color: #e8bbd4;
}
.rank-card.selected {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  transform: translateY(-8px);
}
.rank-card:disabled {
  opacity: 0.65;
}
.rank-card.small {
  width: 80px;
  min-height: 116px;
}
.rank-card.small .rank-mark {
  font-size: 2rem;
}
.dalmuti-table {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px;
}
.dalmuti-table > aside {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
}
.dalmuti-table > * {
  min-width: 0;
}
.court-seats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.court-seat {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.court-seat.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 var(--accent);
}
.court-seat.mine {
  background: #263b31;
}
.court-seat .seat-rank {
  color: var(--accent);
  font: 1.4rem Georgia, serif;
  min-width: 23px;
}
.court-seat strong {
  display: block;
  overflow-wrap: anywhere;
}
.court-seat small {
  display: block;
  font-size: 0.75rem;
}
.court-seat.out {
  opacity: 0.6;
}
.court-surface {
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 35px;
  text-align: center;
  background: radial-gradient(ellipse, #2a493a, #1b3029);
}
.court-surface h1 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  margin-bottom: 12px;
}
.court-surface .eyebrow {
  margin-bottom: 18px;
}
.court-pile {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}
.court-surface .waiting {
  padding: 0;
}
.court-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}
.court-hand {
  margin-top: 26px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.court-hand .hand {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  overflow: visible;
  justify-content: flex-start;
}
.court-hand .section-label {
  display: flex;
  justify-content: space-between;
}
.court-hand .rank-card {
  width: 91px;
  min-height: 135px;
}
.court-log {
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.court-log ol {
  margin: 12px 0 0;
  padding-left: 20px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.85rem;
  color: var(--dim);
}
.court-log li {
  padding: 4px 0;
}
.court-standings {
  text-align: left;
  max-width: 420px;
  margin: 24px auto;
}
.court-standings li {
  margin: 9px 0;
}
.dalmuti-table .table-chat {
  margin-top: 22px;
}
.tax-tip {
  max-width: 520px;
  margin: 0 auto;
}
.selection-caption {
  color: var(--dim);
  font-size: 0.875rem;
  min-height: 1.5em;
  margin: 16px 0 0;
}
.games-hub {
  max-width: 1440px;
  margin: auto;
  padding: 65px 40px 30px;
}
.games-hub h1 {
  font-size: clamp(3.5rem, 6vw, 6rem);
  line-height: 1.06;
  margin: 22px 0;
}
.hub-intro {
  font-size: 1.15rem;
  color: var(--dim);
  margin-bottom: 42px;
}
.game-shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.game-tile {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-decoration: none;
  color: var(--ink);
  background: var(--panel);
}
.game-tile:hover {
  border-color: var(--accent);
}
.game-tile h2 {
  font: 2rem Georgia, serif;
  margin: 20px 0 12px;
}
.game-tile p {
  color: var(--dim);
  min-height: 80px;
}
.tile-art {
  position: relative;
  height: 175px;
  border-radius: 7px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  background: #254236;
  overflow: hidden;
}
.tile-crown {
  font: 8rem Georgia, serif;
  color: #d9b875;
}
.tile-number {
  position: absolute;
  bottom: 9px;
  right: 15px;
  font: 1.3rem Georgia, serif;
  opacity: 0.5;
}
.tile-link {
  display: flex;
  justify-content: space-between;
  color: var(--accent);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.uno-tile .tile-art {
  background: #752c25;
}
.tile-uno {
  font: italic 800 4rem system-ui, sans-serif;
  color: #f1cf75;
  transform: rotate(-12deg);
}
.innovation-tile .tile-art {
  background: #303b54;
}
.innovation-tile .tile-crown {
  color: #b6c5e2;
}
@media (max-width: 900px) {
  .dalmuti-table > aside {
    order: 2;
  }
  .dalmuti-table {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }
  .court-seats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .court-seat {
    flex: 1 1 180px;
  }
  .game-shelf {
    grid-template-columns: 1fr;
  }
  .game-tile p {
    min-height: 0;
  }
}
@media (max-width: 520px) {
  .dalmuti .bar {
    gap: 12px;
    padding: 16px;
  }
  .dalmuti .bar > a:last-child {
    font-size: 0.8rem;
  }
  .dalmuti-table {
    padding: 12px;
  }
  .court-surface {
    padding: 24px 15px;
  }
  .court-hand {
    padding: 16px 12px;
  }
  .court-hand .hand {
    gap: 8px;
  }
  .court-hand .rank-card {
    width: 77px;
    min-height: 116px;
  }
  .court-hand .rank-card .rank-mark {
    font-size: 2rem;
  }
  .court-seat {
    flex-basis: 145px;
    font-size: 0.85rem;
  }
  .games-hub {
    padding: 38px 20px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rank-card.selected {
    transform: none;
  }
}

.dalmuti .lobby-panel select {
  width: 100%;
  margin-top: 0;
}
.dalmuti .lobby-panel input + label {
  margin-top: 18px;
}
