:root {
  --ink: #172033;
  --muted: #617087;
  --paper: #fff9ee;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(23, 32, 51, 0.14);
  --sky: #def4ff;
  --blue: #2e7bd6;
  --green: #2f9f73;
  --coral: #e76f5f;
  --gold: #f2b642;
  --violet: #7b62d6;
  --shadow: 0 16px 38px rgba(27, 45, 73, 0.14);
}

/* Final first-stage overrides: keep the game view ahead of the legacy dashboard CSS. */
html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.95), transparent 28%),
    radial-gradient(circle at 12% 14%, rgba(242, 182, 66, 0.35), transparent 19%),
    radial-gradient(circle at 88% 16%, rgba(123, 98, 214, 0.24), transparent 22%),
    linear-gradient(180deg, #85d8ff 0%, #b9edff 40%, #52b98c 100%);
}

.app-shell.game-stage-shell {
  position: relative;
  width: min(100%, 560px);
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  margin: 0 auto;
  padding: 0 10px 10px;
}

.topbar.game-hud {
  position: sticky;
  top: 0;
  z-index: 16;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand actions"
    "resources resources";
  gap: 7px 10px;
  align-items: center;
  margin: 0 -10px;
  padding: 8px 10px 7px;
  background: linear-gradient(180deg, rgba(35, 91, 167, 0.98), rgba(35, 91, 167, 0.72), rgba(35, 91, 167, 0));
}

.game-hud .brand-lockup {
  grid-area: brand;
  min-width: 0;
}

.game-hud .brand-lockup h1 {
  margin: 0;
  color: #fff;
  font-size: 31px;
  line-height: 0.92;
  text-shadow: 0 3px 0 rgba(23, 32, 51, 0.2), 0 10px 18px rgba(23, 32, 51, 0.24);
}

.game-hud .brand-lockup .kicker {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.82);
}

.game-hud .top-actions {
  grid-area: actions;
}

.game-hud .ghost-button,
.game-hud .ghost-link {
  min-height: 32px;
  padding: 6px 9px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(23, 32, 51, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.game-hud .resource-strip {
  grid-area: resources;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.game-hud .resource {
  min-height: 50px;
  padding: 7px 6px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #e9f5ff);
  box-shadow: 0 5px 0 rgba(23, 32, 51, 0.16), 0 10px 20px rgba(23, 32, 51, 0.18);
}

.game-hud .resource span {
  color: #55708f;
  font-size: 9px;
  line-height: 1;
}

.game-hud .resource strong {
  margin-top: 1px;
  color: #172033;
  font-size: 19px;
  line-height: 1;
}

.game-hud .resource-detail {
  margin-top: 3px;
  font-size: 8px;
  line-height: 1.1;
}

.first-stage {
  position: relative;
  min-height: calc(100svh - 104px);
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 5px;
}

.stage-village {
  position: relative;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.stage-village .village-scene {
  min-height: min(42svh, 312px);
  overflow: hidden;
  border: 0;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.92) 0 26px, transparent 27px),
    radial-gradient(circle at 75% 18%, rgba(255, 255, 255, 0.88) 0 37px, transparent 38px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(180deg, #8edfff 0%, #bff4ff 54%, #4eb17d 55%, #2f9f73 100%);
  box-shadow: inset 0 -14px 0 rgba(41, 126, 87, 0.18);
}

.stage-village .village-scene::after {
  bottom: 4px;
  height: 88px;
}

.stage-title {
  top: 8px;
  width: min(82%, 320px);
  padding: 7px 12px;
}

.stage-title h2 {
  font-size: 24px;
}

.stage-title strong {
  margin-top: 2px;
  font-size: 12px;
}

.stage-village .village-scene img {
  bottom: 12px;
  width: min(104%, 510px);
  max-height: none;
}

.stage-village .progress-track {
  left: 16px;
  right: 16px;
  bottom: 10px;
  height: 12px;
}

.stage-village .map-path {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: -3px 4px 0;
}

.stage-village .map-node {
  min-height: 39px;
  padding: 5px 3px;
}

.village-hotspot {
  width: 74px;
  min-height: 70px;
  padding: 5px 4px;
}

.village-hotspot .building-silhouette {
  width: 38px;
  height: 34px;
  margin-bottom: 2px;
  transform: rotate(var(--building-tilt)) scale(0.86);
}

.village-hotspot > strong {
  display: block;
  font-size: 10px;
  line-height: 1.05;
}

.village-hotspot > span:not(.building-silhouette) {
  display: none;
}

.village-hotspot > small {
  display: block;
  margin-top: 2px;
  padding: 2px 6px;
  color: #fff;
  background: linear-gradient(180deg, #2f9f73, #197454);
  font-size: 9px;
  line-height: 1;
}

.stage-dock {
  top: 88px;
  right: 5px;
  width: 64px;
  gap: 5px;
}

.dock-button {
  min-height: 45px;
  gap: 0;
  padding: 5px 3px;
}

.dock-button strong {
  font-size: 10px;
}

.dock-button span,
.dock-button small {
  font-size: 8px;
}

.stage-slot {
  padding: 8px 10px 9px;
  border-radius: 18px 18px 8px 8px;
}

.stage-slot .panel-head {
  margin-bottom: 5px;
}

.stage-slot .panel-head h2 {
  font-size: 18px;
}

.stage-slot .slot-frame {
  min-height: 90px;
  gap: 6px;
  margin-bottom: 6px;
  padding: 6px;
}

.stage-slot .reel {
  min-height: 74px;
}

.stage-slot .reel span {
  min-height: 36px;
  padding: 6px 4px;
  font-size: 11px;
}

.stage-slot .bet-controls {
  gap: 6px;
  margin-bottom: 7px;
}

.stage-slot .bet-button {
  min-height: 28px;
}

.stage-slot .primary-button {
  min-height: 48px;
  font-size: 27px;
}

.stage-slot .result-line {
  min-height: 30px;
  margin-top: 7px;
  padding: 6px 8px;
  font-size: 12px;
}

.game-grid {
  display: block;
  grid-template-columns: none;
}

@media (max-height: 680px) {
  .game-hud .resource {
    min-height: 46px;
    padding-block: 6px;
  }

  .stage-village .village-scene {
    min-height: 270px;
  }

  .stage-village .map-node {
    min-height: 34px;
  }

  .stage-slot .slot-frame {
    min-height: 82px;
  }

  .stage-slot .reel {
    min-height: 66px;
  }

  .stage-slot .result-line {
    min-height: 26px;
    margin-top: 6px;
    padding-block: 5px;
  }
}

@media (max-width: 420px) {
  .app-shell.game-stage-shell {
    padding-inline: 8px;
  }

  .topbar.game-hud {
    margin-inline: -8px;
    padding-inline: 8px;
  }

  .game-hud .resource-strip {
    gap: 4px;
  }

  .game-hud .resource {
    padding-inline: 5px;
  }

  .stage-village .village-scene {
    min-height: 286px;
  }

  .stage-dock {
    width: 58px;
  }

  .village-hotspot {
    width: 66px;
    min-height: 64px;
  }
}

/* First viewport fit: show the village and full slot action without scrolling. */
.topbar.game-hud {
  gap: 4px 8px !important;
  padding: 6px 10px !important;
}

.game-hud .brand-lockup h1 {
  font-size: 27px !important;
}

.game-hud .resource {
  min-height: 40px !important;
  padding: 5px 6px !important;
}

.game-hud .resource span {
  font-size: 8px !important;
}

.game-hud .resource strong {
  font-size: 17px !important;
}

.game-hud .resource-detail,
.game-hud .resource-refill {
  display: none !important;
}

.first-stage {
  min-height: calc(100svh - 86px) !important;
}

.stage-village .village-scene {
  min-height: min(34svh, 242px) !important;
}

.stage-village .village-scene::after {
  height: 70px !important;
}

.stage-village .village-scene img {
  bottom: 4px !important;
  width: min(100%, 460px) !important;
}

.stage-title {
  top: 6px !important;
  width: min(80%, 300px) !important;
  padding: 6px 10px !important;
}

.stage-title h2 {
  font-size: 21px !important;
}

.stage-village .progress-track {
  bottom: 8px !important;
}

.stage-village .map-node {
  min-height: 31px !important;
  padding: 3px !important;
}

.village-hotspot {
  width: 66px !important;
  min-height: 58px !important;
  padding: 4px 3px !important;
}

.village-hotspot .building-silhouette {
  width: 32px !important;
  height: 28px !important;
}

.village-hotspot > strong {
  font-size: 9px !important;
}

.village-hotspot > small {
  font-size: 8px !important;
}

.stage-dock {
  top: 74px !important;
  width: 126px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

.dock-button {
  min-height: 38px !important;
  padding: 4px 2px !important;
}

.dock-button strong {
  font-size: 9px !important;
}

.dock-button span,
.dock-button small {
  font-size: 7px !important;
}

.stage-slot {
  padding: 7px 9px 8px !important;
}

.stage-slot .panel-head {
  display: none !important;
}

.stage-slot .slot-frame {
  min-height: 78px !important;
  margin-bottom: 6px !important;
  padding: 5px !important;
}

.stage-slot .reel {
  min-height: 62px !important;
}

.stage-slot .reel span {
  min-height: 32px !important;
  font-size: 10px !important;
}

.stage-slot .bet-controls {
  margin-bottom: 5px !important;
}

.stage-slot .bet-button {
  min-height: 26px !important;
}

.stage-slot .primary-button {
  min-height: 45px !important;
  font-size: 25px !important;
}

.stage-slot .result-line {
  min-height: 25px !important;
  margin-top: 5px !important;
  padding: 4px 7px !important;
  font-size: 11px !important;
}

.topbar.game-hud {
  gap: 4px 8px;
  padding: 6px 10px;
}

.game-hud .brand-lockup h1 {
  font-size: 27px;
}

.game-hud .resource {
  min-height: 40px;
  padding: 5px 6px;
}

.game-hud .resource span {
  font-size: 8px;
}

.game-hud .resource strong {
  font-size: 17px;
}

.game-hud .resource-detail,
.game-hud .resource-refill {
  display: none;
}

.first-stage {
  min-height: calc(100svh - 86px);
}

.stage-village .village-scene {
  min-height: min(34svh, 242px);
}

.stage-village .village-scene::after {
  height: 70px;
}

.stage-village .village-scene img {
  bottom: 4px;
  width: min(100%, 460px);
}

.stage-title {
  top: 6px;
  width: min(80%, 300px);
  padding: 6px 10px;
}

.stage-title h2 {
  font-size: 21px;
}

.stage-village .progress-track {
  bottom: 8px;
}

.stage-village .map-node {
  min-height: 31px;
  padding: 3px;
}

.village-hotspot {
  width: 66px;
  min-height: 58px;
  padding: 4px 3px;
}

.village-hotspot .building-silhouette {
  width: 32px;
  height: 28px;
}

.village-hotspot > strong {
  font-size: 9px;
}

.village-hotspot > small {
  font-size: 8px;
}

.stage-dock {
  top: 74px;
}

.stage-slot {
  padding: 7px 9px 8px;
}

.stage-slot .panel-head {
  display: none;
}

.stage-slot .slot-frame {
  min-height: 78px;
  margin-bottom: 6px;
  padding: 5px;
}

.stage-slot .reel {
  min-height: 62px;
}

.stage-slot .reel span {
  min-height: 32px;
  font-size: 10px;
}

.stage-slot .bet-controls {
  margin-bottom: 5px;
}

.stage-slot .bet-button {
  min-height: 26px;
}

.stage-slot .primary-button {
  min-height: 45px;
  font-size: 25px;
}

.stage-slot .result-line {
  min-height: 25px;
  margin-top: 5px;
  padding: 4px 7px;
  font-size: 11px;
}

/* First-stage game rebuild */
html {
  min-height: 100%;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.95), transparent 28%),
    radial-gradient(circle at 12% 14%, rgba(242, 182, 66, 0.35), transparent 19%),
    radial-gradient(circle at 88% 16%, rgba(123, 98, 214, 0.24), transparent 22%),
    linear-gradient(180deg, #85d8ff 0%, #b9edff 40%, #52b98c 100%);
}

.game-stage-shell {
  position: relative;
  width: min(100%, 560px);
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0 10px 12px;
}

.game-hud {
  position: sticky;
  top: 0;
  z-index: 16;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand actions"
    "resources resources";
  gap: 8px 10px;
  align-items: center;
  margin: 0 -10px;
  padding: 10px 10px 8px;
  background: linear-gradient(180deg, rgba(35, 91, 167, 0.98), rgba(35, 91, 167, 0.72), rgba(35, 91, 167, 0));
}

.brand-lockup {
  grid-area: brand;
  min-width: 0;
}

.brand-lockup h1 {
  margin: 0;
  color: #fff;
  font-size: 32px;
  text-shadow: 0 3px 0 rgba(23, 32, 51, 0.2), 0 10px 18px rgba(23, 32, 51, 0.24);
}

.brand-lockup .kicker {
  color: rgba(255, 255, 255, 0.82);
}

.game-hud .top-actions {
  grid-area: actions;
}

.game-hud .ghost-button,
.game-hud .ghost-link {
  min-height: 34px;
  padding: 7px 9px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(23, 32, 51, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.game-hud .resource-strip {
  grid-area: resources;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.game-hud .resource {
  min-height: 58px;
  padding: 8px 7px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #e9f5ff);
  box-shadow: 0 5px 0 rgba(23, 32, 51, 0.16), 0 10px 20px rgba(23, 32, 51, 0.18);
}

.game-hud .resource span {
  color: #55708f;
  font-size: 10px;
}

.game-hud .resource strong {
  margin-top: 1px;
  color: #172033;
  font-size: 20px;
  line-height: 1;
}

.game-hud .resource-detail {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.1;
}

.first-stage {
  position: relative;
  min-height: calc(100svh - 112px);
  display: grid;
  grid-template-rows: minmax(390px, 1fr) auto;
  gap: 8px;
}

.stage-village {
  position: relative;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.stage-village .village-scene {
  min-height: min(61svh, 610px);
  overflow: hidden;
  border: 0;
  border-radius: 0 0 30px 30px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.92) 0 34px, transparent 35px),
    radial-gradient(circle at 75% 18%, rgba(255, 255, 255, 0.88) 0 48px, transparent 49px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(180deg, #8edfff 0%, #bff4ff 54%, #4eb17d 55%, #2f9f73 100%);
  box-shadow: inset 0 -18px 0 rgba(41, 126, 87, 0.18);
}

.stage-village .village-scene::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 132%;
  height: 118px;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background: radial-gradient(circle at 50% 18%, rgba(255, 246, 217, 0.92), rgba(242, 182, 66, 0.52) 38%, rgba(96, 150, 87, 0.36) 39%, transparent 66%);
  pointer-events: none;
}

.stage-title {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 5;
  width: min(88%, 360px);
  display: grid;
  justify-items: center;
  transform: translateX(-50%);
  padding: 9px 14px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, rgba(35, 91, 167, 0.92), rgba(30, 64, 126, 0.86));
  box-shadow: 0 6px 0 rgba(23, 32, 51, 0.16), 0 14px 30px rgba(23, 32, 51, 0.2);
  text-align: center;
}

.stage-title .label {
  color: rgba(255, 255, 255, 0.75);
}

.stage-title h2 {
  color: #fff;
  font-size: 24px;
  text-shadow: 0 2px 0 rgba(23, 32, 51, 0.22);
}

.stage-title strong {
  margin-top: 4px;
  color: #fff2be;
  font-size: 13px;
}

.stage-village .village-scene img {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 1;
  width: min(112%, 620px);
  max-height: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 26px 26px rgba(23, 32, 51, 0.2));
}

.stage-village .progress-track {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 15px;
  z-index: 6;
  height: 14px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  background: rgba(23, 32, 51, 0.26);
  box-shadow: 0 4px 0 rgba(23, 32, 51, 0.14);
}

.stage-village .map-path {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: -4px 4px 0;
}

.stage-village .map-node {
  min-height: 50px;
  padding: 6px 4px;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 0 rgba(23, 32, 51, 0.12);
}

.stage-village .map-node strong {
  display: none;
}

.village-hotspot {
  width: 84px;
  min-height: 82px;
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 238, 189, 0.94));
  box-shadow: 0 6px 0 rgba(90, 61, 32, 0.18), 0 13px 18px rgba(23, 32, 51, 0.2);
}

.village-hotspot:hover:not(:disabled),
.village-hotspot:focus-visible:not(:disabled) {
  transform: translate(-50%, -54%) scale(1.04);
}

.village-hotspot > span:not(.building-silhouette) {
  display: none;
}

.village-hotspot > strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #172033;
  font-size: 11px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.village-hotspot > small {
  display: block;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #2f9f73, #197454);
  font-size: 10px;
  line-height: 1.1;
}

.village-hotspot .building-silhouette {
  width: 50px;
  height: 44px;
  margin-bottom: 4px;
}

.stage-dock {
  position: absolute;
  top: 112px;
  right: 6px;
  z-index: 10;
  width: 78px;
  display: grid;
  gap: 7px;
}

.dock-button {
  min-height: 58px;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 6px 4px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  color: #172033;
  background: linear-gradient(180deg, #fff, #e6f2ff);
  box-shadow: 0 5px 0 rgba(23, 32, 51, 0.18), 0 10px 18px rgba(23, 32, 51, 0.18);
  text-align: center;
}

.dock-button.active {
  color: #fff;
  background: linear-gradient(180deg, #e76f5f, #7b62d6);
}

.dock-button strong,
.dock-button span,
.dock-button small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-button strong {
  font-size: 12px;
  font-weight: 1000;
}

.dock-button span,
.dock-button small {
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
}

.dock-button small {
  color: inherit;
  opacity: 0.76;
}

.stage-slot {
  position: relative;
  z-index: 15;
  margin-top: -2px;
  padding: 12px;
  border: 0;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #ffd865 0%, #f2b642 44%, #b7652e 45%, #8f3e34 100%);
  box-shadow: 0 -8px 30px rgba(23, 32, 51, 0.18), inset 0 3px 0 rgba(255, 255, 255, 0.48);
}

.stage-slot .panel-head {
  align-items: center;
  margin-bottom: 8px;
  padding: 0 2px;
}

.stage-slot .panel-head h2,
.stage-slot .panel-head .label,
.stage-slot .meter-label {
  color: #fff;
  text-shadow: 0 2px 0 rgba(23, 32, 51, 0.18);
}

.stage-slot .panel-head h2 {
  font-size: 22px;
}

.stage-slot .slot-frame {
  min-height: 126px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
  padding: 9px;
  border: 4px solid #5e2f24;
  border-radius: 8px;
  background: linear-gradient(180deg, #1d2d50, #31518f);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.14), 0 5px 0 rgba(23, 32, 51, 0.22);
}

.stage-slot .reel {
  min-height: 104px;
  border-width: 4px;
  border-color: #fff1bf;
  border-radius: 8px;
}

.stage-slot .reel span {
  width: min(100%, 86px);
  min-height: 48px;
  padding: 8px 6px;
  font-size: 12px;
}

.stage-slot .bet-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}

.stage-slot .bet-button {
  min-height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 4px 0 rgba(23, 32, 51, 0.15);
}

.stage-slot .primary-button {
  min-height: 62px;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, #3ad279, #168b55);
  box-shadow: 0 7px 0 #0b5f3b, 0 16px 28px rgba(23, 32, 51, 0.24);
  font-size: 28px;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(23, 32, 51, 0.2);
}

.stage-slot .primary-button:disabled {
  filter: grayscale(0.35);
}

.stage-slot .result-line {
  min-height: 38px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: #172033;
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}

.stage-slot .paytable-panel {
  display: none;
}

.game-grid {
  position: fixed;
  inset: 86px 10px 14px auto;
  z-index: 30;
  width: min(430px, calc(100vw - 20px));
  display: block;
  grid-template-columns: none;
  margin: 0;
  padding: 52px 10px 10px;
  overflow: auto;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.97), rgba(229, 244, 255, 0.97));
  box-shadow: 0 22px 46px rgba(23, 32, 51, 0.34);
  transform: translateX(calc(100% + 24px));
  transition: transform 180ms ease;
}

.game-grid.open {
  transform: translateX(0);
}

.game-grid[aria-hidden="true"] {
  pointer-events: none;
}

.game-grid .system-panel {
  display: none;
  padding: 16px;
  box-shadow: none;
}

.game-grid .system-panel.active-panel {
  display: block;
}

.drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  color: #172033;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

body.qa-mode .game-grid {
  transform: translateX(0);
}

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

  .game-hud {
    margin-inline: -8px;
    padding-inline: 8px;
  }

  .game-hud .resource-strip {
    gap: 5px;
  }

  .game-hud .resource {
    min-height: 54px;
    padding: 7px 5px;
  }

  .first-stage {
    min-height: calc(100svh - 108px);
  }

  .stage-village .village-scene {
    min-height: 54svh;
  }

  .stage-dock {
    top: 106px;
    width: 68px;
  }

  .dock-button {
    min-height: 52px;
  }

  .village-hotspot {
    width: 76px;
    min-height: 76px;
    padding: 6px 4px;
  }

  .village-hotspot .building-silhouette {
    transform: scale(0.86);
  }

  .stage-slot {
    padding: 10px;
  }

  .stage-slot .slot-frame {
    min-height: 112px;
  }

  .stage-slot .reel {
    min-height: 92px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 2%, rgba(242, 182, 66, 0.26), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(47, 159, 115, 0.18), transparent 30%),
    linear-gradient(145deg, var(--sky), #f4edff 50%, var(--paper));
  line-height: 1.45;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.kicker,
.label,
.meter-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 56px;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ghost-button,
.ghost-link,
.primary-button,
.secondary-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 900;
}

.ghost-button,
.ghost-link,
.secondary-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.primary-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 12px 24px rgba(47, 123, 214, 0.24);
  font-size: 18px;
}

.resource-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.resource,
.village-panel,
.slot-panel,
.system-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.resource {
  min-height: 72px;
  padding: 12px;
}

.resource span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resource strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.resource-detail {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.resource-refill {
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.12);
}

.resource-refill span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #19a7a1, var(--blue));
}

.hero-playfield {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(360px, 1.05fr);
  gap: 14px;
  align-items: stretch;
}

.village-panel,
.slot-panel,
.system-panel {
  overflow: hidden;
}

.village-scene {
  position: relative;
  min-height: 440px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.16)),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.88), transparent 40%);
}

