.monopoly-body {
  background:
    radial-gradient(rgba(74, 59, 50, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    #eee7db;
}

.monopoly-ambient-die {
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 76px;
}

.monopoly-brand-die {
  background: var(--butter);
  font-size: 17px;
}

.monopoly-main {
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.monopoly-lobby .lobby-copy h1 {
  line-height: 0.9;
}

.monopoly-poster {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.35), transparent 45%),
    #ffd9c7;
}

.monopoly-poster-track {
  position: absolute;
  inset: 38px 11px 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.monopoly-poster-track i {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--paper-2);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.monopoly-poster-track i:nth-child(2) {
  background: var(--butter);
}

.monopoly-poster-track i:nth-child(4) {
  background: var(--mint);
}

.monopoly-poster-dice {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 53%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 2px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 29px;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.monopoly-match-icon {
  font-size: 20px;
}

.monopoly-player-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0 0 10px;
}

.monopoly-player-mode button {
  min-height: 36px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 900;
}

.monopoly-player-mode button.active {
  background: var(--butter);
  color: var(--ink);
  box-shadow: 1px 2px 0 rgba(48, 42, 39, 0.18);
}

.monopoly-waiting {
  background: var(--butter);
}

.monopoly-waiting::before {
  background: var(--butter);
}

.player-token {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.28);
}

.player-token.slot1 {
  background: #ff8fa3;
}

.player-token.slot2 {
  background: #7ed6df;
}

.player-token.slot3 {
  background: #ffd166;
}

.monopoly-token.slot3 {
  background: #ffd166;
}

.players-bar.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.players-bar.is-three .players-vs {
  display: none;
}

.players-bar.is-three .player-card {
  grid-template-columns: 17px 25px minmax(0, 1fr);
  gap: 4px;
  padding: 6px 5px;
}

.players-bar.is-three .player-avatar {
  width: 25px;
  height: 25px;
  font-size: 13px;
}

.players-bar.is-three .player-token {
  width: 16px;
  height: 16px;
}

.players-bar.is-three .player-copy b {
  font-size: 8px;
}

.players-bar.is-three .player-copy small {
  font-size: 6px;
}

.monopoly-stage {
  overflow: visible;
}

.monopoly-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 1;
  padding: 5px;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  background:
    linear-gradient(rgba(74, 59, 50, 0.025) 1px, transparent 1px) 0 0 / 14px 14px,
    #f2e2c8;
}

.monopoly-cell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0.8px solid rgba(74, 59, 50, 0.62);
  background: #fff6e6;
}

.monopoly-cell.property {
  background: var(--cell-fill, #fff6e6);
}

.monopoly-cell.go {
  background: #d8f1df;
}

.monopoly-cell.chance {
  background: #fff1bc;
}

.monopoly-cell.tax {
  background: #ffd8cf;
}

.monopoly-cell.rest {
  background: #ccebf7;
}

.monopoly-cell.owned {
  box-shadow: inset 0 0 0 3px var(--owner-color);
}

.monopoly-cell-name {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 9px;
  z-index: 1;
  font-size: clamp(6px, 1.75vw, 9px);
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  overflow-wrap: anywhere;
}

.monopoly-cell-price {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 11px;
  color: rgba(74, 59, 50, 0.7);
  font-size: clamp(5px, 1.45vw, 8px);
  font-weight: 800;
  text-align: center;
}

.monopoly-cell-icon {
  position: absolute;
  left: 50%;
  top: 43%;
  color: var(--ink);
  font-size: clamp(13px, 4vw, 20px);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.monopoly-levels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  display: flex;
  justify-content: center;
  gap: 2px;
}

.monopoly-levels i {
  width: 4px;
  height: 4px;
  border: 0.5px solid rgba(74, 59, 50, 0.65);
  border-radius: 50%;
  background: rgba(74, 59, 50, 0.14);
}

.monopoly-levels i.on {
  background: var(--owner-color, var(--purple));
}

.monopoly-tokens {
  position: absolute;
  z-index: 4;
  right: 2px;
  top: 2px;
  display: flex;
  gap: 1px;
}

.monopoly-token {
  width: 10px;
  height: 10px;
  display: grid;
  place-items: center;
  border: 0.8px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 5px;
  font-weight: 900;
}

.monopoly-token.slot1 {
  background: #ff8fa3;
}

.monopoly-token.slot2 {
  background: #7ed6df;
}

.monopoly-center {
  grid-row: 2 / 6;
  grid-column: 2 / 6;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 4px;
  padding: 8px;
  border: 1px solid rgba(74, 59, 50, 0.25);
  border-radius: 18px;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 231, 168, 0.72), transparent 34%),
    radial-gradient(circle at 91% 85%, rgba(185, 232, 200, 0.74), transparent 36%),
    rgba(255, 253, 249, 0.9);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.35);
  text-align: center;
}

.monopoly-center-kicker {
  color: var(--purple-deep);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.monopoly-center h2 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--round);
  font-size: clamp(14px, 4.4vw, 21px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monopoly-dice-pair {
  display: flex;
  gap: 8px;
  margin: 1px 0;
}

.monopoly-die {
  width: clamp(28px, 8.5vw, 42px);
  height: clamp(28px, 8.5vw, 42px);
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  box-shadow: 1px 2px 0 rgba(74, 59, 50, 0.2);
  font-family: var(--round);
  font-size: clamp(16px, 5vw, 24px);
  font-weight: 900;
}

.monopoly-dice-pair.is-rolling {
  animation: diceShake 0.12s linear infinite;
}

.monopoly-center-status {
  min-height: 21px;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: clamp(6px, 1.8vw, 9px);
  line-height: 1.35;
  text-overflow: ellipsis;
}

.monopoly-action-primary {
  width: min(100%, 142px);
  min-height: clamp(33px, 9vw, 43px);
  padding: 4px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  box-shadow: 0 3px 0 var(--ink);
  font-size: clamp(8px, 2.4vw, 11px);
  font-weight: 900;
}

.monopoly-action-primary:disabled {
  opacity: 0.42;
  cursor: wait;
  box-shadow: 0 2px 0 rgba(74, 59, 50, 0.3);
}

.monopoly-decision {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 5px;
}

.monopoly-decision p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(6px, 1.8vw, 9px);
}

.monopoly-decision button {
  min-height: 31px;
  padding: 3px;
  border: 1.2px solid var(--ink);
  border-radius: 9px;
  background: var(--butter);
  font-size: 8px;
  font-weight: 900;
}

.monopoly-decision button:last-child {
  background: var(--paper-2);
}

.monopoly-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 7px;
}

.monopoly-progress b {
  color: var(--ink);
  font-size: 8px;
}

.monopoly-side-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 11px;
}

.monopoly-side-actions p {
  min-height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.monopoly-assets {
  display: grid;
  gap: 7px;
  width: 100%;
}

.monopoly-assets span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 253, 249, 0.82);
}

.monopoly-assets small {
  color: var(--muted);
  font-size: 8px;
}

.monopoly-assets b {
  color: var(--ink);
  font-size: 11px;
}

.monopoly-side-actions .text-button {
  width: 100%;
}

@keyframes diceShake {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-2px); }
}

@media (max-width: 360px) {
  .monopoly-center {
    margin: 2px;
    padding: 5px;
    gap: 3px;
  }

  .monopoly-center-kicker {
    display: none;
  }

  .monopoly-cell-name {
    top: 7px;
    font-size: 6px;
  }

  .monopoly-cell-price {
    bottom: 9px;
  }
}
