* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 15%, #fff7ad 0 12%, transparent 13%),
    radial-gradient(circle at 85% 10%, #b3e5ff 0 10%, transparent 11%),
    linear-gradient(135deg, #e0f2fe, #fff7ed 55%, #fef3c7);
  color: #1f2937;
}

body.game-active {
  overflow: hidden;
}

.build-badge {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 999;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172aee, #1d4ed8ee);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 10px 24px #0f172a33;
  pointer-events: none;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: #2563eb;
  color: white;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px #2563eb33;
}

button:hover {
  transform: translateY(-1px);
  background: #1d4ed8;
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  background: #f59e0b;
  box-shadow: 0 8px 18px #f59e0b33;
}

.secondary-button:hover {
  background: #d97706;
}

.small-button {
  width: auto;
  font-size: 15px;
  padding: 10px 14px;
  background: #ef4444;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
}

.start-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero-card {
  width: min(680px, 100%);
  text-align: center;
  padding: 44px;
  border-radius: 32px;
  background: #ffffffdd;
  box-shadow: 0 24px 80px #00000022;
  border: 4px solid #fbbf24;
}

.hero-icon {
  font-size: 72px;
}

.hero-card h1 {
  margin: 10px 0;
  font-size: 48px;
}

.hero-card p {
  font-size: 18px;
  color: #64748b;
}

.player-select {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 22px auto 4px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafccc;
  box-shadow: inset 0 2px 8px #00000010;
}

.player-select span {
  font-weight: 900;
  color: #475569;
}

.player-select label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px #00000012;
}

.player-select input {
  accent-color: #2563eb;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.game-screen {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(840px, 1fr) 370px;
  gap: 8px;
  padding: 6px 8px;
  justify-content: stretch;
  align-items: start;
  overflow: hidden;
}

.mobile-tip {
  display: none;
}

h1, h2, p {
  margin-top: 0;
}

.title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.top-actions .small-button {
  min-width: 72px;
}