.village-scene img {
  width: min(92%, 700px);
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 24px 30px rgba(35, 57, 83, 0.16));
}

.village-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.village-hotspot {
  position: absolute;
  z-index: 2;
  left: var(--mobile-x, var(--desktop-x));
  top: var(--mobile-y, var(--desktop-y));
  width: 122px;
  min-height: 118px;
  display: grid;
  align-content: center;
  justify-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(23, 32, 51, 0.16);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 22px rgba(27, 45, 73, 0.16);
  color: var(--ink);
  pointer-events: auto;
  text-align: center;
  --building-accent: var(--gold);
}

.village-hotspot[data-scene-build="hut"],
.village-hotspot.building-hut {
  --building-accent: var(--gold);
  --building-fill: #fff1c8;
}

.village-hotspot[data-scene-build="forge"],
.village-hotspot.building-forge {
  --building-accent: var(--coral);
  --building-fill: #ffe0d8;
}

.village-hotspot[data-scene-build="tower"],
.village-hotspot.building-tower {
  --building-accent: var(--blue);
  --building-fill: #dcecff;
}

.village-hotspot[data-scene-build="dock"],
.village-hotspot.building-dock {
  --building-accent: var(--green);
  --building-fill: #dbf6e9;
}

.village-hotspot[data-scene-build="statue"],
.village-hotspot.building-statue {
  --building-accent: var(--violet);
  --building-fill: #ebe4ff;
}

.village-hotspot > strong,
.village-hotspot > span:not(.building-silhouette),
.village-hotspot > small {
  display: block;
}

.building-silhouette {
  position: relative;
  width: 58px;
  height: 52px;
  display: block;
  margin-bottom: 6px;
  --tier-scale: 1;
  --building-tilt: 0deg;
  transform: rotate(var(--building-tilt)) scale(var(--tier-scale));
  transform-origin: 50% 100%;
  filter: drop-shadow(0 9px 8px rgba(27, 45, 73, 0.16));
}

.silhouette-base,
.silhouette-core,
.silhouette-roof,
.silhouette-accent {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: block;
}

.silhouette-base {
  bottom: 0;
  width: 54px;
  height: 9px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.14);
}

.silhouette-core {
  bottom: 8px;
  width: 44px;
  height: 24px;
  border: 3px solid rgba(23, 32, 51, 0.18);
  border-radius: 8px 8px 5px 5px;
  background: var(--building-fill);
}

.silhouette-roof {
  bottom: 30px;
  width: 38px;
  height: 18px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: var(--building-accent);
}

.silhouette-accent {
  bottom: 12px;
  width: 8px;
  height: 11px;
  border-radius: 999px 999px 2px 2px;
  background: color-mix(in srgb, var(--building-accent) 68%, #fff);
  box-shadow:
    -13px 1px 0 -2px color-mix(in srgb, var(--building-accent) 40%, #fff),
    13px 1px 0 -2px color-mix(in srgb, var(--building-accent) 40%, #fff);
}

.tier-plot .building-silhouette {
  --tier-scale: 0.92;
  filter: none;
}

.tier-plot .silhouette-base {
  width: 56px;
  height: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(23, 32, 51, 0.16) 0 6px, transparent 6px 10px),
    rgba(23, 32, 51, 0.08);
}

.tier-plot .silhouette-core,
.tier-plot .silhouette-roof,
.tier-plot .silhouette-accent {
  display: none;
}

.tier-frame .building-silhouette {
  --tier-scale: 0.96;
}

.tier-frame .silhouette-core {
  background: rgba(255, 255, 255, 0.42);
  border-style: dashed;
}

.tier-frame .silhouette-roof {
  opacity: 0.72;
}

.tier-frame .silhouette-accent {
  opacity: 0.35;
}

.tier-built .silhouette-core {
  height: 27px;
}

.tier-built .silhouette-roof {
  bottom: 33px;
}

.tier-built .silhouette-accent {
  bottom: 14px;
}

.tier-grand .building-silhouette,
.tier-crowned .building-silhouette {
  --tier-scale: 1.08;
}

.tier-grand .silhouette-core,
.tier-crowned .silhouette-core {
  width: 48px;
  height: 30px;
  box-shadow:
    -16px 10px 0 -7px color-mix(in srgb, var(--building-accent) 22%, white),
    16px 10px 0 -7px color-mix(in srgb, var(--building-accent) 22%, white);
}

.tier-grand .silhouette-roof,
.tier-crowned .silhouette-roof {
  bottom: 36px;
  width: 42px;
}

.tier-grand .silhouette-accent,
.tier-crowned .silhouette-accent {
  bottom: 16px;
  height: 13px;
}

.tier-crowned .building-silhouette {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--building-accent) 55%, transparent));
}

.tier-crowned .silhouette-core {
  border-color: rgba(242, 182, 66, 0.72);
}

.tier-crowned .silhouette-roof {
  background: linear-gradient(135deg, var(--building-accent), var(--gold));
}

.building-forge .silhouette-core {
  bottom: 8px;
  width: 48px;
  height: 22px;
  border-radius: 7px 7px 4px 4px;
}

.building-forge .silhouette-roof {
  bottom: 28px;
  width: 46px;
  height: 15px;
  clip-path: polygon(4% 38%, 100% 0, 90% 100%, 0 100%);
}

.building-forge .silhouette-accent {
  left: 72%;
  bottom: 28px;
  width: 10px;
  height: 21px;
  border-radius: 3px 3px 1px 1px;
  box-shadow: none;
}

.building-tower .silhouette-core {
  bottom: 7px;
  width: 30px;
  height: 34px;
  border-radius: 10px 10px 5px 5px;
}

.building-tower .silhouette-roof {
  bottom: 39px;
  width: 34px;
  height: 17px;
  clip-path: polygon(50% 0, 92% 100%, 8% 100%);
}

