.game-screen {
  min-height: calc(100vh - 44px);
}

.topbar {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-left: 58px;
}

.game-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
}

.game-brand > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--lime);
}

.game-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.turn-orbit {
  position: relative;
  width: 67px;
  height: 48px;
  display: grid;
  grid-template-columns: auto auto;
  place-content: center;
  gap: 2px;
  font-family: Georgia, "Times New Roman", serif;
}

.turn-orbit span {
  font-size: 1.25rem;
  font-weight: 700;
}

.turn-orbit small {
  align-self: end;
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--ink) 56%, transparent);
  font-size: 0.58rem;
}

.turn-orbit i {
  position: absolute;
  inset: 1px 10px;
  z-index: -1;
  border: 3px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 50%;
}

.turn-orbit i::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 3px solid transparent;
  border-top-color: var(--blue);
  border-radius: 50%;
  rotate: var(--turn-rotation, 0deg);
  transition: rotate 300ms ease;
}

.round-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  font-size: 1rem;
  font-weight: 950;
  cursor: pointer;
}

.menu-button {
  justify-self: end;
  letter-spacing: 0.05em;
}

.hud {
  width: max-content;
  display: flex;
  gap: 7px;
  margin: 7px auto 9px;
  padding: 6px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--ink) 10%, transparent);
  backdrop-filter: blur(8px);
}

.hud-item {
  min-width: 78px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}

.hud-item span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 0.71rem;
  font-weight: 950;
}

.hud-item strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.hud-item--coin span { background: var(--lime); rotate: 45deg; border-radius: 7px; }
.hud-item--coin span::first-letter { rotate: -45deg; }
.hud-item--friends span { color: white; background: var(--blue); }
.hud-item--energy span { background: color-mix(in srgb, var(--blue) 22%, white); }
.hud-item--mood span { background: var(--coral); }
.hud-item--danger { animation: warning-pulse 850ms ease-in-out infinite alternate; }

.play-layout {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(310px, 380px);
  gap: clamp(15px, 2.2vw, 30px);
  align-items: center;
}

.island-stage {
  position: relative;
  min-width: 0;
  height: min(650px, calc(100vh - 190px));
  min-height: 480px;
  display: grid;
  place-items: center;
  animation: stage-float 5.2s ease-in-out infinite;
}

.island-top {
  position: relative;
  z-index: 3;
  width: min(650px, calc(100vh - 215px), 92%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 45% 55% 48% 52% / 49% 46% 54% 51%;
  background:
    radial-gradient(circle at 19% 16%, rgba(255,255,255,.45) 0 5px, transparent 6px),
    linear-gradient(135deg, var(--grass), color-mix(in srgb, var(--lime) 66%, white));
  box-shadow:
    inset 0 -19px 0 color-mix(in srgb, var(--lime) 58%, var(--ink)),
    0 23px 0 -7px var(--soil),
    var(--shadow);
}

.island-base {
  position: absolute;
  z-index: 1;
  top: 55%;
  width: min(490px, 68%);
  height: 35%;
  clip-path: polygon(3% 0, 97% 0, 69% 100%, 35% 89%);
  background:
    linear-gradient(125deg, transparent 26%, rgba(255,255,255,.11) 27% 29%, transparent 30%),
    linear-gradient(158deg, var(--soil), color-mix(in srgb, var(--ink) 78%, var(--coral)));
}

.stage-cloud {
  position: absolute;
  z-index: 2;
  width: 79px;
  height: 25px;
  opacity: 0.92;
}

.stage-cloud--a { left: 3%; top: 27%; animation: cloud-bob 4s ease-in-out infinite; }
.stage-cloud--b { right: 7%; bottom: 18%; scale: 0.8; animation: cloud-bob 5s -2s ease-in-out infinite; }

.district-board {
  width: 82%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(3px, 0.48vw, 6px);
  padding: 5.5%;
  border-radius: 42%;
}

.plot {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
  border: 1px dashed color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 31%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--ink) 12%, transparent) 0 2px, transparent 3px),
    rgba(255,255,255,.12);
  cursor: pointer;
  transition: scale 140ms ease, background 140ms ease, border-color 140ms ease;
}

.plot:hover,
.plot:focus-visible {
  z-index: 5;
  scale: 1.08;
  border-color: var(--blue);
}