.sound-button { background: #7c3aed; }
.guide-button { background: #f59e0b; }
.settings-button { background: #334155; }

.floating-text-layer {
  position: sticky;
  top: 12px;
  z-index: 10;
  height: 0;
  pointer-events: none;
}

.floating-text {
  width: fit-content;
  max-width: 320px;
  margin: 0 auto 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  box-shadow: 0 8px 18px #00000030;
  animation: float-money 1.2s ease forwards;
}

.floating-text.gain {
  background: linear-gradient(145deg, #22c55e, #15803d);
}

.floating-text.loss {
  background: linear-gradient(145deg, #ef4444, #991b1b);
}

.floating-text.bonus {
  background: linear-gradient(145deg, #facc15, #d97706);
  color: #451a03;
}

.coin-transfer {
  width: fit-content;
  max-width: min(520px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 8px;
  align-items: center;
  margin: 0 auto 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fffffff2;
  border: 1px solid #fde68a;
  color: #0f172a;
  font-weight: 950;
  box-shadow: 0 18px 42px #0f172a24;
  animation: coin-transfer-fly 1.65s cubic-bezier(.2, 1, .25, 1) forwards;
}

.coin-transfer-coins {
  color: #b45309;
  animation: coin-wiggle .5s ease-in-out infinite alternate;
}

.coin-transfer-arrow {
  color: #2563eb;
}

.coin-transfer small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 11px;
  text-align: center;
  line-height: 1;
}

@keyframes coin-transfer-fly {
  0% { opacity: 0; transform: translateY(24px) scale(.92); }
  18% { opacity: 1; transform: translateY(0) scale(1.03); }
  72% { opacity: 1; transform: translateY(-6px) scale(1); }
  100% { opacity: 0; transform: translateY(-34px) scale(.98); }
}

@keyframes coin-wiggle {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-2px) rotate(2deg); }
}

.event-banner {
  width: min(420px, calc(100vw - 32px));
  margin: 0 auto 10px;
  padding: 12px 16px;
  border-radius: 16px;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 12px 30px #00000028;
  animation: banner-pop 1.8s ease forwards;
}

.event-banner.good {
  background: linear-gradient(145deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.event-banner.bonus {
  background: linear-gradient(145deg, #fef3c7, #fdba74);
  color: #7c2d12;
}

.event-banner.danger {
  background: linear-gradient(145deg, #fecaca, #fca5a5);
  color: #7f1d1d;
}

@keyframes banner-pop {
  0% { opacity: 0; transform: translateY(-16px) scale(.96); }
  12% { opacity: 1; transform: translateY(0) scale(1.02); }
  82% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(.98); }
}

@keyframes float-money {
  0% { opacity: 0; transform: translateY(20px) scale(.9); }
  15% { opacity: 1; transform: translateY(0) scale(1.05); }
  100% { opacity: 0; transform: translateY(-48px) scale(1); }
}

.save-button { background: #16a34a; }
.load-button { background: #0ea5e9; }
.clear-button { background: #64748b; }

.subtitle {
  color: #64748b;
}

.panel-header-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-filter {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  color: #334155;
}

.log-entry.action-turn {
  border-left: 4px solid #3b82f6;
  padding-left: 10px;
}

.log-entry.action-asset {
  border-left: 4px solid #10b981;
  padding-left: 10px;
}

.log-entry.action-trade {
  border-left: 4px solid #f59e0b;
  padding-left: 10px;
}

.board-wrap {
  position: relative;
  width: min(840px, calc(100vh - 76px), 100%);
  max-width: min(840px, 100%);
  aspect-ratio: 1 / 1;
  display: block;
  flex: 0 0 auto;
  margin: 0 auto;
  padding: 22px;
  background:
    linear-gradient(0deg, #fff7ed18 0 14%, transparent 14% 86%, #dbeafe20 86% 100%),
    linear-gradient(90deg, #f3e8ff18 0 14%, transparent 14% 86%, #fef9c320 86% 100%);
  border-radius: 34px;
}

.district-ribbon {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffffa8, #eef6ff70);
  border: 1px solid #ffffff90;
  box-shadow: 0 4px 10px #0f172a0a;
  color: #1e3a8a;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .08em;
  pointer-events: none;
  opacity: .72;
}

.ribbon-south { left: 50%; bottom: 2px; transform: translateX(-50%); }
.ribbon-north { left: 50%; top: 2px; transform: translateX(-50%); }
.ribbon-west,
.ribbon-east { display: none; }

.board-wrap::after {
  content: "娱乐街区    ·    高价资产区";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  color: #1e3a8a;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .28em;
  opacity: .12;
  pointer-events: none;
  white-space: nowrap;
}

.board {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: repeat(9, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 6px;
  z-index: 2;
}

.board-center {
  position: absolute;
  inset: 29% 29%;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 32px;
  border: 2px solid #ffffffcc;
  background:
    radial-gradient(circle at 50% 35%, #ffffff, #dbeafe 44%, #bfdbfe 72%, #93c5fd);
  box-shadow: inset 0 0 0 2px #ffffff88, 0 18px 42px #1d4ed822;
  overflow: hidden;
}

.city-sandbox {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 48%, #fef3c7 0 16%, transparent 17%),
    linear-gradient(135deg, transparent 45%, #ffffffaa 45% 55%, transparent 55%),
    linear-gradient(45deg, transparent 45%, #ffffff7a 45% 55%, transparent 55%),
    linear-gradient(180deg, #f8fbff, #bfdbfe);
}


.city-road {
  position: absolute;
  background: #ffffffaa;
  box-shadow: 0 0 0 1px #bfdbfe;
}

.city-road.road-a {
  left: 12%;
  right: 12%;
  top: 50%;
  height: 10px;
  transform: rotate(32deg);
  border-radius: 999px;
}

.city-road.road-b {
  top: 12%;
  bottom: 12%;
  left: 50%;
  width: 10px;
  transform: rotate(32deg);
  border-radius: 999px;
}

.city-tower {
  position: absolute;
  bottom: 32%;
  width: 34px;
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, #ffffff, #60a5fa);
  box-shadow: inset 0 0 0 2px #ffffffcc, 0 14px 24px #1d4ed838;
}

.tower-bank { left: 31%; height: 82px; background: linear-gradient(180deg, #fff7ed, #f59e0b); }
.tower-gold { left: 48%; height: 108px; background: linear-gradient(180deg, #fef9c3, #eab308); }
.tower-blue { left: 65%; height: 74px; background: linear-gradient(180deg, #eff6ff, #3b82f6); }


.city-park {
  position: absolute;
  left: 18%;
  bottom: 18%;
  width: 56px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, #bbf7d0, #22c55e);
  box-shadow: 0 8px 18px #16a34a30;
}

.city-plaza {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  padding: 7px 14px;
  border-radius: 999px;
  background: #ffffffe6;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 1000;
  box-shadow: 0 12px 24px #0f172a18;
  white-space: nowrap;
}


.center-logo {
  font-size: 46px;
}

.board-center h2 {
  margin: 8px 0;
}

.board-center p {
  color: #92400e;
  margin: 0;
}

.tile {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid #d1d5db;
  border-radius: 15px;
  background: #ffffffee;
  padding: 6px;
  box-shadow: 0 7px 16px #0f172a18, inset 0 1px 0 #ffffffd8;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  display: grid;
  place-items: center;
}

.tile.empty {
  visibility: hidden;
}

.tile.start {
  background: linear-gradient(145deg, #dcfce7, #86efac);
  border-color: #22c55e;
}
.tile.land { background: #ffffffee; }
.tile.chance {
  background: radial-gradient(circle at 50% 22%, #fff7ed, #fef3c7 48%, #f59e0b);
  border-color: #f59e0b;
}
.tile.fate {
  background: radial-gradient(circle at 50% 22%, #faf5ff, #ede9fe 48%, #8b5cf6);
  border-color: #8b5cf6;
}
.tile.tax {
  background: repeating-linear-gradient(135deg, #fee2e2 0 10px, #ffe4e6 10px 20px);
  border-color: #ef4444;
}
.tile.station {
  background: linear-gradient(145deg, #e0f2fe, #bae6fd);
  border-color: #0ea5e9;
}
.tile.utility {
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  border-color: #3b82f6;
}
.tile.rest {
  background: radial-gradient(circle at 50% 30%, #fef9c3, #ecfccb 55%, #84cc16);
  border-color: #84cc16;
}

.tile.landmark-0 {
  background: radial-gradient(circle at 50% 28%, #ffffff, #bbf7d0 45%, #22c55e);
  border-color: #16a34a;
}

.tile.landmark-0::before {
  content: "START";
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 0;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .12em;
  color: #14532d;
  opacity: .42;
}

.tile.landmark-9 {
  background: radial-gradient(circle at 50% 30%, #ffffff, #fef08a 48%, #84cc16);
  border-color: #65a30d;
}

.tile.landmark-9::before {
  content: "P";
  position: absolute;
  right: 9px;
  bottom: 7px;
  z-index: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #ffffff99;
  color: #3f6212;
  font-weight: 1000;
  box-shadow: inset 0 0 0 2px #bef264;
}

.tile.landmark-16 {
  background: repeating-linear-gradient(135deg, #fff1f2 0 10px, #fecdd3 10px 20px);
  border-color: #ef4444;
}

.tile.landmark-16::before {
  content: "TAX";
  position: absolute;
  right: 7px;
  bottom: 8px;
  z-index: 0;
  color: #991b1b;
  font-size: 11px;
  font-weight: 1000;
  opacity: .48;
}

.tile.landmark-24 {
  background: radial-gradient(circle at 50% 28%, #ffffff, #dbeafe 48%, #3b82f6);
  border-color: #2563eb;
}

.tile.landmark-24::before {
  content: "HUB";
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 0;
  font-size: 11px;
  color: #1e3a8a;
  font-weight: 1000;
  opacity: .46;
}

.tile.corner-node {
  z-index: 4;
  transform: none;
  border-width: 2px;
  border-radius: 22px;
  padding: 7px 6px 6px;
  box-shadow: inset 0 0 0 2px #ffffffaa, 0 16px 32px #0f172a26;
}

.tile.corner-node .tile-icon {
  transform: scale(1.16);
}

.tile.corner-node .tile-name {
  font-size: 13px;
}

.tile.side-south { border-bottom-width: 3px; }
.tile.side-west { border-left-width: 3px; }
.tile.side-north { border-top-width: 3px; }
.tile.side-east { border-right-width: 3px; }

.tile.group-food { --district: #f97316; }
.tile.group-culture { --district: #22c55e; }
.tile.group-fun { --district: #8b5cf6; }
.tile.group-business { --district: #ef4444; }
.tile.group-gold { --district: #eab308; }
.tile.group-art { --district: #ec4899; }
.tile.group-sky { --district: #06b6d4; }

.tile.land {
  border-color: color-mix(in srgb, var(--district, #cbd5e1) 65%, #ffffff);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--district, #e2e8f0) 14%, #ffffff), #ffffffee),
    #ffffff;
}

.tile.land::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 7px;
  height: 5px;
  border-radius: 999px;
  background: var(--district, #cbd5e1);
  box-shadow: 0 0 10px color-mix(in srgb, var(--district, #cbd5e1) 42%, transparent);
  z-index: 0;
}

.tile.land::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 16px;
  height: 16px;
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--district, #94a3b8) 55%, #ffffff), var(--district, #94a3b8));
  box-shadow: -9px 4px 0 -4px color-mix(in srgb, var(--district, #94a3b8) 65%, #ffffff), 0 4px 10px #0f172a18;
  opacity: .12;
  z-index: 0;
}

.tile.monopoly-tile::after {
  opacity: .42;
}

.tile.chance::before,
.tile.fate::before {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 24px;
  height: 32px;
  border-radius: 7px;
  background: #ffffff62;
  transform: rotate(-10deg);
  box-shadow: 7px 4px 0 -2px #ffffff4d, 13px 8px 0 -4px #ffffff33, 0 8px 14px #0f172a10;
  z-index: 0;
}

.tile.station::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #0369a166 0 10px, #ffffff99 10px 15px);
  box-shadow: 0 -12px 0 -2px #38bdf833;
  z-index: 0;
}

.tile.utility::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #2563eb44;
  transform: translateX(-50%);
  box-shadow: 0 -9px 0 #60a5fa33, 0 -18px 0 #93c5fd26;
  z-index: 0;
}

.color-bar {
  height: 5px;
  border-radius: 999px;
  margin-bottom: 2px;
}

.tile-icon {
  position: absolute;
  z-index: 4;
  left: 5px;
  top: 5px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #ffffffe0;
  box-shadow: 0 3px 8px #0f172a10;
  font-size: 11px;
  line-height: 1;
  opacity: .92;
  pointer-events: none;
}

.tile-name {
  position: relative;
  z-index: 5;
  font-weight: 1000;
  font-size: 13px;
  line-height: 1.12;
  margin: 0;
  overflow: visible;
  white-space: normal;
  display: block;
  color: #0f172a;
  text-shadow: 0 1px 0 #ffffff, 0 0 8px #ffffff;
}

.tile-info {
  position: relative;
  z-index: 5;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 900;
  color: #334155;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 #ffffff, 0 0 8px #ffffff;
}

.owner-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}

.owner-badge.p1 { background: #ef4444; }
.owner-badge.p2 { background: #3b82f6; }

.mortgage-badge {
  position: absolute;
  right: 6px;
  top: 32px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #64748b;
  color: white;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 3px 8px #00000025;
}

.monopoly-badge {
  position: absolute;
  left: 6px;
  top: 32px;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(145deg, #facc15, #f59e0b);
  color: #451a03;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 3px 8px #00000025;
}

.house-icons {
  position: absolute;
  right: 6px;
  bottom: 34px;
  font-size: 15px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #ffffffcc;
  box-shadow: 0 2px 8px #00000018;
}

.build-stack {
  right: 5px;
  bottom: 4px;
  z-index: 4;
  display: flex;
  align-items: end;
  gap: 2px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.build-stack i {
  display: block;
  width: 6px;
  height: calc(8px + var(--h) * 4px);
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(180deg, #ffffff, #f59e0b);
  border: 1px solid #ffffff;
  box-shadow: 0 4px 8px #0f172a22;
}

.tokens {
  position: absolute;
  left: 7px;
  bottom: 7px;
  display: flex;
  gap: 4px;
}

.token {
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 45% 45%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 1000;
  border: 2px solid white;
  transition: transform 160ms ease;
  box-shadow: 0 7px 0 #00000022, 0 12px 18px #00000030, inset 0 2px 0 #ffffff66;
  transform: perspective(120px) rotateX(14deg);
}

.tile:has(.token) {
  outline: 3px solid #facc15;
  outline-offset: -5px;
}

.token.p1 { background: #ef4444; }
.token.p2 { background: #3b82f6; }
.token.p3 { background: #22c55e; }
.token.p4 { background: #a855f7; }

.player-token-inline {
  display: inline-block;
  margin-right: 4px;
  filter: drop-shadow(0 3px 2px #00000022);
}

.right-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  max-height: calc(100vh - 12px);
  overflow-y: auto;
  padding-right: 2px;
}


.hud-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.turn-card {
  position: sticky;
  top: 12px;
  z-index: 3;
}

.compact-card #players {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.compact-card .player-row {
  margin-bottom: 0;
  font-size: 13px;
}

.data-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab-button {
  padding: 10px;
  font-size: 15px;
  background: #64748b;
  box-shadow: 0 4px 0 #334155, 0 8px 12px #00000018;
}

.tab-button.active {
  background: #2563eb;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card {
  background: #ffffffdd;
  border-radius: 14px;
  padding: 11px;
  box-shadow: 0 6px 18px #00000012;
}

.current-player {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
  border: 1px solid #bfdbfe;
}

.current-player-meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}

.current-player-tip {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 900;
}

.current-player.tone-good {
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
  border-color: #86efac;
}

.current-player.tone-bonus {
  background: linear-gradient(145deg, #fef3c7, #fff7ed);
  border-color: #fbbf24;
}

.current-player.tone-warn {
  background: linear-gradient(145deg, #fff7ed, #ffffff);
  border-color: #fdba74;
}

.current-player.tone-danger {
  background: linear-gradient(145deg, #fee2e2, #ffffff);
  border-color: #f87171;
}

.current-player.tone-neutral {
  background: linear-gradient(145deg, #f8fafc, #ffffff);
  border-color: #cbd5e1;
}

.tile-plate {
  position: relative;
  z-index: 3;
  width: 100%;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 5px 2px 3px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 50%, #ffffffd8, #ffffff55 70%, transparent 100%);
  border: 0;
  box-shadow: none;
  text-align: center;
  backdrop-filter: none;
  transform: translateY(3px);
}

.tile.chance .tile-plate,
.tile.fate .tile-plate,
.tile.rest .tile-plate,
.tile.start .tile-plate {
  background: radial-gradient(circle at 50% 50%, #ffffffdf, #ffffff60 70%, transparent 100%);
}

.tile-top-meta,
.tile-bottom-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}

.tile-type-chip,
.tile-index-chip,
.tile-price-chip,
.tile-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 13px;
  max-width: 100%;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tile-type-chip {
  background: #e2e8f0;
  color: #334155;
}

.tile-type-chip.type-land { background: #dbeafe; color: #1d4ed8; }
.tile-type-chip.type-station { background: #fee2e2; color: #b91c1c; }
.tile-type-chip.type-utility { background: #dcfce7; color: #15803d; }
.tile-type-chip.type-chance { background: #fef3c7; color: #b45309; }
.tile-type-chip.type-fate { background: #ede9fe; color: #6d28d9; }
.tile-type-chip.type-tax { background: #ffe4e6; color: #be123c; }
.tile-type-chip.type-rest { background: #fef9c3; color: #a16207; }
.tile-type-chip.type-start { background: #cffafe; color: #0f766e; }

.tile-index-chip {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.tile-badge-stack {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  gap: 2px;
  justify-items: end;
  z-index: 4;
  pointer-events: none;
}

.tile-price-chip {
  display: none;
}

.tile-status-chip.is-free { background: #ecfdf5; color: #15803d; }
.tile-status-chip.is-owned { background: #dbeafe; color: #1d4ed8; }
.tile-status-chip.is-mortgaged { background: #fee2e2; color: #b91c1c; }

.player-seat-card {
  position: relative;
  padding: 14px;
  border-radius: 18px;
  border-left-width: 0;
  overflow: hidden;
}

.player-seat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #ffffff3d, transparent 30%);
}

.player-seat-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.seat-chip,
.seat-mode-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.seat-chip {
  color: #fff;
}

.seat-chip.p1 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.seat-chip.p2 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.seat-chip.p3 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.seat-chip.p4 { background: linear-gradient(135deg, #a855f7, #7c3aed); }

.seat-mode-chip {
  background: #ffffffcc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.player-avatar-wrap {
  position: relative;
}

.player-main-info {
  display: grid;
  gap: 4px;
}

.player-main-info strong {
  font-size: 16px;
  color: #0f172a;
}

.player-main-info small {
  color: #64748b;
  font-weight: 700;
}

.rich-grid span {
  padding: 10px 8px;
  border-radius: 14px;
  background: #ffffffba;
  border: 1px solid #e2e8f0;
}

.player-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.player-mini-tags span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffffca;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.tab-panel,
.leaderboard-row,
.log-entry,
.action-entry,
.asset-player-block,
.asset-item {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 20px #00000008;
}

.tab-panel {
  padding: 16px;
}

.log-entry,
.action-entry {
  padding: 12px 14px;
}

.asset-player-block {
  padding: 14px;
}

.asset-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.asset-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.asset-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.asset-group-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffffcc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.asset-book-grid {
  display: grid;
  gap: 10px;
}

.asset-book-card {
  display: grid;
  gap: 8px;
}

.asset-item-title {
  display: block;
  font-weight: 900;
}

.asset-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-item {
  padding: 10px 12px;
}

#leaderboard,
#assets,
.log {
  display: grid;
  gap: 10px;
}

.battle-report {
  display: grid;
  gap: 8px;
}

.battle-line {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.battle-line.good {
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
  color: #166534;
}

.battle-line.bonus {
  background: linear-gradient(145deg, #fef3c7, #fff7ed);
  color: #92400e;
}

.battle-line.warn {
  background: linear-gradient(145deg, #fff7ed, #ffffff);
  color: #9a3412;
}

.battle-line.danger {
  background: linear-gradient(145deg, #fee2e2, #ffffff);
  color: #991b1b;
}

.battle-line.neutral {
  background: linear-gradient(145deg, #f8fafc, #ffffff);
  color: #475569;
}

.leader-crown-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 14px;
  filter: drop-shadow(0 2px 2px #00000033);
}

.jackpot-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(145deg, #facc15, #f59e0b);
  color: #451a03;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 3px 8px #00000020;
}

.tile.focus-good,
.tile.focus-bonus,
.tile.focus-warn,
.tile.focus-danger,
.tile.focus-neutral {
  transform: translateY(-2px);
}

.tile.focus-good {
  box-shadow: inset 0 0 0 3px #4ade80, 0 10px 18px #22c55e22;
}

.tile.focus-bonus {
  box-shadow: inset 0 0 0 3px #fbbf24, 0 10px 18px #f59e0b22;
}

.tile.focus-warn {
  box-shadow: inset 0 0 0 3px #fb923c, 0 10px 18px #f9731622;
}

.tile.focus-danger {
  box-shadow: inset 0 0 0 3px #f87171, 0 10px 18px #ef444422;
}

.tile.focus-neutral {
  box-shadow: inset 0 0 0 3px #94a3b8, 0 10px 18px #64748b22;
}

#rollButton {
  position: relative;
  width: 100%;
  min-height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 12px 24px #2563eb35;
  overflow: hidden;
}

#rollButton::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(110deg, transparent 30%, #ffffff88 48%, transparent 66%);
  transform: translateX(-120%);
  pointer-events: none;
}

#rollButton.roll-button-burst {
  animation: roll-button-shake 520ms ease both;
}

#rollButton.roll-button-burst::after {
  animation: roll-button-shine 520ms ease both;
}

.dice-result {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #475569;
}

.dice-stage {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, #ffffff22, #0000004f 48%, transparent 72%);
  perspective: 900px;
}

.screen-dice.dice-cube {
  position: relative;
  width: 118px;
  height: 118px;
  transform-style: preserve-3d;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #0f172a;
  font-size: 0;
}

.dice-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff, #dbeafe);
  border: 5px solid #ffffff;
  color: #0f172a;
  font-size: 54px;
  font-weight: 1000;
  box-shadow: inset 0 0 0 2px #bfdbfe, 0 22px 44px #00000024;
  backface-visibility: visible;
}

.dice-face-front { transform: translateZ(59px); }
.dice-face-back { transform: rotateY(180deg) translateZ(59px); }
.dice-face-right { transform: rotateY(90deg) translateZ(59px); }
.dice-face-left { transform: rotateY(-90deg) translateZ(59px); }
.dice-face-top { transform: rotateX(90deg) translateZ(59px); }
.dice-face-bottom { transform: rotateX(-90deg) translateZ(59px); }

.screen-dice.dice-rolling {
  animation: dice-cube-roll 760ms linear infinite;
}

.screen-dice.dice-final.show-1 { animation: dice-show-1 760ms cubic-bezier(.2, 1.4, .3, 1) both; }
.screen-dice.dice-final.show-2 { animation: dice-show-2 760ms cubic-bezier(.2, 1.4, .3, 1) both; }
.screen-dice.dice-final.show-3 { animation: dice-show-3 760ms cubic-bezier(.2, 1.4, .3, 1) both; }
.screen-dice.dice-final.show-4 { animation: dice-show-4 760ms cubic-bezier(.2, 1.4, .3, 1) both; }
.screen-dice.dice-final.show-5 { animation: dice-show-5 760ms cubic-bezier(.2, 1.4, .3, 1) both; }
.screen-dice.dice-final.show-6 { animation: dice-show-6 760ms cubic-bezier(.2, 1.4, .3, 1) both; }

.player-row {
  padding: 11px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-left: 8px solid #cbd5e1;
}

.player-row.player-danger {
  background: linear-gradient(145deg, #fff1f2, #ffffff);
  box-shadow: inset 0 0 0 2px #fecdd3;
}

.player-row.player-critical {
  background: linear-gradient(145deg, #fee2e2, #fff1f2);
  box-shadow: inset 0 0 0 2px #f87171, 0 0 0 2px #fecaca;
  animation: critical-pulse 1.4s ease-in-out infinite;
}

.player-row.player-leading {
  background: linear-gradient(145deg, #fffbeb, #ffffff);
  box-shadow: inset 0 0 0 2px #fde68a;
}

@keyframes critical-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

@keyframes roll-button-shake {
  0%, 100% { transform: translateX(0) scale(1); }
  18% { transform: translateX(-3px) scale(1.015); }
  36% { transform: translateX(3px) scale(1.02); }
  54% { transform: translateX(-2px) scale(1.01); }
  72% { transform: translateX(2px) scale(1.015); }
}

@keyframes roll-button-shine {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes dice-cube-roll {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(.95); }
  30% { transform: rotateX(150deg) rotateY(90deg) rotateZ(20deg) scale(1.08); }
  65% { transform: rotateX(285deg) rotateY(230deg) rotateZ(-18deg) scale(.98); }
  100% { transform: rotateX(420deg) rotateY(360deg) rotateZ(0deg) scale(.95); }
}

@keyframes dice-show-1 { 0% { transform: rotateX(250deg) rotateY(180deg) scale(.78); } 100% { transform: rotateX(0deg) rotateY(0deg) scale(1); } }
@keyframes dice-show-2 { 0% { transform: rotateX(250deg) rotateY(180deg) scale(.78); } 100% { transform: rotateX(-90deg) rotateY(0deg) scale(1); } }
@keyframes dice-show-3 { 0% { transform: rotateX(250deg) rotateY(180deg) scale(.78); } 100% { transform: rotateX(0deg) rotateY(-90deg) scale(1); } }
@keyframes dice-show-4 { 0% { transform: rotateX(250deg) rotateY(180deg) scale(.78); } 100% { transform: rotateX(0deg) rotateY(90deg) scale(1); } }
@keyframes dice-show-5 { 0% { transform: rotateX(250deg) rotateY(180deg) scale(.78); } 100% { transform: rotateX(90deg) rotateY(0deg) scale(1); } }
@keyframes dice-show-6 { 0% { transform: rotateX(250deg) rotateY(180deg) scale(.78); } 100% { transform: rotateX(0deg) rotateY(180deg) scale(1); } }

.player-row.p1 { border-left-color: #ef4444; }
.player-row.p2 { border-left-color: #3b82f6; }
.player-row.p3 { border-left-color: #22c55e; }
.player-row.p4 { border-left-color: #a855f7; }

.leaderboard-empty {
  color: #94a3b8;
  font-size: 14px;
}

.leaderboard-row {
  padding: 9px 10px;
  border-radius: 10px;
  margin-bottom: 7px;
  background: linear-gradient(145deg, #fff7ed, #fef3c7);
  box-shadow: 0 3px 8px #00000010;
}

.leaderboard-row small {
  color: #92400e;
}

.online-card {
  width: min(560px, 94vw);
  text-align: center;
}

.online-icon {
  font-size: 76px;
  filter: drop-shadow(0 8px 4px #00000022);
}

.online-options {
  margin-top: 18px;
}

.online-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.room-input-row input {
  width: 100%;
  padding: 13px 14px;
  border: 3px solid #f59e0b;
  border-radius: 14px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 2px;
  font-weight: 900;
}

.room-preview {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: inset 0 2px 10px #00000010;
}

.room-code {
  width: fit-content;
  margin: 8px auto 14px;
  padding: 8px 16px;
  border-radius: 12px;
  background: #1e293b;
  color: #facc15;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
}

.online-player-list {
  display: grid;
  gap: 8px;
  text-align: left;
}

.online-player-list div {
  padding: 10px 12px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 3px 8px #00000010;
  font-weight: 800;
}

.settings-card {
  width: min(560px, 94vw);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.settings-option {
  min-height: 64px;
  background: #475569;
  font-size: 16px;
}

.danger-option {
  background: #ef4444;
}

.settings-tip {
  color: #64748b;
  line-height: 1.6;
}

.guide-card {
  width: min(580px, 94vw);
  text-align: center;
}

.guide-icon {
  font-size: 76px;
  filter: drop-shadow(0 8px 4px #00000022);
}

.guide-card h3 {
  margin: 8px 0;
  font-size: 30px;
}

.guide-card p {
  font-size: 18px;
  line-height: 1.65;
  color: #475569;
}

.guide-progress {
  margin: 14px 0;
  color: #92400e;
  font-weight: 900;
}

.guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.winner-crown {
  text-align: center;
  font-size: 80px;
  filter: drop-shadow(0 8px 4px #00000022);
}

.result-card {
  text-align: center;
  width: min(620px, 94vw);
}

.result-card h3 {
  margin: 8px 0;
  font-size: 30px;
}

.loser-text {
  color: #64748b;
}

.result-ranking {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  text-align: left;
}

.result-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border-left: 8px solid #cbd5e1;
}

.result-row.p1 { border-left-color: #ef4444; }
.result-row.p2 { border-left-color: #3b82f6; }
.result-row.p3 { border-left-color: #22c55e; }
.result-row.p4 { border-left-color: #a855f7; }

.asset-group {
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #f8fafc;
  border-left: 8px solid #cbd5e1;
}

.asset-group.p1 { border-left-color: #ef4444; }
.asset-group.p2 { border-left-color: #3b82f6; }
.asset-group.p3 { border-left-color: #22c55e; }
.asset-group.p4 { border-left-color: #a855f7; }

.asset-title {
  font-weight: 900;
  margin-bottom: 8px;
}

.asset-empty {
  color: #94a3b8;
  font-size: 14px;
}

.asset-item-wrap {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: stretch;
  margin-top: 6px;
}

.asset-item {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: white;
  color: #1f2937;
  font-size: 14px;
  box-shadow: 0 3px 8px #00000010;
}

.asset-item.mortgaged {
  opacity: .72;
  filter: grayscale(.45);
  background: #e5e7eb;
}

.asset-mortgage-button {
  align-self: stretch;
  min-width: 86px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #64748b;
  font-size: 13px;
  box-shadow: 0 3px 0 #334155, 0 6px 10px #00000018;
}

.asset-trade-button {
  align-self: stretch;
  min-width: 68px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #0ea5e9;
  font-size: 13px;
  box-shadow: 0 3px 0 #0369a1, 0 6px 10px #00000018;
}

.asset-sell-button {
  align-self: stretch;
  min-width: 82px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f97316;
  font-size: 13px;
  box-shadow: 0 3px 0 #c2410c, 0 6px 10px #00000018;
}

.asset-item span {
  font-weight: 800;
}

.asset-item small {
  color: #64748b;
}

.tile-detail-icon {
  font-size: 64px;
  text-align: center;
  filter: drop-shadow(0 8px 4px #00000025);
}

.tile-detail-type {
  color: #64748b;
  font-weight: 800;
}

.log {
  height: 220px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
}

.log-entry {
  padding: 7px 0;
  border-bottom: 1px solid #e5e7eb;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #00000066;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 24px 80px #00000033;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #64748b;
}

.card-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle, #00000055, #000000aa);
}

.draw-card {
  position: relative;
  width: min(430px, 92vw);
  min-height: 430px;
  display: grid;
  align-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px 22px 22px;
  border-radius: 30px;
  border: 6px solid #ffffff;
  color: #1f2937;
  box-shadow: 0 30px 70px #00000066;
  overflow: hidden;
  animation: card-draw-in 420ms cubic-bezier(.2, 1.4, .4, 1);
}

.chance-card {
  background: linear-gradient(145deg, #fef3c7, #f59e0b);
}

.fate-card {
  background: linear-gradient(145deg, #ede9fe, #8b5cf6);
  color: white;
}

.draw-card-deck {
  justify-self: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffffcc;
  color: #1f2937;
  font-weight: 900;
}

.card-pick-stage {
  position: absolute;
  inset: 14px 18px auto;
  height: 145px;
  pointer-events: none;
  perspective: 900px;
}

.pick-card {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 74px;
  height: 108px;
  margin-left: -37px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #dbeafe);
  border: 3px solid #ffffff;
  box-shadow: 0 16px 32px #00000034;
  display: grid;
  place-items: center;
  transform-origin: 50% 120%;
  animation: pick-card-fan 900ms cubic-bezier(.2, 1.2, .3, 1) both;
}

.pick-card-back {
  width: 56px;
  height: 88px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(135deg, #2563eb 0 8px, #1d4ed8 8px 16px);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px #ffffff55;
}

.fate-card .pick-card-back {
  background: repeating-linear-gradient(135deg, #7c3aed 0 8px, #4c1d95 8px 16px);
}

.pick-1 { --fan-x: -102px; --fan-r: -18deg; }
.pick-2 { --fan-x: -52px; --fan-r: -9deg; }
.pick-3 { --fan-x: 0px; --fan-r: 0deg; }
.pick-4 { --fan-x: 52px; --fan-r: 9deg; }
.pick-5 { --fan-x: 102px; --fan-r: 18deg; }

.pick-card.selected {
  z-index: 3;
  animation: pick-card-selected 900ms cubic-bezier(.2, 1.2, .3, 1) both;
}

.draw-card-content {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 9px;
  align-content: center;
  margin-top: 132px;
  opacity: 1;
  transform: translateY(0);
  animation: card-content-rise 900ms ease both;
}

.draw-card.picking .draw-card-content {
  opacity: 0;
}

.draw-card-icon {
  font-size: 58px;
  filter: drop-shadow(0 8px 4px #00000033);
}

.draw-card h2 {
  margin: 0;
  font-size: 25px;
}

.draw-card p {
  min-height: 48px;
  font-size: 17px;
  line-height: 1.45;
  margin: 0;
}

.draw-card button {
  margin-top: 6px;
}

@keyframes card-draw-in {
  0% {
    opacity: 0;
    transform: perspective(900px) rotateY(80deg) translateY(60px) scale(.82);
  }
  70% {
    opacity: 1;
    transform: perspective(900px) rotateY(-8deg) translateY(-8px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: perspective(900px) rotateY(0deg) translateY(0) scale(1);
  }
}

@keyframes pick-card-fan {
  0% { opacity: 0; transform: translateX(0) translateY(28px) rotate(0) scale(.82); }
  45% { opacity: 1; transform: translateX(var(--fan-x)) translateY(0) rotate(var(--fan-r)) scale(1); }
  100% { opacity: .72; transform: translateX(var(--fan-x)) translateY(8px) rotate(var(--fan-r)) scale(.92); }
}

@keyframes pick-card-selected {
  0% { opacity: 0; transform: translateX(0) translateY(28px) rotate(0) scale(.82); }
  45% { opacity: 1; transform: translateX(0) translateY(0) rotate(0) scale(1); }
  100% { opacity: 1; transform: translateX(0) translateY(-18px) rotateY(180deg) scale(1.08); }
}

@keyframes card-content-rise {
  0%, 70% { opacity: 0; transform: translateY(18px) scale(.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1120px) {
  .game-screen {
    width: min(100vw - 16px, 760px);
    grid-template-columns: 1fr;
  }

  .board-wrap {
    width: min(620px, 100%);
  }

  .right-panel {
    width: 100%;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .game-screen {
    padding: 10px;
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .mobile-tip {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 5px 12px #00000018;
  }

  .table-surface {
    padding: 10px;
    border-radius: 20px;
  }

  .title-row h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 13px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    max-width: none;
  }

  .top-actions .small-button {
    min-width: 0;
    font-size: 12px;
    padding: 8px 6px;
  }

  .board-wrap {
    width: min(100%, 560px);
    max-width: min(100%, calc(100vh - 96px));
  }

  .board {
    gap: 3px;
  }

  .board-center {
    inset: 34% 34%;
    padding: 8px;
    border-radius: 16px;
  }

  .center-logo {
    font-size: 28px;
  }

  .board-center h2 {
    font-size: 14px;
    margin: 2px 0;
  }

  .board-center p,
  .center-props {
    display: none;
  }

  .tile {
    min-height: 44px;
    padding: 2px;
    border-radius: 8px;
  }

  .tile-icon {
    font-size: 15px;
  }

  .tile-name {
    font-size: 9px;
    line-height: 1.1;
  }

  .owner-badge,
  .monopoly-badge,
  .mortgage-badge,
  .danger-badge,
  .house-icons {
    display: none;
  }

  .token {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .tokens {
    left: 2px;
    bottom: 2px;
  }

  .right-panel {
    gap: 10px;
  }

  .compact-card #players {
    grid-template-columns: 1fr;
  }

  .data-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 4px 0;
    background: #451a03cc;
    backdrop-filter: blur(8px);
  }

  .tab-button {
    font-size: 13px;
    padding: 8px 6px;
  }

  .card {
    padding: 12px;
    border-radius: 14px;
  }

  .card h2 {
    font-size: 14px;
  }

  .hero-card {
    padding: 26px 18px;
  }

  .hero-card h1 {
    font-size: 34px;
  }

  .player-select {
    gap: 8px;
    font-size: 13px;
  }

  .hero-actions,
  .settings-grid,
  .guide-actions {
    grid-template-columns: 1fr;
  }

  .asset-item-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .tile {
    padding: 4px;
    min-height: 70px;
  }

  .tile-info {
    display: none;
  }
}
