:root {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #e8eee9;
  background: #101a18;
  color-scheme: dark;
  font-synthesis: none;
  --green: #164b3f;
  --gold: #e4bc6b;
  --line: #465c52;
  --white: #eceee4;
  --blue: #41759a;
  --red: #b45f53;
  --black: #525969;
  --emerald: #438370;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fffdf6;
  color: inherit;
  padding: 12px 16px;
  border-radius: 9px;
  min-height: 44px;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover:enabled {
  background: #e9eee4;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b68d35;
  outline-offset: 3px;
}
a {
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Georgia, serif;
  font-weight: 400;
}
h2 {
  font-size: 24px;
}
input,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #c6cec1;
  border-radius: 7px;
  background: #fcfcf7;
  color: #223e33;
  min-height: 46px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
button.primary {
  background: var(--green);
  color: #fff7da;
  border-color: var(--green);
}
button.primary:hover:enabled {
  background: #246450;
}
.quiet {
  border-color: transparent;
  background: transparent;
  font-weight: 500;
}
.small {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 30px;
}
.muted,
.fine {
  color: #727b70;
}
.fine {
  font-size: 12px;
  line-height: 1.6;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2.1px;
  color: #857142;
  margin-bottom: 10px;
}
.wordmark {
  font-family: Georgia, serif;
  letter-spacing: 4px;
  text-decoration: none;
  font-size: 25px;
  font-weight: 400;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}
.wordmark span {
  display: block;
  font: 8px system-ui;
  letter-spacing: 2.8px;
  margin-top: 8px;
}
.landing {
  max-width: 1280px;
  margin: auto;
  padding: 32px 48px;
}
.brandbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.intro {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: calc(100vh - 180px);
}
.intro h1 {
  font-size: clamp(44px, 5vw, 70px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin: 26px 0;
}
.intro h1 em {
  color: #956e2e;
  font-weight: 400;
}
.lead {
  max-width: 475px;
  font-size: 17px;
  line-height: 1.8;
  color: #627268;
}
.start-panel {
  padding: 32px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 15px 60px #2342310d;
  display: grid;
  gap: 17px;
}
.start-panel h2 {
  margin: 0;
}
.start-panel .primary {
  display: flex;
  justify-content: space-between;
}
.join {
  display: grid;
  grid-template-columns: 1fr 85px;
  gap: 8px;
}
.start-panel .fine {
  margin: 0;
}
.hero-gems {
  display: flex;
  gap: 36px;
  align-items: center;
  height: 120px;
  padding-left: 20px;
}
.hero-gems .facet {
  width: 72px;
  height: 80px;
  transform: rotate(-14deg);
  filter: drop-shadow(6px 10px 4px #213c3022);
}
.hero-gems .facet:nth-child(2) {
  transform: rotate(12deg) translateY(12px);
  width: 62px;
  height: 72px;
}
.hero-gems .facet:nth-child(3) {
  transform: rotate(-3deg);
  width: 54px;
  height: 64px;
}
.facet {
  display: block;
  background:
    conic-gradient(
      from 30deg,
      #ffffff50,
      #00000024,
      #ffffff60,
      #00000038,
      #ffffff40
    ),
    var(--stone);
  clip-path: polygon(25% 0, 75% 0, 100% 35%, 50% 100%, 0 35%);
}
.white {
  --stone: #d8e1d7;
}
.blue {
  --stone: #4e89b2;
}
.green {
  --stone: #4a9679;
}
.red {
  --stone: #c86d5d;
}
.black {
  --stone: #5f687a;
}
.gold {
  --stone: #dab767;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 11px;
  color: #7c847b;
  line-height: 1.7;
}
.waiting {
  max-width: 580px;
  margin: 50px auto;
  padding: 25px;
}
.waiting h1 {
  font-size: 44px;
}
.room-code {
  font-size: 38px;
  letter-spacing: 8px;
  background: #e2eadd;
  width: 100%;
  margin: 10px 0;
}
.members {
  margin: 24px 0;
}
.members div {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.waiting > .primary {
  width: 100%;
  margin-bottom: 16px;
}
.table-header {
  height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fbfaf4;
}
.round {
  font-size: 12px;
  display: flex;
  gap: 22px;
}
.connection {
  color: #50876c;
  font-size: 10px;
}
.offline {
  color: #c5523d;
}
.table {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 355px;
  gap: 24px;
  padding: 22px 28px;
}
.table-content {
  min-width: 0;
}
.players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.player {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px 1fr 36px;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 11px;
  background: #e9ede3;
}
.player.active {
  border-color: #456b50;
  box-shadow: inset 0 3px #456b50;
}
.player.self {
  background: #fffdf6;
}
.avatar {
  display: grid;
  place-items: center;
  background: #d9dfcf;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  font-family: Georgia;
}
.player-title {
  overflow: hidden;
}
.player-title b {
  font-size: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-title small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  color: #71806c;
}
.player > strong {
  font: 24px Georgia;
}
.player > strong small {
  font: 10px system-ui;
  color: #7d8a78;
}
.player-bonuses {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
}
.gem {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  white-space: nowrap;
}
.gem i {
  background: var(--stone);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  font-style: normal;
  color: #fff;
  text-shadow: 0 1px 2px #0008;
  border: 1px solid #0002;
}
.gem.white i {
  color: #526354;
  text-shadow: none;
}
.gem b {
  font-weight: 650;
}
.section-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.section-caption h2 {
  font: 600 12px system-ui;
  letter-spacing: 0.4px;
  margin: 0;
}
.section-caption > span {
  font-size: 10px;
  color: #7c8475;
}
.nobles {
  margin-bottom: 20px;
}
.noble-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
}
.noble {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px;
  min-width: 0;
  text-align: left;
  background: #ede8d8;
}
.noble-face {
  font-size: 28px;
  color: #a68a4f;
}
.noble b {
  display: block;
  font-size: 9px;
  white-space: nowrap;
  margin-bottom: 7px;
}
.noble b strong {
  margin-left: 7px;
  color: #8e6d2b;
}
.price {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.noble .price {
  gap: 5px;
}
.noble small {
  font-size: 10px;
}
.noble.selected {
  outline: 3px solid #bca065;
}
.market-tabs {
  display: none;
}
.market-row {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.level-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #73806d;
  gap: 5px;
}
.level-label > b {
  font: 26px Georgia;
  color: #7a6741;
}
.level-label > span {
  font-size: 10px;
}
.deck {
  font: 29px Georgia;
  background: repeating-linear-gradient(
    45deg,
    #264e44,
    #264e44 4px,
    #32574b 4px,
    #32574b 5px
  );
  color: #d3bd81;
  min-width: 66px;
  padding: 8px;
  margin-top: 5px;
}
.deck small {
  display: block;
  font: 9px system-ui;
  margin-top: 5px;
}
.deck.selected {
  outline: 3px solid var(--gold);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.card {
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
  position: relative;
  height: 174px;
  padding: 10px 12px 19px;
  background: linear-gradient(145deg, #ffffff, #f0f0e5);
  border: 1px solid #c8d2bd;
  border-top: 4px solid var(--stone);
  box-shadow: 0 3px 0 #bdc8b524;
  overflow: hidden;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.card-top strong {
  font: 28px Georgia;
  color: #3d5240;
  line-height: 1;
}
.card-top strong small {
  display: block;
  font: 7px system-ui;
  letter-spacing: 1px;
  margin-top: 3px;
}
.bonus-icon {
  color: var(--stone);
  font-size: 24px;
  line-height: 1;
  -webkit-text-stroke: 0.5px #263c3155;
}
.bonus-icon small {
  font: 10px system-ui;
  color: #4d664b;
  display: block;
  text-align: right;
}
.card-illustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 25px;
}
.card-illustration .facet {
  width: 32px;
  height: 38px;
  opacity: 0.7;
}
.architecture {
  font-size: 48px;
  opacity: 0.09;
  position: absolute;
  right: 4px;
  bottom: -4px;
}
.card-title {
  font-size: 9px;
  font-weight: 400;
  color: #808975;
}
.card .price {
  gap: 5px;
  flex-wrap: nowrap;
  margin-top: 4px;
}
.card .gem {
  font-size: 12px;
  gap: 2px;
}
.card .gem i {
  width: 17px;
  height: 17px;
  line-height: 16px;
  font-size: 10px;
}
.card .buy-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  font-weight: 500;
  background: #e6eade;
  line-height: 15px;
  color: #727f69;
}
.card.affordable .buy-tag {
  background: #d6e6c8;
  color: #28522d;
}
.card.selected {
  outline: 3px solid var(--gold);
  outline-offset: 0;
  background: #fff9e4;
}
.card:hover:enabled {
  background: #fffaf0;
}
.empty-card {
  justify-content: center;
  align-items: center;
  font-size: 12px;
  box-shadow: none;
  border: 1px dashed #c9cebf;
  background: transparent;
  color: #87927f;
}
.reserved-row {
  margin-top: 24px;
}
.reserved-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
}
.reserved-grid .card {
  height: 155px;
}
.empty-note {
  font-size: 12px;
  color: #89907e;
  line-height: 1.6;
  grid-column: 1/-1;
  margin: 0;
  padding: 15px;
  border: 1px dashed #d0d6c5;
  border-radius: 8px;
}
.history {
  margin: 20px 0;
  font-size: 12px;
}
.history summary {
  cursor: pointer;
  color: #758167;
}
.history ol {
  padding-left: 24px;
  max-height: 250px;
  overflow: auto;
}
.history li {
  margin: 8px 0;
}
.control-panel {
  align-self: start;
  position: sticky;
  top: 14px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 18px;
  box-shadow: 0 8px 35px #3c4e2a06;
}
.control-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.control-caption p {
  margin: 0;
  font-size: 9px;
}
.bank-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}
.token {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 6px 0;
  background: transparent;
  border: 1px solid transparent;
  min-height: 80px;
}
.token i {
  display: grid;
  place-items: center;
  font-size: 23px;
  font-style: normal;
  background: var(--stone);
  border-radius: 50%;
  width: 37px;
  height: 37px;
  border: 3px double #fff9;
  color: #fff;
  text-shadow: 0 1px 3px #0007;
  box-shadow: 0 3px 0 #0002;
}
.token.white i {
  color: #6c7e65;
  text-shadow: none;
}
.token > b {
  position: absolute;
  top: 30px;
  right: 3px;
  border-radius: 50%;
  background: #fcfbf1;
  font-size: 10px;
  min-width: 17px;
  line-height: 17px;
  border: 1px solid #c5ceba;
}
.token small {
  font-size: 8px;
  margin-top: 9px;
  font-weight: 500;
}
.token.selected {
  background: #fff4d6;
  border-color: #d4b464;
}
.picked {
  position: absolute;
  right: 0;
  top: 0;
  background: #cba44d;
  color: #fff;
  font-size: 9px;
  border-radius: 4px;
  padding: 0 2px;
}
.wallet {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.wallet-row {
  display: grid;
  grid-template-columns: 52px repeat(6, 1fr);
  gap: 4px;
  align-items: center;
  margin-top: 10px;
}
.wallet-row > small {
  font-size: 9px;
  color: #818b78;
}
.wallet-row .gem {
  gap: 2px;
  font-size: 11px;
}
.gold-help {
  text-align: center;
  color: #a7ae9d;
  font-size: 16px;
}
.selection-info {
  min-height: 105px;
  background: #f2f3e9;
  padding: 12px;
  border-radius: 8px;
}
.selection-info p {
  font-size: 12px;
  line-height: 1.6;
  min-height: 55px;
  margin-bottom: 0;
}
.selection-info button {
  padding-left: 0;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.actions button {
  font-size: 12px;
  padding: 11px 5px;
}
.save-note {
  font-size: 9px;
  color: #8a917f;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}
.finish {
  padding: 20px;
  background: #ede5cb;
  border: 1px solid #c5ad75;
  border-radius: 12px;
  margin-bottom: 20px;
}
.finish h2 {
  font-size: 28px;
}
.finish p {
  font-size: 12px;
}
.connection.offline {
  color: #a64b35;
}
dialog {
  border: 1px solid #b5bdac;
  background: #fffdf4;
  color: #253c36;
  border-radius: 15px;
  padding: 26px;
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 30px);
  box-shadow: 0 25px 100px #16281b55;
}
dialog::backdrop {
  background: #132e29b8;
  backdrop-filter: blur(5px);
}
#close-dialog {
  display: block;
  margin-left: auto;
  margin-bottom: 14px;
}
dialog h2 {
  font-size: 30px;
}
dialog p,
dialog li {
  font-size: 14px;
  line-height: 1.8;
}
.rules {
  padding-left: 20px;
}
.rules li {
  margin-bottom: 12px;
}
.pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.pay-row > span:nth-child(2) {
  flex: 1;
  font-size: 12px;
}
.pay-row button {
  font-size: 11px;
  padding: 6px;
}
.collection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.collection > span {
  font-size: 12px;
  background: #edf0e5;
  padding: 8px;
  border-radius: 5px;
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  width: max-content;
  background: #214b3f;
  color: white;
  border: 1px solid #94aa7f;
  border-radius: 9px;
  padding: 12px 20px;
  z-index: 100;
  box-shadow: 0 8px 35px #0002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  font-size: 13px;
}
#notice.show {
  opacity: 1;
}
@media (min-width: 1450px) {
  .card {
    height: 190px;
  }
  .card-illustration .facet {
    height: 46px;
    width: 40px;
  }
  .card .gem {
    font-size: 14px;
  }
}
@media (max-width: 1100px) {
  .table {
    grid-template-columns: minmax(0, 1fr) 315px;
    gap: 16px;
    padding: 16px;
  }
  .control-panel {
    padding: 12px;
  }
  .players {
    gap: 5px;
  }
  .player {
    grid-template-columns: 1fr 26px;
    padding: 8px;
  }
  .avatar {
    display: none;
  }
  .player-title small {
    font-size: 8px;
  }
  .card {
    height: 160px;
    padding: 8px 7px 18px;
  }
  .market-row {
    grid-template-columns: 50px 1fr;
    gap: 8px;
  }
  .deck {
    min-width: 44px;
    padding: 6px;
  }
  .card-grid {
    gap: 7px;
  }
  .card .price {
    gap: 3px;
  }
  .card .gem {
    font-size: 10px;
  }
  .card .gem i {
    width: 14px;
    height: 14px;
    line-height: 13px;
    font-size: 9px;
  }
  .noble-face {
    display: none;
  }
  .noble-grid {
    gap: 4px;
  }
  .noble {
    padding: 7px;
  }
  .noble b {
    font-size: 8px;
  }
}
@media (max-width: 760px) {
  .landing {
    padding: 22px;
  }
  .wordmark {
    font-size: 22px;
  }
  .wordmark span {
    font-size: 6px;
    letter-spacing: 2px;
  }
  .brandbar button {
    font-size: 12px;
    padding: 8px;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 35px 0;
  }
  .intro h1 {
    font-size: 45px;
  }
  .lead {
    font-size: 15px;
  }
  .hero-gems {
    display: none;
  }
  .intro section > .muted {
    font-size: 11px;
  }
  .start-panel {
    padding: 23px;
  }
  .table-header {
    height: 50px;
    padding: 8px 12px;
    gap: 8px;
  }
  .table-header .wordmark {
    font-size: 19px;
    letter-spacing: 2px;
  }
  .table-header .quiet {
    padding: 4px 7px;
    font-size: 11px;
  }
  .round {
    font-size: 10px;
    display: block;
    text-align: center;
  }
  .connection {
    font-size: 8px;
    display: block;
  }
  .table {
    display: block;
    padding: 8px 10px 260px;
  }
  .players {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 8px;
    gap: 4px;
  }
  .players:has(.player:last-child:nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .players:has(.player:last-child:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .player {
    grid-template-columns: 1fr 24px;
    gap: 5px;
    padding: 7px;
  }
  .player-title b {
    font-size: 10px;
  }
  .player-title small {
    display: none;
  }
  .player > strong {
    font-size: 21px;
  }
  .player-bonuses {
    gap: 2px;
  }
  .player-bonuses .gem {
    font-size: 9px;
    gap: 1px;
  }
  .player-bonuses .gem i {
    font-size: 8px;
    width: 10px;
    height: 10px;
    line-height: 9px;
    border: 0;
  }
  .player > strong small {
    display: none;
  }
  .nobles {
    margin-bottom: 8px;
  }
  .nobles > .section-caption {
    display: none;
  }
  .noble-grid {
    display: flex;
    gap: 4px;
    overflow: visible;
  }
  .noble {
    flex: 1;
    padding: 5px;
    display: block;
  }
  .noble b {
    font-size: 0;
    margin-bottom: 4px;
  }
  .noble b strong {
    font-size: 10px;
    margin: 0;
  }
  .noble .gem {
    font-size: 9px;
    gap: 1px;
  }
  .noble .gem i {
    width: 12px;
    height: 12px;
    font-size: 8px;
    line-height: 11px;
  }
  .noble .price {
    gap: 3px;
  }
  .market-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    margin-bottom: 8px;
  }
  .market-tabs button {
    font-size: 10px;
    padding: 5px 1px;
    border: 0;
    background: #e6ebdf;
    border-radius: 6px;
    min-height: 36px;
  }
  .market-tabs button[aria-pressed="true"] {
    background: #255746;
    color: #fff;
  }
  .market-row {
    display: none;
  }
  .market-row.chosen-tier {
    display: block;
  }
  .level-label {
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
  }
  .level-label > b,
  .level-label > span {
    display: none;
  }
  .deck {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    margin: 0;
    padding: 3px;
    min-height: 30px;
    border-radius: 5px;
  }
  .deck small {
    font-size: 10px;
    margin: 0;
  }
  .deck:before {
    content: "Резерв из закрытой колоды";
    font: 10px system-ui;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .card {
    height: 135px;
    padding: 8px 10px 18px;
  }
  .card-illustration .facet {
    height: 25px;
    width: 24px;
  }
  .card .gem {
    font-size: 12px;
  }
  .card .gem i {
    width: 17px;
    height: 17px;
    font-size: 10px;
    line-height: 16px;
  }
  .card .price {
    gap: 7px;
  }
  .card-title {
    display: none;
  }
  .card-top strong {
    font-size: 23px;
  }
  .card-top strong small {
    display: none;
  }
  .card-top .bonus-icon {
    font-size: 22px;
  }
  .reserved-row {
    display: none;
    margin-top: 0;
  }
  .market.show-reserved .market-row {
    display: none;
  }
  .market.show-reserved .reserved-row {
    display: block;
  }
  .reserved-grid .card {
    height: 135px;
  }
  .control-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 20;
    border-radius: 14px 14px 0 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    gap: 5px;
    box-shadow: 0 -5px 25px #31412b18;
  }
  .control-caption {
    height: 22px;
  }
  .control-caption .small {
    min-height: 22px;
    font-size: 10px;
  }
  .bank .section-caption {
    display: none;
  }
  .bank-grid {
    gap: 8px;
  }
  .token {
    min-height: 45px;
    height: 45px;
    padding: 0;
  }
  .token i {
    width: 31px;
    height: 31px;
    font-size: 19px;
  }
  .token small {
    font-size: 8px;
    margin-top: 1px;
  }
  .token > b {
    top: 20px;
    right: 8px;
    line-height: 14px;
    font-size: 9px;
    min-width: 14px;
  }
  .wallet {
    padding: 0;
    border: 0;
  }
  .wallet .section-caption,
  .wallet-row:last-child {
    display: none;
  }
  .wallet-row {
    margin: 0;
    grid-template-columns: 42px repeat(6, 1fr);
    height: 22px;
  }
  .wallet-row .gem {
    justify-content: center;
  }
  .wallet-row > small {
    font-size: 9px;
  }
  .selection-info {
    min-height: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 7px;
  }
  .selection-info p {
    font-size: 10px;
    line-height: 14px;
    min-height: 0;
    max-height: 28px;
    overflow: hidden;
    flex: 1;
  }
  .selection-info button {
    font-size: 9px;
    min-width: 62px;
    padding: 1px;
    min-height: 26px;
  }
  .actions {
    gap: 5px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .actions button {
    font-size: 10px;
    min-height: 44px;
    padding: 3px;
    line-height: 14px;
  }
  .save-note {
    display: none;
  }
  .history {
    font-size: 11px;
    margin: 12px 0;
  }
  .finish {
    padding: 12px;
  }
  .finish h2 {
    font-size: 23px;
  }
  .finish p {
    font-size: 11px;
  }
  #notice {
    bottom: 240px;
  }
  .collection {
    grid-template-columns: repeat(2, 1fr);
  }
  dialog {
    padding: 18px;
  }
  .waiting {
    margin: 20px auto;
  }
}
@media (max-width: 760px) and (max-height: 650px) {
  .nobles {
    margin-bottom: 5px;
  }
  .card {
    height: 110px;
  }
  .card-illustration {
    min-height: 15px;
  }
  .card-illustration .facet {
    height: 18px;
    width: 18px;
  }
  .table {
    padding-bottom: 240px;
  }
  .player {
    padding: 5px;
  }
  .table-header {
    height: 44px;
  }
  .control-panel {
    gap: 3px;
  }
  .card-top strong {
    font-size: 19px;
  }
}
/* Dark surfaces and readable states, shared by desktop and mobile layouts. */
a { color: #8ed7b5; }
button { background: #263c33; }
button:hover:enabled { background: #354f43; }
button:disabled { opacity: 0.55; }
button.primary { background: #286b50; border-color: #65aa85; color: #fff5dd; }
button.primary:hover:enabled { background: #347f60; }
input, select { background: #101f1a; color: #e8eee9; border-color: #61766a; }
input::placeholder { color: #a5b6ac; }
.quiet, .wordmark, .token { background: transparent; }
.muted, .fine, .lead, footer, .player-title small, .player > strong small,
.section-caption > span, .level-label, .card-title, .empty-note,
.history summary, .wallet-row > small, .save-note, .bonus-icon small {
  color: #b4c4b9;
}
.eyebrow, .intro h1 em, .level-label > b, .noble-face, .noble b strong {
  color: #e4bc6b;
}
.start-panel, .control-panel, dialog {
  background: #1c2d26;
  color: #e8eee9;
  border-color: var(--line);
  box-shadow: 0 12px 40px #0005;
}
.table-header { background: #17251f; }
.room-code, .avatar, .collection > span { background: #314a3d; }
.player { background: #20332a; }
.player.self { background: #304c3d; }
.player.active { border-color: #8ad9ae; box-shadow: inset 0 3px #8ad9ae; }
.noble, .finish { background: #393322; border-color: #897348; }
.card {
  background: linear-gradient(145deg, #34493e, #24372e);
  border-color: #647a69;
  border-top-color: var(--stone);
  box-shadow: 0 3px 8px #0005;
}
.card-top strong { color: #f1f4e8; }
.card:hover:enabled { background: #405746; }
.card .buy-tag { background: #192b22; color: #c1cec3; }
.card.affordable .buy-tag { background: #326b48; color: #f0ffdf; }
.card.selected, .card.selected:hover:enabled, .token.selected, .token.selected:hover:enabled {
  background: #55482c;
  border-color: var(--gold);
}
.card.selected { border-top-color: var(--stone); }
.empty-card { background: transparent; color: #b4c4b9; }
.empty-note { border-color: #61766a; }
.selection-info { background: #14231c; }
.token > b { background: #14231c; color: #f0f4e9; border-color: #829483; }
.picked { background: #e4bc6b; color: #241c0d; }
.connection { color: #93d7af; }
.offline, .connection.offline { color: #ffa18a; }
.market-tabs button { background: #263c33; }
.market-tabs button[aria-pressed="true"] { background: #347653; color: #fff; }
dialog::backdrop { background: #030a07cc; }

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 760px) {
  .player-bonuses .gem {
    flex-direction: column;
    gap: 0;
    line-height: 10px;
  }
  .player-bonuses .gem i {
    width: 9px;
    height: 9px;
    line-height: 8px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) and (max-height: 500px) {
  .table-header {
    height: 44px;
    padding: 5px 14px;
  }
  .table-header .wordmark {
    font-size: 20px;
  }
  .table {
    grid-template-columns: minmax(0, 1fr) 290px;
    padding: 8px;
    gap: 10px;
  }
  .players {
    margin-bottom: 7px;
  }
  .player {
    padding: 5px;
  }
  .player-title small {
    display: none;
  }
  .player-title b {
    font-size: 10px;
  }
  .player > strong {
    font-size: 18px;
  }
  .player-bonuses .gem {
    font-size: 9px;
  }
  .player-bonuses .gem i {
    width: 10px;
    height: 10px;
    line-height: 9px;
    font-size: 8px;
  }
  .nobles {
    margin-bottom: 7px;
  }
  .nobles > .section-caption {
    display: none;
  }
  .noble {
    padding: 4px;
  }
  .noble b {
    margin-bottom: 2px;
  }
  .noble .gem {
    font-size: 9px;
  }
  .noble .gem i {
    width: 12px;
    height: 12px;
    line-height: 11px;
  }
  .market-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    margin-bottom: 6px;
  }
  .market-tabs button {
    padding: 4px;
    font-size: 10px;
    min-height: 28px;
  }
  .market-tabs button[aria-pressed="true"] {
    background: #255746;
    color: white;
  }
  .market-row {
    display: none;
  }
  .market-row.chosen-tier {
    display: grid;
  }
  .market-row .card {
    height: 143px;
  }
  .level-label {
    gap: 2px;
  }
  .level-label > span {
    display: none;
  }
  .reserved-row {
    display: none;
    margin: 0;
  }
  .market.show-reserved .market-row {
    display: none;
  }
  .market.show-reserved .reserved-row {
    display: block;
  }
  .control-panel {
    padding: 8px;
    gap: 6px;
    top: 4px;
  }
  .control-caption {
    height: 20px;
  }
  .bank .section-caption {
    display: none;
  }
  .token {
    min-height: 48px;
    padding: 1px;
  }
  .token i {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
  .token small {
    font-size: 7px;
    margin-top: 6px;
  }
  .token > b {
    top: 19px;
  }
  .wallet {
    padding-top: 5px;
  }
  .wallet .section-caption {
    display: none;
  }
  .wallet-row {
    margin-top: 4px;
    height: 20px;
  }
  .selection-info {
    min-height: 60px;
    padding: 5px;
  }
  .selection-info p {
    min-height: 26px;
    font-size: 10px;
    line-height: 13px;
  }
  .selection-info button {
    min-height: 22px;
    font-size: 10px;
  }
  .actions {
    gap: 4px;
  }
  .actions button {
    padding: 4px;
    font-size: 11px;
  }
  .save-note {
    display: none;
  }
  .history {
    margin: 8px 0;
  }
}