.building-tower .silhouette-accent {
  bottom: 17px;
  width: 7px;
  height: 10px;
  box-shadow:
    -9px 0 0 -2px color-mix(in srgb, var(--building-accent) 42%, #fff),
    9px 0 0 -2px color-mix(in srgb, var(--building-accent) 42%, #fff);
}

.building-dock .silhouette-base {
  bottom: 0;
  height: 10px;
  background:
    radial-gradient(circle at 20% 60%, rgba(47, 123, 214, 0.26) 0 6px, transparent 7px),
    radial-gradient(circle at 58% 55%, rgba(47, 123, 214, 0.2) 0 7px, transparent 8px),
    rgba(23, 32, 51, 0.1);
}

.building-dock .silhouette-core {
  bottom: 13px;
  width: 52px;
  height: 14px;
  border-radius: 4px;
}

.building-dock .silhouette-roof {
  bottom: 27px;
  width: 42px;
  height: 18px;
  clip-path: polygon(0 78%, 100% 36%, 100% 100%, 0 100%);
}

.building-dock .silhouette-accent {
  bottom: 6px;
  width: 5px;
  height: 22px;
  border-radius: 3px;
  box-shadow:
    -19px 0 0 -1px color-mix(in srgb, var(--building-accent) 58%, #fff),
    19px 0 0 -1px color-mix(in srgb, var(--building-accent) 58%, #fff);
}

.building-statue .silhouette-core {
  bottom: 8px;
  width: 36px;
  height: 16px;
  border-radius: 4px;
}

.building-statue .silhouette-roof {
  bottom: 23px;
  width: 30px;
  height: 22px;
  border-radius: 50% 50% 46% 46%;
  clip-path: none;
}

.building-statue .silhouette-accent {
  bottom: 43px;
  width: 22px;
  height: 12px;
  border-radius: 999px 999px 2px 2px;
  clip-path: polygon(0 100%, 18% 22%, 38% 100%, 50% 0, 62% 100%, 82% 22%, 100% 100%);
  box-shadow: none;
}

.village-hotspot > strong {
  font-size: 12px;
}

.village-hotspot > span:not(.building-silhouette) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.village-hotspot > small {
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(242, 182, 66, 0.2);
  color: #6f4a08;
  font-size: 11px;
  font-weight: 1000;
}

.village-hotspot.complete {
  border-color: rgba(47, 159, 115, 0.48);
  background: rgba(238, 255, 247, 0.94);
}

.village-hotspot.fresh-build {
  animation: build-pop 680ms ease-out 2;
  outline: 4px solid rgba(242, 182, 66, 0.34);
}

.village-hotspot.damaged {
  border-color: rgba(232, 111, 95, 0.46);
  background: rgba(255, 235, 231, 0.94);
}

.village-hotspot.damaged .building-silhouette {
  --building-tilt: -3deg;
}

.village-hotspot.damaged .silhouette-core {
  border-color: rgba(232, 111, 95, 0.72);
  background:
    linear-gradient(135deg, transparent 46%, rgba(143, 62, 52, 0.72) 48%, transparent 51%),
    color-mix(in srgb, var(--building-accent) 18%, white);
}

.village-hotspot.damaged .silhouette-roof,
.village-hotspot.damaged .silhouette-accent {
  opacity: 0.72;
}

.village-hotspot:disabled {
  opacity: 0.82;
}

@keyframes build-pop {
  0% { transform: translate(-50%, -50%) scale(0.94); }
  50% { transform: translate(-50%, -50%) scale(1.07); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.build-feedback {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 42px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(242, 182, 66, 0.5);
  border-radius: 8px;
  background: rgba(255, 248, 218, 0.94);
  box-shadow: 0 14px 30px rgba(27, 45, 73, 0.16);
}

.build-feedback[hidden] {
  display: none;
}

.build-feedback strong,
.build-feedback span {
  display: block;
}

.build-feedback strong {
  font-size: 14px;
}

.build-feedback span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.build-feedback button {
  min-height: 36px;
  border: 1px solid rgba(242, 182, 66, 0.58);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 1000;
}

.village-status {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.village-status strong {
  font-size: 20px;
}

.progress-track {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.12);
}

.map-path {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.map-node {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.map-node span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(23, 32, 51, 0.12);
  font-size: 12px;
  font-weight: 1000;
}

.map-node strong {
  font-size: 12px;
  line-height: 1.1;
}

.map-node.complete span {
  color: #fff;
  background: var(--green);
}

.map-node.current {
  border-color: rgba(47, 123, 214, 0.46);
  background: rgba(47, 123, 214, 0.1);
}

.map-node.current span {
  color: #fff;
  background: var(--blue);
}

.map-node.locked {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.progress-track span,
.mini-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--coral), var(--violet));
}

.slot-panel,
.system-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.slot-frame {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 255px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.38)),
    linear-gradient(135deg, #1e2b45, #334a77);
}

.bet-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.bet-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 1000;
}

.bet-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--coral), var(--violet));
}

.reel {
  display: grid;
  place-items: center;
  min-height: 218px;
  border: 5px solid #fff4cf;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #ffe7ad);
  box-shadow: inset 0 0 0 2px rgba(23, 32, 51, 0.12), 0 16px 26px rgba(0, 0, 0, 0.18);
}

.reel span {
  display: grid;
  place-items: center;
  width: min(100%, 120px);
  min-height: 72px;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 1000;
  text-align: center;
}