.plot--available {
  border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--lime) 45%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 22%, transparent);
  animation: plot-pulse 1.1s ease-in-out infinite alternate;
}

.plot--available::after {
  content: "+";
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2.4vw, 1.65rem);
  font-weight: 900;
}

.plot--filled {
  border-color: transparent;
  background: transparent;
}

.plot .building-art {
  z-index: 2;
  width: 94%;
  height: 94%;
}

.plot--new .building-art {
  animation: building-pop 520ms cubic-bezier(.17,.89,.33,1.5);
}

.plot__bonus {
  position: absolute;
  z-index: 7;
  top: -5px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: white;
  background: var(--blue);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 17%, transparent);
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 950;
  animation: bonus-bob 1.5s ease-in-out infinite;
}

.islanders {
  position: absolute;
  inset: 13%;
  z-index: 6;
  pointer-events: none;
}

.islanders i {
  position: absolute;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
  font-size: 0.35rem;
  font-style: normal;
  font-weight: 900;
  animation: wander-one 13s linear infinite;
}

.islanders i:nth-child(2) { background: var(--blue); color: white; animation: wander-two 16s -4s linear infinite; }
.islanders i:nth-child(3) { background: var(--lime); animation: wander-three 19s -9s linear infinite; }
.islanders i:nth-child(4) { background: white; animation: wander-four 17s -7s linear infinite; }

.action-bubble {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 2%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--ink) 15%, transparent);
  font-size: 0.66rem;
  transform: translateX(-50%);
}

.action-bubble span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
}

.action-bubble[data-tone="warning"] span { background: var(--coral); }
.action-bubble[data-tone="good"] span { color: white; background: var(--blue); }

.build-dock {
  position: relative;
  padding: 17px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 12px 0 color-mix(in srgb, var(--ink) 12%, transparent), var(--shadow);
  backdrop-filter: blur(10px);
}

.dock-heading {
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dock-heading h2 {
  margin: 0;
  font-size: 1.65rem;
}

.policy-charms {
  display: flex;
  flex-direction: row-reverse;
}

.policy-charm {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  margin-left: -7px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  font-size: 0.66rem;
}

.project-list {
  display: grid;
  gap: 10px;
}

.project-card {
  position: relative;
  width: 100%;
  min-height: 134px;
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 13px 8px 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: white;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--ink) 13%, transparent);
  text-align: left;
  cursor: pointer;
  transition: translate 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

.project-card:hover,
.project-card--selected {
  translate: 0 3px;
  background: color-mix(in srgb, var(--lime) 18%, white);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 13%, transparent);
}

.project-card--locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.project-card .building-art {
  width: 100px;
  height: 100px;
}

.project-info {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-title strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-cost {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--lime);
  font-size: 0.7rem;
  font-weight: 950;
}

.project-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.stat-dot {
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  font-size: 0.61rem;
  font-weight: 900;
}

.stat-dot--coin { background: color-mix(in srgb, var(--lime) 30%, transparent); }
.stat-dot--energy { background: color-mix(in srgb, var(--blue) 16%, transparent); }
.stat-dot--mood { background: color-mix(in srgb, var(--coral) 18%, transparent); }

.combo-star {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-size: 0.58rem;
}

.rest-button {
  position: absolute;
  right: -16px;
  bottom: -20px;
  width: 66px;
  height: 66px;
  display: grid;
  place-content: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 7px 0 var(--ink);
  cursor: pointer;
}

.rest-button span {
  font-size: 1.45rem;
  line-height: 0.8;
}

.rest-button b {
  color: var(--blue);
  font-size: 0.64rem;
}

.goal-dock {
  width: min(600px, 84%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px auto 0;
}

.goal {
  min-width: 0;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--surface);
}

.goal > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--lime);
  font-size: 0.8rem;
  font-weight: 950;
}

.goal[data-goal="culture"] > span { background: var(--coral); }
.goal[data-goal="green"] > span { color: white; background: var(--blue); }

.goal > i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.goal > i b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 400ms ease;
}

.goal[data-goal="culture"] > i b { background: var(--coral); }
.goal[data-goal="green"] > i b { background: var(--blue); }
.goal > strong { font-size: 0.57rem; text-align: right; }
.goal--complete { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 26%, transparent); }