.reel.coin span { background: var(--gold); color: var(--ink); }
.reel.bag span { background: var(--green); }
.reel.spin span { background: #19a7a1; }
.reel.hammer span { background: var(--coral); }
.reel.raid span { background: var(--violet); }
.reel.shield span { background: var(--blue); }
.reel.chest span { background: #d58a27; }
.reel.attack,
.reel.raid,
.reel.shield,
.reel.spinbonus,
.reel.chest {
  outline: 4px solid rgba(242, 182, 66, 0.42);
}

.reel.spinning {
  animation: reel-bounce 160ms linear infinite;
}

.reel.spinning span {
  filter: blur(1px);
  transform: translateY(-4px);
}

@keyframes reel-bounce {
  0% { transform: translateY(-4px); }
  50% { transform: translateY(5px); }
  100% { transform: translateY(-4px); }
}

.result-line {
  min-height: 46px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.paytable-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.paytable-head,
.payline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.paytable-head {
  grid-template-columns: 1fr auto;
  margin-bottom: 10px;
  font-weight: 1000;
}

.paytable-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paytable-list {
  display: grid;
  gap: 8px;
}

.payline {
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.pay-symbols {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 5px;
}

.pay-symbol {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-size: 10px;
  font-weight: 1000;
}

.pay-symbol.coin { background: var(--gold); color: var(--ink); }
.pay-symbol.bag { background: var(--green); }
.pay-symbol.spin { background: #19a7a1; }
.pay-symbol.hammer { background: var(--coral); }
.pay-symbol.raid { background: var(--violet); }
.pay-symbol.shield { background: var(--blue); }
.pay-symbol.chest { background: #d58a27; }
.pay-symbol.any {
  color: var(--muted);
  background: rgba(23, 32, 51, 0.1);
}

.payline strong,
.payline span {
  display: block;
}

.payline strong {
  font-size: 13px;
}

.payline span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.target-grid,
.vault-grid,
.building-list,
.goal-list,
.social-list {
  display: grid;
  gap: 10px;
}

.target-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.raid-target-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(123, 98, 214, 0.2);
  border-radius: 8px;
  background: rgba(123, 98, 214, 0.08);
}

.raid-target-strip strong,
.raid-target-strip span {
  display: block;
}

.raid-target-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.target-building,
.vault,
.building-card,
.goal,
.album-card,
.album-set,
.companion-card,
.social-target {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.target-building,
.vault {
  min-height: 92px;
  padding: 10px;
  font-weight: 900;
}

.target-building strong,
.target-building span {
  display: block;
}

.target-building span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.target-building.damaged {
  background: rgba(232, 111, 95, 0.12);
  border-color: rgba(232, 111, 95, 0.34);
}

.vault {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
}

.vault.revealed {
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #fff0cc);
}

.vault.selected,
.modal-vault.selected {
  outline: 4px solid rgba(47, 123, 214, 0.28);
}

.vault.jackpot.revealed,
.modal-vault.jackpot.revealed {
  color: var(--ink);
  background: linear-gradient(180deg, #fff7d7, #f2b642);
}

.vault.rich.revealed,
.modal-vault.rich.revealed {
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.vault.decoy.revealed,
.modal-vault.decoy.revealed {
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #dfe7f3);
}

.vault.trap.revealed,
.modal-vault.trap.revealed {
  color: #fff;
  background: linear-gradient(135deg, #8f3e34, var(--coral));
}

.vault.scouted:not(.revealed),
.modal-vault.scouted:not(.revealed) {
  outline: 4px solid rgba(242, 182, 66, 0.42);
  background: linear-gradient(135deg, #2f9f73, #7b62d6);
}

.event-copy,
.event-milestones,
.card-progress,
.daily-track,
.tournament-list,
.defense-copy,
.threat-meter,
.damage-list {
  display: grid;
  gap: 8px;
}

.event-copy strong,
.event-milestone strong,
.card-progress strong,
.tournament-summary strong,
.defense-copy strong,
.threat-meter strong {
  display: block;
}

.event-milestones {
  margin-top: 12px;
}

.event-milestone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.event-milestone.ready {
  border-color: rgba(242, 182, 66, 0.58);
  background: rgba(255, 247, 217, 0.88);
}

.event-milestone.claimed {
  border-color: rgba(47, 159, 115, 0.34);
  background: rgba(238, 255, 247, 0.78);
}

.event-milestone span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.event-milestone button {
  min-width: 84px;
}

.daily-reward {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.daily-reward.ready {
  border-color: rgba(242, 182, 66, 0.58);
  background: rgba(255, 247, 217, 0.9);
}

.daily-reward.claimed {
  border-color: rgba(47, 159, 115, 0.3);
  background: rgba(238, 255, 247, 0.76);
}

.daily-reward strong,
.daily-reward span {
  display: block;
}

.daily-reward span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-reward .primary-button {
  min-width: 98px;
  min-height: 44px;
}

.daily-track {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 12px;
}

.daily-track span {
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.daily-track span.done {
  color: #fff;
  border-color: rgba(47, 159, 115, 0.38);
  background: var(--green);
}

.daily-track span.next {
  color: var(--ink);
  border-color: rgba(242, 182, 66, 0.58);
  background: var(--gold);
}

.tournament-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.tournament-summary div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(47, 123, 214, 0.2);
  border-radius: 8px;
  background: rgba(47, 123, 214, 0.08);
}

.tournament-summary span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.tournament-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.tournament-row.player {
  border-color: rgba(242, 182, 66, 0.58);
  background: rgba(255, 247, 217, 0.9);
}

.tournament-row span,
.tournament-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
}

.tournament-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.threat-meter {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(47, 123, 214, 0.2);
  border-radius: 8px;
  background: rgba(47, 123, 214, 0.08);
}

.threat-meter.urgent {
  border-color: rgba(232, 111, 95, 0.38);
  background: rgba(232, 111, 95, 0.1);
}

.threat-meter.urgent .mini-bar span {
  background: linear-gradient(90deg, var(--coral), var(--gold));
}

.event-copy p,
.defense-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.damage-list {
  margin-top: 12px;
}

.damage-list span {
  min-height: 42px;
  display: grid;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.album-card {
  min-height: 78px;
  padding: 10px;
  background: linear-gradient(180deg, #f4f6fb, #e9edf8);
}

.album-card.owned {
  background: linear-gradient(180deg, #fff, #fff1c8);
  border-color: rgba(242, 182, 66, 0.46);
}

.album-card strong,
.album-card span,
.album-set strong,
.album-set span,
.companion-active strong,
.companion-active span,
.companion-active small,
.companion-card strong,
.companion-card small,
.social-target strong,
.social-target span,
.history-event strong,
.history-event span {
  display: block;
}

.album-card strong {
  font-size: 13px;
}

.album-card span,
.album-set span,
.companion-active span,
.companion-active small,
.companion-card small,
.social-target span,
.history-event span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.album-set-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.album-set {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
}

.album-set.ready {
  border-color: rgba(242, 182, 66, 0.58);
  background: rgba(255, 247, 217, 0.88);
}

.album-set.claimed {
  border-color: rgba(47, 159, 115, 0.34);
  background: rgba(238, 255, 247, 0.78);
}

.album-set button {
  min-width: 84px;
}

.companion-active {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 108px;
  padding: 12px;
  border: 1px solid rgba(47, 123, 214, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 217, 0.78)),
    rgba(255, 255, 255, 0.74);
}

.companion-active .mini-bar {
  margin-top: 8px;
}

.companion-icon {
  display: grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #fff;
  background: var(--violet);
  font-size: 11px;
  font-weight: 1000;
}

.focus-raid .companion-icon {
  background: var(--violet);
}

.focus-attack .companion-icon {
  background: var(--coral);
}

.focus-defense .companion-icon {
  background: var(--blue);
}

.companion-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.companion-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  text-align: left;
}

.companion-card.active {
  border-color: rgba(242, 182, 66, 0.58);
  background: rgba(255, 247, 217, 0.88);
}

.companion-card:disabled {
  opacity: 1;
}

.social-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.revenge-chain {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(232, 111, 95, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 238, 204, 0.78));
}

.revenge-chain.ready {
  border-color: rgba(242, 182, 66, 0.58);
  background: linear-gradient(135deg, rgba(255, 247, 217, 0.95), rgba(232, 111, 95, 0.16));
}

.revenge-chain strong,
.revenge-chain span {
  display: block;
}

.revenge-chain strong {
  font-size: 14px;
}

.revenge-chain span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.social-target,
.history-event {
  min-height: 68px;
  padding: 12px;
  text-align: left;
}

.mini-social-button {
  min-width: 106px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 1000;
}

.mini-social-button.revenge {
  color: #fff;
  border-color: rgba(232, 111, 95, 0.46);
  background: linear-gradient(135deg, var(--coral), var(--violet));
}

.mini-social-button.gift {
  border-color: rgba(47, 159, 115, 0.34);
  background: rgba(47, 159, 115, 0.1);
}

.social-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.history-event {
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.history-event.incoming {
  border-color: rgba(232, 111, 95, 0.28);
}

.history-event.attack,
.history-event.raid,
.history-event.reward {
  border-color: rgba(47, 159, 115, 0.28);
}

.revenge-reward-modal .modal-copy {
  max-width: 620px;
}

.social-target.active {
  border-color: rgba(47, 123, 214, 0.48);
  background: rgba(47, 123, 214, 0.1);
}

.qa-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.economy-table,
.sim-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sim-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0 2px;
}

.sim-head strong {
  font-size: 13px;
}

.sim-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sim-status {
  min-height: 26px;
  display: grid;
  place-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  background: rgba(255, 255, 255, 0.7);
}

.sim-status.ok {
  color: var(--green);
  border-color: rgba(47, 159, 115, 0.28);
  background: rgba(47, 159, 115, 0.1);
}

.sim-status.warn {
  color: #8f3e34;
  border-color: rgba(232, 111, 95, 0.32);
  background: rgba(232, 111, 95, 0.1);
}

.economy-row,
.sim-row {
  display: grid;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.economy-row {
  grid-template-columns: 72px 1fr auto;
}

.sim-row {
  grid-template-columns: 72px 1fr auto auto;
}

.economy-row span,
.economy-row em,
.sim-row span,
.sim-row em,
.sim-row small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.sim-row small {
  min-width: 86px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  text-align: center;
}

.sim-row.ok small {
  color: var(--green);
  border-color: rgba(47, 159, 115, 0.26);
  background: rgba(47, 159, 115, 0.08);
}

.sim-row.low small,
.sim-row.high small {
  color: #8f3e34;
  border-color: rgba(232, 111, 95, 0.3);
  background: rgba(232, 111, 95, 0.08);
}

.economy-row strong,
.sim-row strong {
  font-size: 13px;
}

.building-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.building-card strong,
.building-card span {
  display: block;
}

.building-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mini-bar {
  height: 9px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.1);
}

.goal {
  min-height: 54px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.goal.done {
  color: #1d5b44;
  border-color: rgba(47, 159, 115, 0.42);
  background: rgba(47, 159, 115, 0.1);
}

.log-panel {
  grid-column: span 2;
}

.session-log {
  display: grid;
  gap: 10px;
  max-height: 296px;
  margin: 0;
  padding-left: 20px;
  overflow: auto;
}

.session-log li {
  color: var(--muted);
  font-weight: 750;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 24, 41, 0.56);
  backdrop-filter: blur(6px);
}

.modal-layer[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,250,238,.94)),
    linear-gradient(135deg, #fff2c7, #e8f5ff);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-card h2 {
  margin-bottom: 10px;
  font-size: 40px;
}

.modal-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.modal-target-grid,
.rival-scene,
.modal-vault-grid,
.visit-scene,
.visit-status,
.visit-actions {
  display: grid;
  gap: 12px;
}

.modal-target-grid,
.rival-scene,
.visit-scene {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.modal-vault-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-target,
.modal-vault {
  min-height: 124px;
  border: 2px solid rgba(23, 32, 51, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 1000;
  box-shadow: 0 12px 22px rgba(27, 45, 73, 0.12);
}

.modal-target strong,
.modal-target span {
  display: block;
}

.modal-target span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.modal-target small {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
}

.modal-target.damaged {
  border-color: rgba(232, 111, 95, 0.42);
  background: rgba(232, 111, 95, 0.12);
}

.modal-target.damaged small {
  background: rgba(232, 111, 95, 0.18);
  color: #8f3e34;
}

.visit-status {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.visit-status span,
.visit-building {
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(47, 123, 214, 0.2);
  border-radius: 8px;
  background: rgba(47, 123, 214, 0.08);
  font-weight: 900;
}

.visit-building {
  min-height: 118px;
  background: linear-gradient(180deg, #fff, #eff6ff);
  box-shadow: 0 12px 22px rgba(27, 45, 73, 0.1);
}

.visit-building strong,
.visit-building span {
  display: block;
}

.visit-building span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.visit-building.damaged {
  border-color: rgba(232, 111, 95, 0.42);
  background: rgba(232, 111, 95, 0.12);
}

.visit-actions {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 14px;
}

.modal-vault {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  font-size: 18px;
}

.modal-vault.revealed {
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #fff0cc);
}

.raid-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.raid-summary-stats span {
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(47, 123, 214, 0.24);
  border-radius: 8px;
  background: rgba(47, 123, 214, 0.08);
  font-weight: 1000;
  text-align: center;
}

.summary-grid .modal-vault {
  cursor: default;
}

.celebration-modal {
  text-align: center;
}

.celebration-rewards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.celebration-rewards span {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid rgba(242, 182, 66, 0.52);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fff1c8);
  font-weight: 1000;
}

@media (max-width: 1120px) {
  .hero-playfield,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .log-panel {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100% - 18px, 520px);
    padding-top: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .village-scene {
    min-height: 430px;
  }

  .village-hotspot {
    width: 66px;
    min-height: 68px;
    padding: 4px;
  }

  .building-silhouette {
    width: 34px;
    height: 32px;
    margin-bottom: 2px;
  }

  .silhouette-base {
    width: 32px;
    height: 6px;
  }

  .silhouette-core {
    bottom: 5px;
    width: 27px;
    height: 15px;
    border-width: 2px;
    border-radius: 6px 6px 4px 4px;
  }

  .silhouette-roof {
    bottom: 19px;
    width: 23px;
    height: 11px;
  }

  .silhouette-accent {
    bottom: 8px;
    width: 5px;
    height: 7px;
    box-shadow:
      -8px 0 0 -1px color-mix(in srgb, var(--building-accent) 40%, #fff),
      8px 0 0 -1px color-mix(in srgb, var(--building-accent) 40%, #fff);
  }

  .tier-plot .silhouette-base {
    width: 32px;
    height: 6px;
  }

  .tier-built .silhouette-core {
    height: 17px;
  }

  .tier-built .silhouette-roof {
    bottom: 21px;
  }

  .tier-built .silhouette-accent {
    bottom: 9px;
  }

  .tier-grand .silhouette-core,
  .tier-crowned .silhouette-core {
    width: 30px;
    height: 19px;
    box-shadow:
      -9px 6px 0 -5px color-mix(in srgb, var(--building-accent) 22%, white),
      9px 6px 0 -5px color-mix(in srgb, var(--building-accent) 22%, white);
  }

  .tier-grand .silhouette-roof,
  .tier-crowned .silhouette-roof {
    bottom: 23px;
    width: 26px;
  }

  .tier-grand .silhouette-accent,
  .tier-crowned .silhouette-accent {
    bottom: 10px;
    height: 8px;
  }

  .building-forge .silhouette-core {
    bottom: 5px;
    width: 30px;
    height: 13px;
  }

  .building-forge .silhouette-roof {
    bottom: 18px;
    width: 29px;
    height: 9px;
  }

  .building-forge .silhouette-accent {
    bottom: 18px;
    width: 6px;
    height: 12px;
  }

  .building-tower .silhouette-core {
    bottom: 5px;
    width: 19px;
    height: 22px;
  }

  .building-tower .silhouette-roof {
    bottom: 26px;
    width: 22px;
    height: 10px;
  }

  .building-tower .silhouette-accent {
    bottom: 12px;
    width: 5px;
    height: 7px;
    box-shadow:
      -6px 0 0 -1px color-mix(in srgb, var(--building-accent) 42%, #fff),
      6px 0 0 -1px color-mix(in srgb, var(--building-accent) 42%, #fff);
  }

  .building-dock .silhouette-base {
    width: 34px;
    height: 7px;
  }

  .building-dock .silhouette-core {
    bottom: 9px;
    width: 32px;
    height: 9px;
  }

  .building-dock .silhouette-roof {
    bottom: 18px;
    width: 28px;
    height: 11px;
  }

  .building-dock .silhouette-accent {
    bottom: 5px;
    width: 4px;
    height: 14px;
    box-shadow:
      -12px 0 0 -1px color-mix(in srgb, var(--building-accent) 58%, #fff),
      12px 0 0 -1px color-mix(in srgb, var(--building-accent) 58%, #fff);
  }

  .building-statue .silhouette-core {
    bottom: 5px;
    width: 24px;
    height: 10px;
  }

  .building-statue .silhouette-roof {
    bottom: 15px;
    width: 20px;
    height: 14px;
  }

  .building-statue .silhouette-accent {
    bottom: 28px;
    width: 14px;
    height: 8px;
  }

  .village-hotspot[data-scene-build="hut"] {
    --mobile-x: 22%;
    --mobile-y: 76%;
  }

  .village-hotspot[data-scene-build="forge"] {
    --mobile-x: 37%;
    --mobile-y: 59%;
  }

  .village-hotspot[data-scene-build="tower"] {
    --mobile-x: 50%;
    --mobile-y: 39%;
  }

  .village-hotspot[data-scene-build="dock"] {
    --mobile-x: 66%;
    --mobile-y: 73%;
  }

  .village-hotspot[data-scene-build="statue"] {
    --mobile-x: 79%;
    --mobile-y: 54%;
  }

  .village-hotspot > strong {
    display: none;
  }

  .village-hotspot > span:not(.building-silhouette) {
    font-size: 9px;
    line-height: 1.05;
  }

  .village-hotspot > span:not(.building-silhouette) {
    margin-top: 2px;
  }

  .village-hotspot > small {
    display: none;
  }

  .build-feedback {
    left: 12px;
    right: 12px;
    bottom: 38px;
    grid-template-columns: 1fr;
  }

  .map-path {
    grid-template-columns: 1fr;
  }

  .slot-frame,
  .target-grid,
  .vault-grid,
  .card-grid,
  .modal-target-grid,
  .rival-scene,
  .modal-vault-grid,
  .visit-scene,
  .visit-status,
  .raid-summary-stats,
  .raid-target-strip,
  .event-milestone,
  .daily-reward,
  .album-set,
  .celebration-rewards,
  .qa-actions {
    grid-template-columns: 1fr;
  }

  .slot-frame {
    min-height: auto;
  }

  .reel {
    min-height: 98px;
  }

  .building-card {
    grid-template-columns: 1fr;
  }

  .social-row {
    grid-template-columns: 1fr;
  }

  .mini-social-button {
    min-height: 42px;
  }
}

/* Runtime first-stage enforcement. This block must stay last. */
html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.95), transparent 28%),
    radial-gradient(circle at 12% 14%, rgba(242, 182, 66, 0.35), transparent 19%),
    radial-gradient(circle at 88% 16%, rgba(123, 98, 214, 0.24), transparent 22%),
    linear-gradient(180deg, #85d8ff 0%, #b9edff 40%, #52b98c 100%);
}

.app-shell.game-stage-shell {
  position: relative;
  width: min(100%, 560px);
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  margin: 0 auto;
  padding: 0 10px 10px;
}

.topbar.game-hud {
  position: sticky;
  top: 0;
  z-index: 16;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand actions"
    "resources resources";
  gap: 7px 10px;
  align-items: center;
  margin: 0 -10px;
  padding: 8px 10px 7px;
  background: linear-gradient(180deg, rgba(35, 91, 167, 0.98), rgba(35, 91, 167, 0.72), rgba(35, 91, 167, 0));
}

.game-hud .brand-lockup {
  grid-area: brand;
  min-width: 0;
}

.game-hud .brand-lockup h1 {
  margin: 0;
  color: #fff;
  font-size: 31px;
  line-height: 0.92;
  text-shadow: 0 3px 0 rgba(23, 32, 51, 0.2), 0 10px 18px rgba(23, 32, 51, 0.24);
}

.game-hud .brand-lockup .kicker {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.82);
}

.game-hud .top-actions {
  grid-area: actions;
}

.game-hud .ghost-button,
.game-hud .ghost-link {
  min-height: 32px;
  padding: 6px 9px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(23, 32, 51, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.game-hud .resource-strip {
  grid-area: resources;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.game-hud .resource {
  min-height: 50px;
  padding: 7px 6px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #e9f5ff);
  box-shadow: 0 5px 0 rgba(23, 32, 51, 0.16), 0 10px 20px rgba(23, 32, 51, 0.18);
}

.game-hud .resource span {
  color: #55708f;
  font-size: 9px;
  line-height: 1;
}

.game-hud .resource strong {
  margin-top: 1px;
  color: #172033;
  font-size: 19px;
  line-height: 1;
}

.game-hud .resource-detail {
  margin-top: 3px;
  font-size: 8px;
  line-height: 1.1;
}

.first-stage {
  position: relative;
  min-height: calc(100svh - 104px);
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 5px;
}

.stage-village {
  position: relative;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.stage-village .village-scene {
  min-height: min(42svh, 312px);
  overflow: hidden;
  border: 0;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.92) 0 26px, transparent 27px),
    radial-gradient(circle at 75% 18%, rgba(255, 255, 255, 0.88) 0 37px, transparent 38px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(180deg, #8edfff 0%, #bff4ff 54%, #4eb17d 55%, #2f9f73 100%);
  box-shadow: inset 0 -14px 0 rgba(41, 126, 87, 0.18);
}

.stage-village .village-scene::after {
  bottom: 4px;
  height: 88px;
}

.stage-title {
  top: 8px;
  width: min(82%, 320px);
  padding: 7px 12px;
}

.stage-title h2 {
  font-size: 24px;
}

.stage-title strong {
  margin-top: 2px;
  font-size: 12px;
}

.stage-village .village-scene img {
  bottom: 12px;
  width: min(104%, 510px);
  max-height: none;
}

.stage-village .progress-track {
  left: 16px;
  right: 16px;
  bottom: 10px;
  height: 12px;
}

.stage-village .map-path {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: -3px 4px 0;
}

.stage-village .map-node {
  min-height: 39px;
  padding: 5px 3px;
}

.village-hotspot {
  width: 74px;
  min-height: 70px;
  padding: 5px 4px;
}

.village-hotspot .building-silhouette {
  width: 38px;
  height: 34px;
  margin-bottom: 2px;
  transform: rotate(var(--building-tilt)) scale(0.86);
}

.village-hotspot > strong {
  display: block;
  font-size: 10px;
  line-height: 1.05;
}

.village-hotspot > span:not(.building-silhouette) {
  display: none;
}

.village-hotspot > small {
  display: block;
  margin-top: 2px;
  padding: 2px 6px;
  color: #fff;
  background: linear-gradient(180deg, #2f9f73, #197454);
  font-size: 9px;
  line-height: 1;
}

.stage-dock {
  top: 88px;
  right: 5px;
  width: 64px;
  gap: 5px;
}

.dock-button {
  min-height: 45px;
  gap: 0;
  padding: 5px 3px;
}

.dock-button strong {
  font-size: 10px;
}

.dock-button span,
.dock-button small {
  font-size: 8px;
}

.stage-slot {
  padding: 8px 10px 9px;
  border-radius: 18px 18px 8px 8px;
}

.stage-slot .panel-head {
  margin-bottom: 5px;
}

.stage-slot .panel-head h2 {
  font-size: 18px;
}

.stage-slot .slot-frame {
  min-height: 90px;
  gap: 6px;
  margin-bottom: 6px;
  padding: 6px;
}

.stage-slot .reel {
  min-height: 74px;
}

.stage-slot .reel span {
  min-height: 36px;
  padding: 6px 4px;
  font-size: 11px;
}

.stage-slot .bet-controls {
  gap: 6px;
  margin-bottom: 7px;
}

.stage-slot .bet-button {
  min-height: 28px;
}

.stage-slot .primary-button {
  min-height: 48px;
  font-size: 27px;
}

.stage-slot .result-line {
  min-height: 30px;
  margin-top: 7px;
  padding: 6px 8px;
  font-size: 12px;
}

.game-grid {
  display: block;
  grid-template-columns: none;
}

@media (max-height: 680px) {
  .game-hud .resource {
    min-height: 46px;
    padding-block: 6px;
  }

  .stage-village .village-scene {
    min-height: 270px;
  }

  .stage-village .map-node {
    min-height: 34px;
  }

  .stage-slot .slot-frame {
    min-height: 82px;
  }

  .stage-slot .reel {
    min-height: 66px;
  }

  .stage-slot .result-line {
    min-height: 26px;
    margin-top: 6px;
    padding-block: 5px;
  }
}

@media (max-width: 420px) {
  .app-shell.game-stage-shell {
    padding-inline: 8px;
  }

  .topbar.game-hud {
    margin-inline: -8px;
    padding-inline: 8px;
  }

  .game-hud .resource-strip {
    gap: 4px;
  }

  .game-hud .resource {
    padding-inline: 5px;
  }

  .stage-village .village-scene {
    min-height: 286px;
  }

  .stage-dock {
    width: 58px;
  }

  .village-hotspot {
    width: 66px;
    min-height: 64px;
  }
}

/* Final Version 2 lock: this must remain at the true end of the stylesheet. */
body {
  color: var(--fb-ink) !important;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.52) 0%, rgba(255, 250, 240, 0) 28%),
    radial-gradient(circle at 16% 8%, rgba(255, 216, 226, 0.9) 0 70px, transparent 72px),
    radial-gradient(circle at 84% 10%, rgba(186, 225, 255, 0.85) 0 82px, transparent 84px),
    linear-gradient(180deg, #8bd7ff 0%, #d9f8ff 42%, #9be5a5 72%, #55bd83 100%) !important;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Trebuchet MS", Arial, sans-serif !important;
}

.app-shell.game-stage-shell {
  width: min(100%, 444px) !important;
  min-height: 100svh !important;
  padding: 0 10px 12px !important;
}

.topbar.game-hud {
  padding: 9px 10px 8px !important;
  background:
    linear-gradient(180deg, rgba(129, 204, 247, 0.96), rgba(154, 224, 250, 0.76) 72%, rgba(154, 224, 250, 0)) !important;
}

.game-hud .brand-lockup h1 {
  color: #fffaf4 !important;
  font-size: 33px !important;
  letter-spacing: 0 !important;
  text-shadow: 0 3px 0 #c75670, 0 7px 14px rgba(91, 54, 66, 0.28) !important;
}

.game-hud .brand-lockup .kicker {
  color: #7c3551 !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) !important;
}

.game-hud .resource-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

.game-hud .resource {
  min-height: 52px !important;
  border: 2px solid #f8d89a !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #fffaf0 0%, #f8d99f 100%) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.82), 0 4px 0 #c9833d, 0 9px 18px rgba(111, 64, 50, 0.2) !important;
}

.game-hud .resource strong {
  color: #57314a !important;
  font-size: 17px !important;
}

.first-stage {
  display: block !important;
  min-height: calc(100svh - 123px) !important;
}

body[data-screen="city"] .stage-slot {
  display: none !important;
}

body[data-screen="slot"] .stage-village,
body[data-screen="slot"] .stage-dock {
  display: none !important;
}

body[data-screen="slot"] .stage-slot {
  display: flex !important;
}

body[data-screen="slot"] .first-stage {
  display: grid !important;
  min-height: calc(100svh - 126px) !important;
}

.stage-village {
  min-height: calc(100svh - 126px) !important;
  padding-bottom: 8px !important;
}

.stage-village .village-scene {
  min-height: max(430px, calc(100svh - 330px)) !important;
  border: 3px solid rgba(255, 250, 240, 0.86) !important;
  border-radius: 28px 28px 36px 36px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, transparent 35%),
    linear-gradient(180deg, #bfefff 0%, #dff9ff 30%, #b4efa7 60%, #6ccc7f 100%) !important;
  box-shadow: inset 0 -18px 0 rgba(77, 143, 83, 0.22), 0 12px 0 rgba(122, 84, 58, 0.22), 0 24px 34px rgba(85, 54, 79, 0.2) !important;
}

.stage-village .village-scene::before {
  content: "" !important;
  position: absolute !important;
  inset: 12% 6% 6% !important;
  z-index: 0 !important;
  border-radius: 52% 48% 42% 44% !important;
  background:
    linear-gradient(90deg, rgba(255, 245, 205, 0.9), rgba(162, 225, 133, 0.9)),
    repeating-linear-gradient(35deg, transparent 0 32px, rgba(255, 255, 255, 0.2) 33px 36px) !important;
  box-shadow: inset 0 0 0 12px rgba(204, 161, 91, 0.22), inset 0 -18px 0 rgba(112, 172, 80, 0.3), 0 14px 0 rgba(131, 91, 57, 0.28) !important;
}

.stage-village .village-scene img {
  left: 50% !important;
  bottom: 74px !important;
  z-index: 2 !important;
  width: min(122%, 560px) !important;
  opacity: 0.74 !important;
  transform: translateX(-50%) !important;
  filter: saturate(1.18) contrast(1.04) !important;
}

.stage-title {
  top: 12px !important;
  z-index: 6 !important;
  width: min(78%, 340px) !important;
  border: 2px solid #ffd791 !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, #fff8e9, #ffdca0) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.9), 0 5px 0 #c9833d, 0 12px 20px rgba(103, 66, 67, 0.18) !important;
}

.stage-title h2 {
  color: #713b49 !important;
  font-size: 25px !important;
  letter-spacing: 0 !important;
}

.village-hotspot {
  z-index: 5 !important;
  width: 82px !important;
  min-height: 88px !important;
  border: 2px solid rgba(255, 248, 229, 0.92) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255, 252, 241, 0.92), rgba(255, 224, 169, 0.92)) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.86), 0 5px 0 #c68447, 0 14px 18px rgba(91, 61, 55, 0.18) !important;
}

.village-hotspot .building-silhouette {
  width: 46px !important;
  height: 42px !important;
  transform: none !important;
}

.stage-village .map-path {
  gap: 4px !important;
  margin: 8px 2px 0 !important;
}

.stage-village .map-node {
  min-height: 44px !important;
  border: 2px solid #ffd99a !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #fff9e8, #f6d49a) !important;
  box-shadow: 0 3px 0 #c9833d !important;
}

.city-actions {
  display: grid !important;
  grid-template-columns: 74px minmax(0, 1fr) 74px !important;
  gap: 8px !important;
  margin: 9px 2px 0 !important;
}

.city-action {
  min-height: 66px !important;
  border: 3px solid #f7d18d !important;
  border-radius: 20px !important;
  color: #713b49 !important;
  background: linear-gradient(180deg, #fffaf0, #ffd591) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.86), 0 5px 0 #c9833d !important;
}

.city-spin-button {
  min-height: 98px !important;
  border: 4px solid #ffd891 !important;
  border-radius: 34px !important;
  color: #fffaf0 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 34%), linear-gradient(180deg, #ff7f8a, #e93651 62%, #c92840) !important;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), 0 8px 0 #a45333, 0 16px 28px rgba(123, 49, 66, 0.32) !important;
}

.city-spin-button strong {
  font-size: 42px !important;
}

.stage-dock {
  top: 114px !important;
  right: 4px !important;
  width: 62px !important;
}

.dock-button {
  min-height: 50px !important;
  border: 2px solid #f6d292 !important;
  border-radius: 18px !important;
  color: #6d3b4b !important;
  background: linear-gradient(180deg, #fffaf0, #ffd996) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 3px 0 #c9833d !important;
}

.stage-slot {
  min-height: calc(100svh - 142px) !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 3px solid #ffd99d !important;
  border-radius: 28px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 22%), linear-gradient(180deg, #ff9ebb 0%, #f45f83 42%, #9a57d8 100%) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.62), 0 10px 0 #944f48, 0 22px 34px rgba(78, 43, 57, 0.3) !important;
}

.slot-screen-head {
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr) 70px !important;
}

.slot-screen-head h2 {
  color: #fffaf0 !important;
  font-size: 29px !important;
  letter-spacing: 0 !important;
}

.stage-slot .slot-frame {
  min-height: 150px !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 4px solid #f9d58f !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, #8e3b72, #562d67) !important;
}

.stage-slot .reel {
  min-height: 126px !important;
  border: 3px solid #ffe0a4 !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, #fffef4, #ffe4a8 52%, #f9bd5e) !important;
}

.stage-slot .reel span {
  min-height: 82px !important;
  border-radius: 18px !important;
  font-size: 11px !important;
}

.stage-slot .reel strong {
  font-size: 23px !important;
}

.stage-slot .primary-button {
  min-height: 74px !important;
  border-radius: 28px !important;
  font-size: 35px !important;
}

.stage-slot .result-line {
  min-height: 52px !important;
  font-size: 13px !important;
}

@media (max-height: 760px) {
  .stage-village .village-scene {
    min-height: 430px !important;
  }
}

@media (max-height: 680px) {
  .stage-village .village-scene {
    min-height: 382px !important;
  }

  .village-hotspot {
    width: 74px !important;
    min-height: 78px !important;
  }
}

@media (max-width: 390px) {
  .city-actions {
    grid-template-columns: 66px minmax(0, 1fr) 66px !important;
    gap: 6px !important;
  }

  .stage-dock {
    width: 56px !important;
  }
}

/* Version 2 playable MVP skin: pastel castle city plus slot gameplay. */
:root {
  --fb-ink: #4e2b39;
  --fb-deep: #7c3551;
  --fb-cream: #fff3d7;
  --fb-pearl: #fffaf0;
  --fb-gold: #f6b941;
  --fb-pink: #f27d9d;
  --fb-rose: #e84c68;
  --fb-blue: #6cc8f4;
  --fb-mint: #62c889;
  --fb-violet: #8a6be8;
  --fb-shadow: rgba(98, 54, 71, 0.25);
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--fb-ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.52) 0%, rgba(255, 250, 240, 0) 28%),
    radial-gradient(circle at 16% 8%, rgba(255, 216, 226, 0.9) 0 70px, transparent 72px),
    radial-gradient(circle at 84% 10%, rgba(186, 225, 255, 0.85) 0 82px, transparent 84px),
    linear-gradient(180deg, #8bd7ff 0%, #d9f8ff 42%, #9be5a5 72%, #55bd83 100%);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Trebuchet MS", Arial, sans-serif;
}

.app-shell.game-stage-shell {
  width: min(100%, 444px);
  min-height: 100svh;
  padding: 0 10px 12px;
  isolation: isolate;
}

.topbar.game-hud {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 9px 10px 8px;
  background:
    linear-gradient(180deg, rgba(129, 204, 247, 0.96), rgba(154, 224, 250, 0.76) 72%, rgba(154, 224, 250, 0));
}

.game-hud .brand-lockup h1 {
  color: #fffaf4;
  font-size: 33px;
  letter-spacing: 0;
  text-shadow:
    0 3px 0 #c75670,
    0 7px 14px rgba(91, 54, 66, 0.28);
}

.game-hud .brand-lockup .kicker {
  color: #7c3551;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.game-hud .resource-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.game-hud .resource {
  position: relative;
  min-height: 52px;
  padding: 7px 4px 6px;
  border: 2px solid #f8d89a;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf0 0%, #f8d99f 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.82),
    0 4px 0 #c9833d,
    0 9px 18px rgba(111, 64, 50, 0.2);
}

.game-hud .resource::before {
  content: "";
  width: 20px;
  height: 20px;
  margin: 0 auto 2px;
  display: block;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #fff29b, #f1ad29);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 2px 0 #b76d25;
}

.game-hud .resource:nth-child(2)::before {
  background: linear-gradient(180deg, #fff2a1, #e99f24);
}

.game-hud .resource:nth-child(3)::before {
  border-radius: 7px;
  background: linear-gradient(180deg, #bfe9ff, #5797d7);
}

.game-hud .resource:nth-child(4)::before {
  border-radius: 38% 38% 50% 50%;
  background: linear-gradient(180deg, #ffe78a, #f0a927);
  clip-path: polygon(50% 0, 62% 34%, 98% 36%, 69% 58%, 80% 94%, 50% 73%, 20% 94%, 31% 58%, 2% 36%, 38% 34%);
}

.game-hud .resource span {
  color: #8a5f38;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-hud .resource strong {
  color: #57314a;
  font-size: 17px;
  font-weight: 1000;
}

.resource-refill {
  height: 5px;
  border-radius: 999px;
  background: rgba(116, 79, 64, 0.15);
}

.resource-refill span {
  background: linear-gradient(90deg, #42bff4, #65df94);
}

.top-actions {
  gap: 4px;
}

.game-hud .ghost-button,
.game-hud .ghost-link {
  min-height: 34px;
  border-radius: 16px;
  color: #713b49;
  border: 2px solid #f1c276;
  background: linear-gradient(180deg, #fff9e8, #ffd98e);
  box-shadow: 0 3px 0 #c9833d;
  font-weight: 900;
}

.first-stage {
  min-height: calc(100svh - 123px);
  display: block;
}

body[data-screen="city"] .stage-slot {
  display: none;
}

body[data-screen="slot"] .stage-village,
body[data-screen="slot"] .stage-dock {
  display: none;
}

body[data-screen="slot"] .first-stage {
  display: grid;
  min-height: calc(100svh - 126px);
}

.stage-village {
  min-height: calc(100svh - 126px);
  padding-bottom: 8px;
}

.stage-village .village-scene {
  position: relative;
  min-height: clamp(470px, calc(100svh - 294px), 635px);
  border: 3px solid rgba(255, 250, 240, 0.86);
  border-radius: 28px 28px 36px 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, transparent 35%),
    linear-gradient(180deg, #bfefff 0%, #dff9ff 30%, #b4efa7 60%, #6ccc7f 100%);
  box-shadow:
    inset 0 -18px 0 rgba(77, 143, 83, 0.22),
    0 12px 0 rgba(122, 84, 58, 0.22),
    0 24px 34px rgba(85, 54, 79, 0.2);
}

.stage-village .village-scene::before {
  content: "";
  position: absolute;
  inset: 12% 6% 6%;
  border-radius: 52% 48% 42% 44%;
  background:
    linear-gradient(90deg, rgba(255, 245, 205, 0.9), rgba(162, 225, 133, 0.9)),
    repeating-linear-gradient(35deg, transparent 0 32px, rgba(255, 255, 255, 0.2) 33px 36px);
  box-shadow:
    inset 0 0 0 12px rgba(204, 161, 91, 0.22),
    inset 0 -18px 0 rgba(112, 172, 80, 0.3),
    0 14px 0 rgba(131, 91, 57, 0.28);
}

.stage-village .village-scene::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 11%;
  right: 11%;
  bottom: 72px;
  height: 58%;
  background:
    linear-gradient(34deg, transparent 0 45%, rgba(255, 241, 187, 0.95) 46% 49%, transparent 50%),
    linear-gradient(146deg, transparent 0 44%, rgba(255, 241, 187, 0.95) 45% 48%, transparent 49%);
  opacity: 0.42;
  pointer-events: none;
}

.stage-village .village-scene img {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(112%, 520px);
  max-height: none;
  opacity: 0.34;
  transform: translateX(-50%);
  filter: saturate(1.22) contrast(1.02);
  pointer-events: none;
}

.stage-title {
  left: 50%;
  top: 12px;
  width: min(78%, 340px);
  padding: 9px 14px 8px;
  border: 2px solid #ffd791;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8e9, #ffdca0);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    0 5px 0 #c9833d,
    0 12px 20px rgba(103, 66, 67, 0.18);
  transform: translateX(-50%);
}

.stage-title .label {
  color: #bf5d78;
  font-size: 10px;
}

.stage-title h2 {
  color: #713b49;
  font-size: 25px;
  letter-spacing: 0;
}

.stage-title strong {
  color: #9a5c30;
  font-size: 12px;
}

.village-hotspots {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.village-hotspot {
  --building-main: #fff0c9;
  --building-roof: #6fc4ef;
  --building-accent: #f4b94b;
  position: absolute;
  left: var(--desktop-x);
  top: var(--desktop-y);
  width: 82px;
  min-height: 88px;
  padding: 5px 5px 7px;
  border: 2px solid rgba(255, 248, 229, 0.92);
  border-radius: 18px;
  color: #6b3d49;
  background: linear-gradient(180deg, rgba(255, 252, 241, 0.92), rgba(255, 224, 169, 0.92));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.86),
    0 5px 0 #c68447,
    0 14px 18px rgba(91, 61, 55, 0.18);
  transform: translate(-50%, -50%);
  transition: transform 160ms ease, filter 160ms ease;
}

.village-hotspot:disabled {
  opacity: 1;
  filter: saturate(0.96);
}

.village-hotspot:not(:disabled):active {
  transform: translate(-50%, calc(-50% + 3px)) scale(0.98);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.86),
    0 2px 0 #c68447,
    0 8px 12px rgba(91, 61, 55, 0.16);
}

.village-hotspot.building-tower {
  --building-main: #fff3ce;
  --building-roof: #6bbff0;
  --building-accent: #f6bf3d;
}

.village-hotspot.building-hut {
  --building-main: #ffe8d8;
  --building-roof: #ef6d79;
  --building-accent: #9ad96a;
}

.village-hotspot.building-forge {
  --building-main: #f7e6ff;
  --building-roof: #966eea;
  --building-accent: #ffd05f;
}

.village-hotspot.building-dock {
  --building-main: #fff0c9;
  --building-roof: #f0aa3e;
  --building-accent: #67c7ec;
}

.village-hotspot.building-statue {
  --building-main: #fff6dc;
  --building-roof: #f6c54f;
  --building-accent: #f08da7;
}

.village-hotspot .building-silhouette {
  position: relative;
  display: block;
  width: 46px;
  height: 42px;
  margin: 0 auto 3px;
  transform: none;
}

.building-silhouette span {
  position: absolute;
  display: block;
}

.silhouette-base {
  left: 7px;
  right: 7px;
  bottom: 0;
  height: 20px;
  border: 2px solid #b97a4e;
  border-radius: 7px 7px 5px 5px;
  background: linear-gradient(180deg, var(--building-main), #f2c985);
}

.silhouette-core {
  left: 15px;
  right: 15px;
  bottom: 11px;
  height: 25px;
  border: 2px solid #b97a4e;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #fff9e9, var(--building-main));
}

.silhouette-roof {
  left: 10px;
  right: 10px;
  top: 1px;
  height: 18px;
  background: linear-gradient(180deg, #fff0a5, var(--building-roof));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.silhouette-accent {
  left: 20px;
  bottom: 2px;
  width: 7px;
  height: 13px;
  border-radius: 5px 5px 2px 2px;
  background: var(--building-accent);
}

.village-hotspot em {
  display: none;
}

.village-hotspot > strong {
  color: #633642;
  font-size: 10px;
  line-height: 1.04;
  letter-spacing: 0;
}

.village-hotspot > span:not(.building-silhouette) {
  display: none;
}

.village-hotspot > small {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #8bdc45, #44af52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 0 #278442;
  font-size: 9px;
  font-weight: 1000;
}

.village-hotspot.damaged > small {
  background: linear-gradient(180deg, #ffbd78, #e9775f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 0 #b54e45;
}

.village-hotspot.fresh-build {
  animation: freshBuildPop 680ms ease both;
}

.stage-village .progress-track {
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 13px;
  border: 2px solid #ffe1a8;
  background: rgba(100, 64, 50, 0.2);
  box-shadow: inset 0 2px 0 rgba(71, 44, 37, 0.14);
}

.stage-village .progress-track span {
  background: linear-gradient(90deg, #6cd7ff, #73df86, #ffd762);
}

.build-feedback {
  left: 16px;
  right: 16px;
  bottom: 34px;
  border: 2px solid #ffd791;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf0, #ffdba0);
  box-shadow: 0 6px 0 #c9833d, 0 16px 22px rgba(98, 54, 71, 0.18);
}

.stage-village .map-path {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 8px 2px 0;
}

.stage-village .map-node {
  min-height: 44px;
  padding: 5px 3px;
  border: 2px solid #ffd99a;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff9e8, #f6d49a);
  box-shadow: 0 3px 0 #c9833d;
}

.stage-village .map-node span {
  color: #fff;
  background: linear-gradient(180deg, #f5bf43, #e9892e);
}

.stage-village .map-node strong {
  color: #6a3a49;
  font-size: 8px;
  line-height: 1.02;
}

.stage-village .map-node.current {
  background: linear-gradient(180deg, #fff9e8, #ffd6e1);
}

.city-actions {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 74px;
  align-items: end;
  gap: 8px;
  margin: 9px 2px 0;
}

.city-action,
.city-spin-button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.city-action {
  min-height: 66px;
  border: 3px solid #f7d18d;
  border-radius: 20px;
  color: #713b49;
  background: linear-gradient(180deg, #fffaf0, #ffd591);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.86), 0 5px 0 #c9833d;
  font-weight: 1000;
}

.city-action::before {
  content: "";
  display: block;
  width: 34px;
  height: 28px;
  margin: 0 auto 3px;
  border-radius: 9px;
  background:
    linear-gradient(180deg, #aeea90, #53ba73);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 2px 0 #36865c;
}

.city-action.visit::before {
  border-radius: 50% 50% 42% 42%;
  background: linear-gradient(180deg, #b9e7ff, #669de4);
}

.city-action span {
  display: block;
  font-size: 13px;
  line-height: 1;
}

.city-spin-button {
  min-height: 98px;
  border: 4px solid #ffd891;
  border-radius: 34px;
  color: #fffaf0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(180deg, #ff7f8a, #e93651 62%, #c92840);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.5),
    0 8px 0 #a45333,
    0 16px 28px rgba(123, 49, 66, 0.32);
  animation: spinButtonBreath 2.4s ease-in-out infinite;
}

.city-spin-button:disabled {
  filter: grayscale(0.26);
  opacity: 0.75;
  animation: none;
}

.city-spin-button strong {
  display: block;
  font-size: 42px;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 3px 0 #9e253a, 0 7px 12px rgba(75, 30, 45, 0.28);
}

.city-spin-button small {
  display: block;
  margin-top: 6px;
  color: #ffe6a5;
  font-size: 13px;
  font-weight: 1000;
  text-shadow: 0 2px 0 rgba(130, 52, 42, 0.34);
}

.stage-dock {
  position: absolute;
  z-index: 10;
  top: 114px;
  right: 4px;
  width: 62px;
  display: grid;
  gap: 6px;
}

.dock-button {
  min-height: 50px;
  padding: 5px 3px;
  border: 2px solid #f6d292;
  border-radius: 18px;
  color: #6d3b4b;
  background: linear-gradient(180deg, #fffaf0, #ffd996);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 3px 0 #c9833d;
}

.dock-button.active {
  border-color: #ff9fbc;
  background: linear-gradient(180deg, #fff3f8, #ffc4d6);
}

.dock-button strong {
  color: #bf4e65;
  font-size: 10px;
}

.dock-button span,
.dock-button small {
  font-size: 8px;
  line-height: 1.04;
}

.stage-slot {
  min-height: calc(100svh - 142px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 3px solid #ffd99d;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 22%),
    linear-gradient(180deg, #ff9ebb 0%, #f45f83 42%, #9a57d8 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.62),
    0 10px 0 #944f48,
    0 22px 34px rgba(78, 43, 57, 0.3);
}

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

.slot-screen-head h2 {
  margin: 0;
  color: #fffaf0;
  font-size: 29px;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  text-shadow: 0 3px 0 #983b64, 0 8px 16px rgba(69, 30, 62, 0.32);
}

.slot-screen-head .label {
  color: #ffe7a8;
  text-align: center;
  text-shadow: 0 2px 0 rgba(104, 39, 69, 0.32);
}

.slot-back-button,
.slot-screen-head .meter-label {
  min-height: 42px;
  border: 2px solid #f7d18d;
  border-radius: 18px;
  color: #743846;
  background: linear-gradient(180deg, #fffaf0, #ffd99a);
  box-shadow: 0 4px 0 #b76e35;
  font-weight: 1000;
}

.slot-screen-head .meter-label {
  display: grid;
  place-items: center;
  padding: 0 6px;
  font-size: 11px;
}

.slot-back-button {
  cursor: pointer;
}

.stage-slot .slot-frame {
  flex: 0 0 auto;
  min-height: clamp(150px, 26svh, 230px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 4px solid #f9d58f;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #8e3b72, #562d67);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.2),
    inset 0 -6px 0 rgba(48, 21, 61, 0.24),
    0 7px 0 #7a383f;
}

.stage-slot .reel {
  min-height: clamp(126px, 22svh, 190px);
  border: 3px solid #ffe0a4;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #fffef4, #ffe4a8 52%, #f9bd5e);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.86),
    inset 0 -6px 0 rgba(169, 99, 44, 0.2),
    0 4px 0 #b8793f;
}

.stage-slot .reel span {
  min-height: 82px;
  width: 82%;
  padding: 8px 5px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf0, #ffd98f);
  color: #643344;
  box-shadow: 0 4px 0 rgba(180, 110, 47, 0.34);
}

.stage-slot .reel strong {
  font-size: 23px;
  line-height: 1;
}

.stage-slot .reel small {
  margin-top: 4px;
  color: #8a5a3d;
  font-size: 10px;
  font-weight: 1000;
}

.stage-slot .reel.coin span,
.pay-symbol.coin {
  background: linear-gradient(180deg, #fff3a6, #efae2f);
}

.stage-slot .reel.bag span,
.pay-symbol.bag {
  background: linear-gradient(180deg, #ffe0bb, #e58458);
}

.stage-slot .reel.hammer span,
.pay-symbol.hammer {
  background: linear-gradient(180deg, #ffd8eb, #dc6ba3);
}

.stage-slot .reel.raid span,
.pay-symbol.raid {
  background: linear-gradient(180deg, #c9efff, #67a5e8);
}

.stage-slot .reel.shield span,
.pay-symbol.shield {
  background: linear-gradient(180deg, #bff4ce, #4fbd75);
}

.stage-slot .reel.chest span,
.pay-symbol.chest {
  background: linear-gradient(180deg, #ffe2a8, #c9823a);
}

.stage-slot .reel.spinning span {
  animation: reelBounce 110ms ease-in-out infinite alternate;
}

.stage-slot .bet-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.stage-slot .bet-button {
  min-height: 42px;
  border: 2px solid #f9d58f;
  border-radius: 18px;
  color: #6d3b4b;
  background: linear-gradient(180deg, #fffaf0, #ffd391);
  box-shadow: 0 4px 0 #b76e35;
  font-size: 16px;
  font-weight: 1000;
}

.stage-slot .bet-button.active {
  color: #fffaf0;
  background: linear-gradient(180deg, #7bdcff, #3f9add);
  box-shadow: 0 4px 0 #2c6fa8;
}

.stage-slot .primary-button {
  min-height: 74px;
  border: 4px solid #ffd891;
  border-radius: 28px;
  color: #fffaf0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(180deg, #ff7d89, #e93451 62%, #c5263f);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.42),
    0 7px 0 #9a4f34,
    0 16px 24px rgba(86, 38, 48, 0.26);
  font-size: 35px;
  text-shadow: 0 3px 0 #a32138;
}

.stage-slot .result-line {
  min-height: 52px;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  border: 2px solid #f9d58f;
  border-radius: 18px;
  color: #683648;
  background: linear-gradient(180deg, #fffaf0, #ffe4b4);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.86), 0 4px 0 #b76e35;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.spin-result-pop {
  animation: resultPop 420ms ease both;
}

.stage-slot .paytable-panel {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 168px !important;
  overflow: auto !important;
  padding: 8px;
  border: 2px solid rgba(255, 232, 177, 0.88);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.87);
}

.paytable-head {
  color: #673747;
}

.payline {
  min-height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.pay-symbol {
  color: #633642;
  font-size: 9px;
  font-weight: 1000;
}

.game-grid.open {
  position: fixed;
  z-index: 40;
  left: 50%;
  right: auto;
  bottom: 10px;
  width: min(calc(100% - 20px), 430px);
  max-height: min(72svh, 620px);
  overflow: auto;
  padding: 14px;
  border: 3px solid #ffd99d;
  border-radius: 26px;
  background: linear-gradient(180deg, #fffaf0, #ffe0be);
  box-shadow: 0 10px 0 #b76e35, 0 26px 42px rgba(78, 43, 57, 0.36);
  transform: translateX(-50%);
}

.system-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.panel-head h2,
.system-panel h2 {
  color: #6a3646;
  letter-spacing: 0;
}

.target-building,
.modal-target,
.visit-building,
.building-card,
.social-row,
.event-milestone,
.album-set,
.companion-card,
.daily-reward,
.tournament-summary,
.raid-target-strip,
.defense-copy,
.threat-meter {
  border-color: #f4cf8b;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf0, #ffe6c1);
}

.modal-card {
  border: 3px solid #ffd99d;
  border-radius: 28px;
  background: linear-gradient(180deg, #fffaf0, #ffe0be);
  box-shadow: 0 10px 0 #b76e35, 0 28px 48px rgba(78, 43, 57, 0.36);
}

.modal-card h2 {
  color: #6a3646;
  letter-spacing: 0;
}

.modal-close,
.drawer-close,
.secondary-button,
.mini-social-button {
  border-radius: 16px;
  font-weight: 1000;
}

@keyframes spinButtonBreath {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.018);
  }
}

@keyframes reelBounce {
  from {
    transform: translateY(-5px) scale(1.02);
    filter: brightness(1.04);
  }

  to {
    transform: translateY(5px) scale(0.98);
    filter: brightness(0.96);
  }
}

@keyframes resultPop {
  0% {
    transform: scale(0.96);
  }

  45% {
    transform: scale(1.035);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes freshBuildPop {
  0% {
    transform: translate(-50%, -50%) scale(0.82);
    filter: brightness(1.2);
  }

  55% {
    transform: translate(-50%, -55%) scale(1.09);
  }

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

@media (max-height: 760px) {
  .stage-village .village-scene {
    min-height: 430px;
  }

  .city-spin-button {
    min-height: 86px;
  }

  .city-action {
    min-height: 58px;
  }

  .stage-slot .slot-frame {
    min-height: 134px;
  }

  .stage-slot .reel {
    min-height: 110px;
  }
}

@media (max-height: 680px) {
  .stage-village .village-scene {
    min-height: 382px;
  }

  .village-hotspot {
    width: 74px;
    min-height: 78px;
  }

  .village-hotspot .building-silhouette {
    width: 40px;
    height: 36px;
  }

  .stage-village .map-node {
    min-height: 36px;
  }

  .city-spin-button strong {
    font-size: 36px;
  }
}

@media (max-width: 390px) {
  .app-shell.game-stage-shell {
    padding-inline: 7px;
  }

  .topbar.game-hud {
    margin-inline: -7px;
    padding-inline: 7px;
  }

  .game-hud .resource-strip {
    gap: 4px;
  }

  .game-hud .resource {
    border-radius: 15px;
  }

  .village-hotspot {
    width: 70px;
  }

  .city-actions {
    grid-template-columns: 66px minmax(0, 1fr) 66px;
    gap: 6px;
  }

  .stage-dock {
    width: 56px;
  }

  .dock-button {
    min-height: 47px;
  }
}

/* Visual parity pass: asset-driven casual casino shell. Keep this as the true end. */
:root {
  --parity-ink: #3e2426;
  --parity-brown: #5c341c;
  --parity-gold: #ffc94e;
  --parity-gold-dark: #9d5a18;
  --parity-cream: #fff1c8;
  --parity-red: #e9334b;
  --parity-pink: #ed5b91;
  --parity-blue: #4fb6f3;
  --parity-green: #55c05f;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0 !important;
  color: var(--parity-ink) !important;
  background: #76cdfa !important;
  font-family: ui-rounded, "SF Pro Rounded", "Trebuchet MS", Arial, sans-serif !important;
}

.app-shell.game-stage-shell {
  position: relative !important;
  width: min(100%, 430px) !important;
  min-height: 100svh !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, rgba(255, 244, 218, 0.3), rgba(255, 244, 218, 0) 20%),
    #87d8ff !important;
  box-shadow: 0 0 0 1px rgba(68, 46, 72, 0.1), 0 0 38px rgba(54, 73, 126, 0.18) !important;
}

.topbar.game-hud {
  position: relative !important;
  z-index: 50 !important;
  height: 74px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  align-items: start !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 8px 7px 6px !important;
  background:
    linear-gradient(180deg, rgba(255, 246, 219, 0.5), rgba(255, 246, 219, 0.04)),
    linear-gradient(180deg, rgba(101, 190, 245, 0.9), rgba(101, 190, 245, 0)) !important;
}

.game-hud .brand-lockup {
  display: none !important;
}

.game-hud .resource-strip {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100% !important;
}

.game-hud .resource {
  position: relative !important;
  min-width: 0 !important;
  height: 47px !important;
  min-height: 47px !important;
  max-height: 47px !important;
  display: grid !important;
  grid-template-columns: 25px minmax(0, 1fr) !important;
  grid-template-rows: 24px 13px !important;
  grid-template-areas:
    "icon value"
    "label label" !important;
  column-gap: 3px !important;
  align-items: center !important;
  align-content: center !important;
  padding: 4px 5px 3px !important;
  border: 2px solid #f7c96f !important;
  border-radius: 15px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #5e3a26, #271718) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.34),
    0 3px 0 #8d5119,
    0 7px 13px rgba(54, 31, 29, 0.25) !important;
}

.game-hud .resource i {
  grid-area: icon !important;
  position: relative !important;
  width: 25px !important;
  height: 25px !important;
  display: block !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #fff58b, #e79a21) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(140, 77, 14, 0.38),
    0 2px 0 #7c4315 !important;
}

.game-hud .resource i::after {
  content: "" !important;
  position: absolute !important;
  inset: 6px !important;
  border: 2px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: inherit !important;
}

.game-hud .resource-spins i {
  border-radius: 42% !important;
  background: linear-gradient(180deg, #ffcadf, #d44888) !important;
}

.game-hud .resource-stars i {
  clip-path: polygon(50% 0, 62% 34%, 99% 36%, 69% 58%, 80% 96%, 50% 74%, 20% 96%, 31% 58%, 1% 36%, 38% 34%) !important;
  border-radius: 0 !important;
}

.game-hud .resource-shields i {
  border-radius: 38% 38% 50% 50% !important;
  background: linear-gradient(180deg, #8ed6ff, #3c72c9) !important;
  clip-path: polygon(50% 0, 92% 14%, 86% 65%, 50% 100%, 14% 65%, 8% 14%) !important;
}

.game-hud .resource span {
  grid-area: label !important;
  display: block !important;
  min-width: 0 !important;
  color: #ffe9a8 !important;
  font-size: 8px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-transform: none !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4) !important;
}

.game-hud .resource strong {
  grid-area: value !important;
  min-width: 0 !important;
  color: #fff7de !important;
  font-size: clamp(12px, 3.2vw, 15px) !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.48) !important;
}

.game-hud .resource-detail,
.game-hud .resource-refill {
  display: none !important;
}

.top-actions {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 42px !important;
  display: block !important;
}

.game-hud .ghost-link {
  display: none !important;
}

.game-hud .ghost-button {
  position: relative !important;
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 2px solid #f7c96f !important;
  border-radius: 13px !important;
  font-size: 0 !important;
  background: linear-gradient(180deg, #ffc66d, #df7b29) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #8d5119 !important;
}

.game-hud .ghost-button::before,
.game-hud .ghost-button::after {
  content: "" !important;
  position: absolute !important;
  left: 10px !important;
  right: 10px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: #fff6df !important;
  box-shadow: 0 9px 0 #fff6df !important;
}

.game-hud .ghost-button::before {
  top: 30px !important;
}

.game-hud .ghost-button::after {
  display: none !important;
}

.first-stage {
  position: relative !important;
  min-height: calc(100svh - 74px) !important;
  display: block !important;
}

body[data-screen="city"] .stage-slot {
  display: none !important;
}

body[data-screen="slot"] .stage-village,
body[data-screen="slot"] .stage-dock {
  display: none !important;
}

body[data-screen="slot"] .stage-slot {
  display: block !important;
}

body[data-screen="slot"] .first-stage {
  min-height: calc(100svh - 74px) !important;
  display: block !important;
}

.stage-village {
  position: relative !important;
  min-height: calc(100svh - 74px) !important;
  padding: 0 !important;
}

.stage-village .village-scene {
  position: relative !important;
  min-height: calc(100svh - 74px) !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 0 20px 20px !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, rgba(89, 185, 245, 0.16), rgba(255, 255, 255, 0) 18%, rgba(64, 35, 56, 0) 74%, rgba(64, 35, 56, 0.18)),
    url("/assets/fortunebound-city-map.png") center 46% / cover no-repeat !important;
  box-shadow: none !important;
}

.stage-village .village-scene::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 24%),
    linear-gradient(180deg, rgba(255, 246, 218, 0.08), rgba(255, 246, 218, 0) 45%, rgba(80, 42, 54, 0.14)) !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

.stage-village .village-scene::after {
  display: none !important;
}

.stage-village .village-scene > img {
  display: none !important;
}

.stage-title {
  position: absolute !important;
  top: 10px !important;
  left: 50% !important;
  z-index: 8 !important;
  width: min(64%, 282px) !important;
  min-height: 58px !important;
  padding: 9px 16px 8px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 19px !important;
  color: #fff8df !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #f05d7e, #bd2d46) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.44),
    0 4px 0 #8c3d2b,
    0 11px 18px rgba(69, 36, 48, 0.28) !important;
  transform: translateX(-50%) !important;
}

.stage-title::before,
.stage-title::after {
  content: "" !important;
  position: absolute !important;
  top: 12px !important;
  width: 21px !important;
  height: 32px !important;
  background: linear-gradient(180deg, #d83f62, #9f263d) !important;
  z-index: -1 !important;
}

.stage-title::before {
  left: -13px !important;
  clip-path: polygon(0 0, 100% 12%, 100% 88%, 0 100%, 34% 50%) !important;
}

.stage-title::after {
  right: -13px !important;
  clip-path: polygon(100% 0, 0 12%, 0 88%, 100% 100%, 66% 50%) !important;
}

.stage-title .label {
  margin: 0 !important;
  color: #ffe89f !important;
  font-size: 9px !important;
  font-weight: 1000 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  text-shadow: 0 1px 0 rgba(87, 39, 32, 0.45) !important;
}

.stage-title h2 {
  margin: 1px 0 0 !important;
  color: #fff9e5 !important;
  font-size: clamp(16px, 5vw, 22px) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 2px 0 #7e2b35, 0 5px 10px rgba(80, 35, 47, 0.28) !important;
}

.stage-title strong {
  display: block !important;
  margin-top: 3px !important;
  color: #fff2ba !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-shadow: 0 1px 0 rgba(87, 39, 32, 0.45) !important;
}

.village-hotspots {
  position: absolute !important;
  inset: 0 !important;
  z-index: 6 !important;
  pointer-events: none !important;
}

.village-hotspot {
  position: absolute !important;
  left: var(--desktop-x) !important;
  top: var(--desktop-y) !important;
  width: 114px !important;
  min-height: 42px !important;
  padding: 5px 28px 5px 9px !important;
  border: 2px solid #ffd46f !important;
  border-radius: 10px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ec536f, #b72b42) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 3px 0 #823725,
    0 8px 13px rgba(59, 29, 33, 0.28) !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

.village-hotspot::before,
.village-hotspot::after {
  content: "" !important;
  position: absolute !important;
  top: 9px !important;
  width: 13px !important;
  height: 24px !important;
  background: #9f263d !important;
  z-index: -1 !important;
}

.village-hotspot::before {
  left: -8px !important;
  clip-path: polygon(0 0, 100% 14%, 100% 86%, 0 100%, 35% 50%) !important;
}

.village-hotspot::after {
  right: -8px !important;
  clip-path: polygon(100% 0, 0 14%, 0 86%, 100% 100%, 65% 50%) !important;
}

.village-hotspot:disabled {
  opacity: 1 !important;
  filter: none !important;
  cursor: default !important;
}

.village-hotspot:not(:disabled):active {
  transform: translate(-50%, calc(-50% + 2px)) scale(0.98) !important;
}

.village-hotspot .building-silhouette,
.village-hotspot em,
.village-hotspot > span:not(.building-silhouette) {
  display: none !important;
}

.village-hotspot > strong {
  display: block !important;
  color: #fff9e8 !important;
  font-size: 11px !important;
  font-weight: 1000 !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
  overflow: visible !important;
  text-align: left !important;
  text-overflow: clip !important;
  text-shadow: 0 2px 0 rgba(101, 36, 38, 0.55) !important;
  white-space: normal !important;
}

.village-hotspot > small {
  position: absolute !important;
  right: -9px !important;
  bottom: -9px !important;
  width: 32px !important;
  height: 32px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 3px solid #fff3ba !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: linear-gradient(180deg, #9ce750, #42ab45) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #257c31 !important;
  font-size: 8px !important;
  font-weight: 1000 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.village-hotspot > small::before {
  content: "" !important;
  width: 13px !important;
  height: 13px !important;
  display: block !important;
  background: #fff !important;
  clip-path: polygon(50% 0, 100% 44%, 71% 44%, 71% 100%, 29% 100%, 29% 44%, 0 44%) !important;
}

.village-hotspot > small {
  text-indent: -999px !important;
}

.village-hotspot.damaged > small {
  background: linear-gradient(180deg, #ffbd78, #e85f62) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #a33c3e !important;
}

.stage-village .progress-track,
.stage-village .map-path {
  display: none !important;
}

.build-feedback {
  z-index: 20 !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 128px !important;
}

.city-actions {
  position: absolute !important;
  z-index: 30 !important;
  left: 8px !important;
  right: 8px !important;
  bottom: 8px !important;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) 72px !important;
  align-items: end !important;
  gap: 8px !important;
  margin: 0 !important;
}

.city-action {
  min-height: 70px !important;
  padding: 6px 4px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 19px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #62cfff, #3988d5) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 5px 0 #77502d,
    0 10px 16px rgba(56, 30, 35, 0.3) !important;
  text-shadow: 0 2px 0 rgba(48, 54, 105, 0.5) !important;
}

.city-action.visit {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ff9bb5, #d84372) !important;
}

.city-action::before {
  width: 38px !important;
  height: 32px !important;
  margin: 0 auto 4px !important;
  border: 2px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 9px !important;
  background:
    linear-gradient(145deg, transparent 45%, rgba(207, 65, 82, 0.86) 46% 58%, transparent 59%),
    linear-gradient(180deg, #b9f19a, #45b964) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 2px 0 rgba(48, 69, 53, 0.35) !important;
}

.city-action.visit::before {
  border-radius: 12px !important;
  background:
    radial-gradient(circle at 50% 32%, #fff 0 5px, transparent 6px),
    linear-gradient(180deg, #fff2a8, #ff77aa) !important;
}

.city-action span {
  color: #fff9e8 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  text-shadow: 0 2px 0 rgba(67, 40, 56, 0.58) !important;
}

.city-spin-button {
  min-height: 96px !important;
  padding: 9px 8px 8px !important;
  border: 4px solid #ffd46f !important;
  border-radius: 34px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 35%),
    linear-gradient(180deg, #ff7382, #e92343 62%, #b91730) !important;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.5),
    inset 0 -5px 0 rgba(123, 30, 43, 0.22),
    0 8px 0 #88451f,
    0 16px 25px rgba(66, 31, 41, 0.38) !important;
}

.city-spin-button strong {
  font-size: clamp(42px, 12vw, 56px) !important;
  line-height: 0.9 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 4px 0 #8f1d2d, 0 8px 14px rgba(70, 26, 38, 0.36) !important;
}

.city-spin-button small {
  margin-top: 7px !important;
  color: #ffe7a8 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  text-shadow: 0 2px 0 rgba(93, 39, 36, 0.54) !important;
}

.stage-dock {
  position: absolute !important;
  z-index: 24 !important;
  inset: 0 !important;
  width: auto !important;
  display: block !important;
  pointer-events: none !important;
}

.dock-button {
  position: absolute !important;
  width: 68px !important;
  min-height: 64px !important;
  display: grid !important;
  grid-template-rows: 28px 16px 11px !important;
  place-items: center !important;
  padding: 5px 4px 4px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 17px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #4fb5ef, #2c76b8) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.38),
    0 4px 0 #6f421e,
    0 8px 14px rgba(48, 29, 38, 0.3) !important;
  pointer-events: auto !important;
  text-shadow: 0 2px 0 rgba(50, 39, 82, 0.54) !important;
}

.dock-button:nth-child(1) { left: 7px !important; top: 18px !important; }
.dock-button:nth-child(2) { left: 7px !important; top: 88px !important; }
.dock-button:nth-child(3) { left: 7px !important; top: 158px !important; }
.dock-button:nth-child(4) { left: 7px !important; top: 228px !important; }
.dock-button:nth-child(5) { right: 7px !important; top: 26px !important; }
.dock-button:nth-child(6) { right: 7px !important; top: 96px !important; }
.dock-button:nth-child(7) { right: 7px !important; top: 166px !important; }
.dock-button:nth-child(8) { right: 7px !important; top: 236px !important; }

.dock-button:nth-child(2),
.dock-button:nth-child(4),
.dock-button:nth-child(6),
.dock-button:nth-child(8) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ff82ab, #c83e74) !important;
}

.dock-button.active {
  filter: brightness(1.08) saturate(1.1) !important;
  transform: translateY(2px) !important;
}

.dock-button strong {
  width: 31px !important;
  height: 27px !important;
  display: grid !important;
  place-items: center !important;
  border: 2px solid rgba(255, 255, 255, 0.68) !important;
  border-radius: 10px !important;
  color: #fff9e8 !important;
  background: linear-gradient(180deg, #ffe05c, #e98527) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 2px 0 rgba(94, 47, 20, 0.34) !important;
  font-size: 8px !important;
  line-height: 1 !important;
}

.dock-button span {
  max-width: 60px !important;
  color: #fff9e8 !important;
  font-size: 10px !important;
  font-weight: 1000 !important;
  line-height: 0.95 !important;
  overflow: hidden !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.dock-button small {
  max-width: 58px !important;
  color: #ffe6a8 !important;
  font-size: 8px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.stage-slot {
  position: relative !important;
  min-height: calc(100svh - 74px) !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 0 20px 20px !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 42%, rgba(48, 21, 48, 0.13)),
    url("/assets/fortunebound-slot-cabinet.png") center center / cover no-repeat !important;
  box-shadow: none !important;
}

.stage-slot::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  background: linear-gradient(180deg, rgba(255, 244, 217, 0.08), rgba(255, 244, 217, 0) 48%, rgba(76, 33, 55, 0.12)) !important;
  pointer-events: none !important;
}

.slot-screen-head {
  position: absolute !important;
  z-index: 12 !important;
  top: 10px !important;
  left: 8px !important;
  right: 8px !important;
  display: grid !important;
  grid-template-columns: 66px minmax(0, 1fr) 66px !important;
  align-items: center !important;
  gap: 8px !important;
}

.slot-screen-head > div {
  visibility: hidden !important;
}

.slot-back-button,
.slot-screen-head .meter-label {
  min-height: 39px !important;
  padding: 0 7px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 16px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ff98ad, #cf3d64) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38), 0 4px 0 #88451f !important;
  font-size: 13px !important;
  font-weight: 1000 !important;
  text-shadow: 0 2px 0 rgba(82, 33, 46, 0.56) !important;
}

.slot-screen-head .meter-label {
  display: grid !important;
  place-items: center !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
}

.slot-jackpot {
  position: absolute !important;
  z-index: 11 !important;
  top: 118px !important;
  left: 50% !important;
  width: min(62%, 258px) !important;
  min-height: 60px !important;
  display: grid !important;
  place-items: center !important;
  padding: 7px 14px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 17px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #65315d, #32183f) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.26),
    0 4px 0 #7f3a24,
    0 10px 16px rgba(50, 22, 40, 0.32) !important;
  transform: translateX(-50%) !important;
  text-align: center !important;
}

.slot-jackpot span {
  color: #ffd95e !important;
  font-size: 12px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  text-shadow: 0 2px 0 rgba(91, 34, 42, 0.6) !important;
}

.slot-jackpot strong {
  color: #fff9e8 !important;
  font-size: clamp(22px, 7vw, 30px) !important;
  line-height: 1 !important;
  text-shadow: 0 3px 0 #8b2a35, 0 6px 12px rgba(50, 22, 40, 0.35) !important;
}

.slot-side-actions {
  position: absolute !important;
  z-index: 13 !important;
  top: 88px !important;
  width: 68px !important;
  display: grid !important;
  gap: 8px !important;
}

.slot-side-left {
  left: 7px !important;
}

.slot-side-right {
  right: 7px !important;
}

.slot-side-button {
  position: relative !important;
  min-height: 62px !important;
  display: grid !important;
  grid-template-rows: 28px 14px !important;
  place-items: center !important;
  padding: 5px 3px 4px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 17px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.27), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #65cafa, #2e7ac3) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.36), 0 4px 0 #6f421e, 0 8px 14px rgba(48, 29, 38, 0.28) !important;
  font: inherit !important;
  pointer-events: none !important;
}

.slot-side-button:nth-child(even) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.27), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ff87af, #c43b73) !important;
}

.slot-side-button::before {
  content: "" !important;
  width: 32px !important;
  height: 27px !important;
  display: block !important;
  border: 2px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 9px !important;
  background:
    radial-gradient(circle at 50% 42%, #fff 0 5px, transparent 6px),
    linear-gradient(180deg, #ffe45f, #ed8d24) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 2px 0 rgba(94, 47, 20, 0.34) !important;
}

.slot-side-button strong {
  max-width: 58px !important;
  color: #fff9e8 !important;
  font-size: 10px !important;
  font-weight: 1000 !important;
  line-height: 0.95 !important;
  overflow: hidden !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-shadow: 0 2px 0 rgba(50, 39, 82, 0.54) !important;
}

.slot-side-button span {
  position: absolute !important;
  top: -10px !important;
  right: -8px !important;
  min-width: 23px !important;
  height: 23px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 4px !important;
  border: 2px solid #fff0b4 !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: linear-gradient(180deg, #ff7e91, #d62145) !important;
  box-shadow: 0 2px 0 #87321f !important;
  font-size: 9px !important;
  font-weight: 1000 !important;
}

.stage-slot .slot-frame {
  position: absolute !important;
  z-index: 10 !important;
  left: 17.2% !important;
  right: 17.2% !important;
  top: 35.8% !important;
  min-height: 0 !important;
  height: 27.2% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.stage-slot .reel {
  min-height: 0 !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 4px 3px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: rgba(255, 244, 215, 0.18) !important;
  box-shadow: none !important;
}

.stage-slot .reel span,
.stage-slot .reel .reel-tile {
  position: relative !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 12px !important;
  place-items: center !important;
  padding: 4px 2px 3px !important;
  border: 2px solid rgba(255, 230, 171, 0.88) !important;
  border-radius: 13px !important;
  color: #623244 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, #fff2bc, #f0ad40) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.78), 0 2px 0 rgba(111, 67, 34, 0.22) !important;
  transform: none !important;
}

.stage-slot .reel .reel-tile.selected {
  filter: brightness(1.04) saturate(1.08) !important;
}

.stage-slot .reel strong {
  position: relative !important;
  width: 34px !important;
  height: 30px !important;
  display: block !important;
  overflow: hidden !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.stage-slot .reel strong::before,
.pay-symbol::before {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  display: block !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #fff38a, #e79a21) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.62), inset 0 -2px 0 rgba(126, 73, 20, 0.3) !important;
}

.stage-slot .reel .bag strong::before,
.pay-symbol.bag::before {
  border-radius: 7px 7px 11px 11px !important;
  background:
    linear-gradient(90deg, transparent 0 38%, rgba(155, 81, 43, 0.48) 39% 61%, transparent 62%),
    linear-gradient(180deg, #ffd6a2, #de7947) !important;
}

.stage-slot .reel .hammer strong::before,
.pay-symbol.hammer::before {
  inset: 1px 5px 3px !important;
  border-radius: 7px !important;
  background:
    linear-gradient(90deg, transparent 42%, #8e4e2c 43% 57%, transparent 58%),
    linear-gradient(180deg, #eec6ff, #9c58de) !important;
  transform: rotate(-18deg) !important;
}

.stage-slot .reel .raid strong::before,
.pay-symbol.raid::before {
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 5px, transparent 6px),
    linear-gradient(180deg, #ffcf8a, #c87935) !important;
}

.stage-slot .reel .shield strong::before,
.pay-symbol.shield::before {
  border-radius: 0 !important;
  clip-path: polygon(50% 0, 92% 16%, 84% 65%, 50% 100%, 16% 65%, 8% 16%) !important;
  background: linear-gradient(180deg, #9ed8ff, #3e79d5) !important;
}

.stage-slot .reel .chest strong::before,
.pay-symbol.chest::before {
  border-radius: 7px !important;
  background:
    linear-gradient(90deg, transparent 0 43%, #9a4a25 44% 56%, transparent 57%),
    linear-gradient(180deg, #ffe091, #ba6a2f) !important;
}

.stage-slot .reel .spin strong::before,
.pay-symbol.spin::before {
  border-radius: 42% !important;
  background:
    conic-gradient(from 20deg, #fff0a5, #ff85aa, #77d4ff, #fff0a5) !important;
}

.stage-slot .reel small {
  max-width: 100% !important;
  color: #74413b !important;
  font-size: 7px !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

.stage-slot .reel.spinning .reel-tile {
  animation: reelBounce 110ms ease-in-out infinite alternate !important;
}

.stage-slot .result-line {
  position: absolute !important;
  z-index: 12 !important;
  left: 16% !important;
  right: 16% !important;
  top: 63.8% !important;
  min-height: 32px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 5px 10px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 16px !important;
  color: #fff7df !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #67335f, #331a40) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 3px 0 #843b25 !important;
  font-size: 10px !important;
  font-weight: 1000 !important;
  line-height: 1.1 !important;
  overflow: hidden !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
}

.stage-slot .bet-controls {
  position: absolute !important;
  z-index: 14 !important;
  left: 18% !important;
  right: 18% !important;
  bottom: 111px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
}

.stage-slot .bet-button {
  min-height: 39px !important;
  border: 3px solid #ffd46f !important;
  border-radius: 15px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #6b4427, #2c1917) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 4px 0 #8a4a1d !important;
  font-size: 17px !important;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55) !important;
}

.stage-slot .bet-button.active {
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ff6d86, #d72848) !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.32), 0 4px 0 #85431d !important;
}

.stage-slot .primary-button {
  position: absolute !important;
  z-index: 15 !important;
  left: 58px !important;
  right: 58px !important;
  width: auto !important;
  bottom: 18px !important;
  min-height: 82px !important;
  padding: 7px 10px !important;
  border: 4px solid #ffd46f !important;
  border-radius: 32px !important;
  color: #fff9e8 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #ff7382, #e92343 62%, #b91730) !important;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.5),
    inset 0 -5px 0 rgba(123, 30, 43, 0.22),
    0 8px 0 #88451f,
    0 16px 25px rgba(66, 31, 41, 0.38) !important;
  font-size: clamp(31px, 9.5vw, 45px) !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  text-shadow: 0 4px 0 #8f1d2d, 0 8px 14px rgba(70, 26, 38, 0.36) !important;
}

.stage-slot .paytable-panel {
  display: none !important;
}

.game-grid.open {
  z-index: 80 !important;
  border: 3px solid #ffd46f !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, #fff6df, #ffd8ad) !important;
}

@media (max-height: 760px) {
  .topbar.game-hud {
    height: 68px !important;
    padding-top: 6px !important;
  }

  .first-stage,
  .stage-village,
  .stage-village .village-scene,
  body[data-screen="slot"] .first-stage,
  .stage-slot {
    min-height: calc(100svh - 68px) !important;
  }

  .stage-title {
    top: 22px !important;
    min-height: 52px !important;
    padding-block: 7px !important;
  }

  .dock-button {
    min-height: 58px !important;
  }

  .dock-button:nth-child(1) { top: 12px !important; }
  .dock-button:nth-child(2) { top: 75px !important; }
  .dock-button:nth-child(3) { top: 138px !important; }
  .dock-button:nth-child(4) { top: 201px !important; }
  .dock-button:nth-child(5) { top: 20px !important; }
  .dock-button:nth-child(6) { top: 83px !important; }
  .dock-button:nth-child(7) { top: 146px !important; }
  .dock-button:nth-child(8) { top: 209px !important; }

  .slot-jackpot {
    top: 102px !important;
  }

  .slot-side-actions {
    top: 76px !important;
  }

  .slot-side-button {
    min-height: 55px !important;
  }

  .stage-slot .primary-button {
    min-height: 72px !important;
    bottom: 14px !important;
  }

  .stage-slot .bet-controls {
    bottom: 98px !important;
  }
}

@media (max-height: 680px) {
  .topbar.game-hud {
    height: 63px !important;
  }

  .game-hud .resource {
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
  }

  .game-hud .resource i {
    width: 22px !important;
    height: 22px !important;
  }

  .first-stage,
  .stage-village,
  .stage-village .village-scene,
  body[data-screen="slot"] .first-stage,
  .stage-slot {
    min-height: calc(100svh - 63px) !important;
  }

  .stage-title {
    transform: translateX(-50%) scale(0.92) !important;
    transform-origin: top center !important;
  }

  .village-hotspot {
    transform: translate(-50%, -50%) scale(0.88) !important;
  }

  .dock-button {
    width: 62px !important;
    min-height: 50px !important;
    border-radius: 15px !important;
  }

  .dock-button:nth-child(1) { top: 8px !important; }
  .dock-button:nth-child(2) { top: 63px !important; }
  .dock-button:nth-child(3) { top: 118px !important; }
  .dock-button:nth-child(4) { top: 173px !important; }
  .dock-button:nth-child(5) { top: 14px !important; }
  .dock-button:nth-child(6) { top: 69px !important; }
  .dock-button:nth-child(7) { top: 124px !important; }
  .dock-button:nth-child(8) { top: 179px !important; }

  .city-actions {
    grid-template-columns: 64px minmax(0, 1fr) 64px !important;
  }

  .city-action {
    min-height: 60px !important;
  }

  .city-spin-button {
    min-height: 82px !important;
  }

  .slot-side-actions {
    display: none !important;
  }

  .slot-jackpot {
    top: 86px !important;
  }
}

@media (max-width: 390px) {
  .topbar.game-hud {
    grid-template-columns: minmax(0, 1fr) 39px !important;
    gap: 4px !important;
    padding-inline: 6px !important;
  }

  .game-hud .resource-strip {
    gap: 3px !important;
  }

  .game-hud .resource {
    border-radius: 13px !important;
    padding-inline: 4px !important;
  }

  .game-hud .resource strong {
    font-size: 12px !important;
  }

  .game-hud .ghost-button {
    width: 38px !important;
    height: 38px !important;
  }

  .village-hotspot {
    width: 108px !important;
  }

  .stage-title {
    width: 62% !important;
  }

  .dock-button,
  .slot-side-button {
    width: 62px !important;
  }

  .city-actions {
    left: 6px !important;
    right: 6px !important;
    grid-template-columns: 66px minmax(0, 1fr) 66px !important;
    gap: 6px !important;
  }

  .stage-slot .primary-button {
    left: 52px !important;
    right: 52px !important;
  }
}

/* Art asset pass: replace placeholder CSS glyphs with raster game graphics. */
.game-hud .resource i,
.city-action::before,
.dock-button strong,
.slot-side-button::before,
.stage-slot .reel strong::before,
.pay-symbol::before {
  background-repeat: no-repeat !important;
  background-position-y: center !important;
  box-shadow: none !important;
}

.game-hud .resource i {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background-color: transparent !important;
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  clip-path: none !important;
}

.game-hud .resource i::after {
  display: none !important;
}

.game-hud .resource-coins i {
  background-position: 0% center !important;
}

.game-hud .resource-spins i {
  background-position: 33.333% center !important;
}

.game-hud .resource-stars i {
  background-image: url("/assets/shortcut-icon-sheet.png") !important;
  background-size: 1000% auto !important;
  background-position: 100% center !important;
}

.game-hud .resource-shields i {
  background-position: 83.333% center !important;
}

.city-action::before,
.dock-button strong,
.slot-side-button::before {
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  background-image: url("/assets/shortcut-icon-sheet.png") !important;
  background-size: 1000% auto !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.city-action::before {
  width: 44px !important;
  height: 40px !important;
  margin-bottom: 2px !important;
  border-radius: 12px !important;
  background-position: 66.666% center !important;
}

.city-action.visit::before {
  background-image: url("/assets/shortcut-icon-sheet.png") !important;
  background-size: 1000% auto !important;
  background-position: 77.777% center !important;
}

.dock-button strong {
  width: 36px !important;
  height: 33px !important;
}

.dock-button:nth-child(1) strong { background-position: 0% center !important; }
.dock-button:nth-child(2) strong { background-position: 44.444% center !important; }
.dock-button:nth-child(3) strong { background-position: 66.666% center !important; }
.dock-button:nth-child(4) strong { background-position: 11.111% center !important; }
.dock-button:nth-child(5) strong { background-position: 33.333% center !important; }
.dock-button:nth-child(6) strong { background-position: 88.888% center !important; }
.dock-button:nth-child(7) strong { background-position: 100% center !important; }
.dock-button:nth-child(8) strong { background-position: 77.777% center !important; }

.slot-side-button::before {
  width: 40px !important;
  height: 36px !important;
  border-radius: 12px !important;
}

.slot-side-left .slot-side-button:nth-child(1)::before,
.slot-side-right .slot-side-button:nth-child(1)::before {
  background-position: 11.111% center !important;
}

.slot-side-left .slot-side-button:nth-child(2)::before {
  background-position: 44.444% center !important;
}

.slot-side-left .slot-side-button:nth-child(3)::before {
  background-position: 33.333% center !important;
}

.slot-side-left .slot-side-button:nth-child(4)::before {
  background-position: 100% center !important;
}

.slot-side-right .slot-side-button:nth-child(2)::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 33.333% center !important;
}

.slot-side-right .slot-side-button:nth-child(3)::before {
  background-position: 66.666% center !important;
}

.slot-side-right .slot-side-button:nth-child(4)::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 100% center !important;
}

.stage-slot .reel span,
.stage-slot .reel .reel-tile {
  grid-template-rows: minmax(0, 1fr) !important;
}

.stage-slot .reel strong {
  width: 46px !important;
  height: 46px !important;
  max-width: 90% !important;
  max-height: 90% !important;
}

.stage-slot .reel strong::before,
.pay-symbol::before {
  inset: 0 !important;
  border-radius: 12px !important;
  background-color: transparent !important;
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  transform: none !important;
}

.stage-slot .reel .coin strong::before,
.pay-symbol.coin::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 0% center !important;
}

.stage-slot .reel .bag strong::before,
.pay-symbol.bag::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 16.666% center !important;
}

.stage-slot .reel .spin strong::before,
.pay-symbol.spin::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 33.333% center !important;
}

.stage-slot .reel .hammer strong::before,
.pay-symbol.hammer::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 50% center !important;
}

.stage-slot .reel .raid strong::before,
.pay-symbol.raid::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 66.666% center !important;
}

.stage-slot .reel .shield strong::before,
.pay-symbol.shield::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 83.333% center !important;
}

.stage-slot .reel .chest strong::before,
.pay-symbol.chest::before {
  background-image: url("/assets/slot-symbol-sheet.png") !important;
  background-size: 700% auto !important;
  background-position: 100% center !important;
}

.stage-slot .reel small {
  display: none !important;
}
