:root {
  color-scheme: dark;
  --ink: #f3f3ef;
  --accent: #f3f3ef;
  --surface: #202329;
  --club: #d83146;
  --muted: #c8cdd2;
  --edge: max(12px, env(safe-area-inset-left));
  --right: max(12px, env(safe-area-inset-right));
  --bottom: max(10px, env(safe-area-inset-bottom));
  font-family: var(--font-ui);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: #202329;
  color: var(--ink);
  height: 100%;
  overscroll-behavior: none;
}
body {
  font-weight: 600;
  font-size: 15px;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
#game {
  position: relative;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}
#venue {
  position: absolute;
  inset: 0;
  background: #586268;
  overflow: hidden;
}
#venue > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#hud,
#pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#hud > * {
  pointer-events: auto;
}
#pins {
  z-index: 2;
}
#pins button {
  pointer-events: auto;
}
.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(10px, env(safe-area-inset-top)) var(--right) 28px var(--edge);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(#14171dc9, transparent);
  pointer-events: none !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.brand img {
  width: 35px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #0008);
}
.brand strong {
  display: block;
  font-size: clamp(16px, 2.1vw, 27px);
  line-height: 1.1;
  text-shadow: 0 2px 4px #0006;
  letter-spacing: 0;
}
.brand small {
  display: block;
  font-size: 11.5px;
  color: #d9dce1;
  margin-top: 3px;
}
.numbers {
  display: flex;
  gap: 19px;
  text-align: right;
  flex-shrink: 0;
  text-shadow: 0 1px 3px #000;
}
.numbers span {
  display: block;
  font-size: 13px;
  letter-spacing: 0;
}
.numbers b {
  display: block;
  font-size: clamp(18px, 2.7vw, 31px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.numbers .balance b {
  color: var(--accent);
}
.pill,
.primary,
.round,
.tab,
.option {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 25px;
  background: #23262bee;
  white-space: nowrap;
  box-shadow: 0 2px 5px #07090d4d;
}
.primary {
  background: var(--accent);
  color: #1d2026;
  font-weight: 600;
  padding: 0 20px;
}
.round {
  min-width: 44px;
  padding: 0 10px;
  font-size: 21px;
}
.pill[aria-pressed="true"],
.option[aria-pressed="true"] {
  background: #e63d4e;
  color: #ffffff;
  box-shadow: 0 0 0 2px #ff9caa44;
}
.primary:disabled {
  opacity: 0.65;
  cursor: default;
}
.homebar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 38px var(--right) var(--bottom) var(--edge);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  justify-content: space-between;
  background: linear-gradient(transparent, #171a20e6 75%);
}
.homebar .left,
.homebar .right,
.group {
  display: flex;
  gap: 6px;
  align-items: center;
}
.homecopy {
  position: absolute;
  left: var(--edge);
  bottom: calc(var(--bottom) + 55px);
  text-shadow: 0 1px 4px #090c12;
  max-width: 65%;
  pointer-events: none !important;
}
.homecopy h1 {
  font-size: clamp(20px, 2.8vw, 37px);
  line-height: 1;
  letter-spacing: 0;
  margin: 0 0 4px;
}
.homecopy p {
  font-size: clamp(13px, 1.4vw, 16px);
  margin: 0;
  color: #e0e2e6;
}
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 43px;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 24px;
  padding: 0 12px;
  font-size: 13px;
  background: #202329f0;
  box-shadow:
    0 1px 3px #0004,
    0 0 0 1px #fff6;
  white-space: nowrap;
}
.pin.empty {
  color: #ffffff;
}
.pin.corner {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
  background: #292e35db;
}
.pin:active {
  background: #535e69;
}
.pin .plus {
  font-size: 21px;
  line-height: 1;
}
.pin-label {
  font-weight: 600;
}
.pin.corner.locked {
  color: #cdd3da;
  box-shadow: 0 0 0 1px #c6cedc80;
}
.pin.built {
  border-bottom: 2px solid var(--accent);
}
.back {
  position: absolute;
  left: var(--edge);
  top: max(13px, env(safe-area-inset-top));
  z-index: 3;
}
.edit-caption {
  position: absolute;
  left: 75px;
  top: max(13px, env(safe-area-inset-top));
  max-width: 58%;
  padding: 5px 0;
  background: none;
  text-shadow:
    0 1px 4px #090c12,
    0 1px 10px #090c12;
  pointer-events: none !important;
}
.edit-caption h1 {
  font-size: 20px;
  letter-spacing: 0;
  margin: 0;
  line-height: 1.1;
}
.edit-caption p {
  font-size: 13px;
  margin: 3px 0 0;
  color: #d4d9e0;
}
.capacity {
  position: absolute;
  right: var(--right);
  top: max(13px, env(safe-area-inset-top));
  text-align: right;
  padding: 5px 0;
  background: none;
  text-shadow:
    0 1px 4px #090c12,
    0 1px 10px #090c12;
  font-variant-numeric: tabular-nums;
  pointer-events: none !important;
}
.capacity small {
  display: block;
  font-size: 11.5px;
}
.capacity strong {
  font-size: 21px;
  color: var(--accent);
}
.edit-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px var(--right) var(--bottom) var(--edge);
  background: linear-gradient(transparent, #1f2229e8 35%, #181b21f5);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.tab {
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
  min-height: 30px;
  padding: 0 13px;
  font-size: 13px;
  color: #d4d8df;
}
.tab[aria-pressed="true"] {
  color: var(--accent);
  box-shadow: inset 0 -2px var(--accent);
}
.edit-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.choice-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.choice-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  color: #d4d9e0;
  font-size: 13px;
}
.step-arrow {
  min-width: 36px;
  height: 30px;
  border-radius: 50%;
  background: #20242cba;
  font-size: 23px;
  line-height: 1;
}
.review-light {
  position: absolute;
  right: var(--right);
  top: max(13px, env(safe-area-inset-top));
}
.options {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.option {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
}
.option .swatch {
  height: 15px;
  width: 23px;
  border: 1px solid #fff9;
  display: inline-block;
  border-radius: 4px;
}
.cost-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cost-action .primary {
  min-width: 132px;
}
.edit-hint {
  text-align: center;
  line-height: 1.3;
  min-height: 14px;
  font-size: 13px;
  color: #d6dce4;
  margin: 0;
}
.wipe {
  position: absolute;
  left: var(--wipe, 38%);
  top: 0;
  bottom: 0;
  width: 0;
  pointer-events: none !important;
  filter: drop-shadow(0 1px 2px #070b10);
}
.wipe b {
  position: absolute;
  left: 0;
  top: 48%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid #f4f5f8;
  background: #252a32;
  color: var(--accent);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 21px;
}
.wipe input {
  position: fixed;
  left: 0;
  top: calc(48% - 24px);
  width: 100vw;
  height: 48px;
  opacity: 0;
  margin: 0;
  pointer-events: auto;
  touch-action: none;
  cursor: ew-resize;
}
.compare-tags {
  position: absolute;
  left: 0;
  right: 0;
  top: 75px;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--edge);
  pointer-events: none !important;
}
.compare-tags span {
  padding: 4px 0;
  background: none;
  font-size: 13px;
  text-shadow:
    0 1px 4px #090c12,
    0 1px 8px #090c12;
}
.compare-tags span:last-child {
  color: #ffffff;
}
.sheet-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(0deg, #14181ef2, transparent 70%);
  pointer-events: none !important;
}
.sheet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: none;
  padding: 22px var(--right) calc(var(--bottom) + 6px) var(--edge);
  text-align: left;
  text-shadow: 0 1px 4px #090c12;
  pointer-events: auto;
}
.sheet h1 {
  font-size: clamp(19px, 2.4vw, 28px);
  margin: 0;
  letter-spacing: 0;
}
.sheet p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #d7dbe1;
}
.sheet .price {
  font-size: clamp(32px, 4vw, 49px);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
}
.sheet .group {
  margin-top: 5px;
}
.sheet .subtle {
  font-size: 13px;
  color: #c2c9d3;
}
.scenario-choices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.scenario-choices .option {
  flex-direction: column;
  gap: 3px;
  border-radius: 13px;
  padding: 12px 15px;
  min-width: 120px;
}
.scenario-choices small {
  font-size: 11.5px;
  font-weight: 400;
}
.sheet .links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: #d5dce5;
  margin-top: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.works-caption {
  position: absolute;
  left: var(--edge);
  bottom: calc(var(--bottom) + 58px);
  max-width: 70%;
  padding: 0;
  background: none;
  border-radius: 0;
  text-shadow:
    0 1px 4px #090c12,
    0 1px 10px #090c12;
  pointer-events: none !important;
}
.works-caption h1 {
  font-size: clamp(17px, 2.7vw, 29px);
  letter-spacing: 0;
  margin: 0 0 4px;
}
.works-caption p {
  font-size: 13px;
  color: #e3e7ed;
  margin: 0;
}
.phase {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.phase i {
  width: 36px;
  height: 3px;
  background: #bac4d160;
}
.phase i.on {
  background: var(--accent);
}
#notice,
#loading {
  position: absolute;
  z-index: 8;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  padding: 9px 16px;
  border-radius: 18px;
  background: #242830fa;
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  box-shadow: 0 2px 8px #0003;
  pointer-events: none;
}
#notice {
  bottom: 43%;
}
#loading {
  top: 28%;
}
#loading button {
  pointer-events: auto;
  margin-left: 7px;
}
@media (min-width: 1200px) {
  .homebar,
  .edit-dock {
    padding-left: 24px;
    padding-right: 24px;
  }
  .homecopy {
    left: 24px;
  }
  .pin {
    font-size: 14px;
  }
  .edit-dock {
    gap: 10px;
  }
  .tab {
    font-size: 14px;
  }
}
@media (max-width: 740px) {
  .pill,
  .primary {
    padding: 0 12px;
    font-size: 13px;
  }
  .tab {
    padding: 0 10px;
  }
  .numbers {
    gap: 12px;
  }
  .brand img {
    width: 28px;
    height: 34px;
  }
  .edit-caption h1 {
    font-size: 17px;
  }
  .edit-caption {
    max-width: 57%;
  }
  .capacity strong {
    font-size: 18px;
  }
  .option {
    font-size: 13px;
    padding: 0 12px;
  }
  .cost-action .primary {
    min-width: 111px;
  }
  .sheet {
    padding: 15px 20px;
    gap: 7px;
  }
  .sheet p {
    font-size: 13px;
  }
}
@media (max-width: 575px) {
  .brand {
    gap: 5px;
  }
  .brand strong {
    font-size: 16px;
  }
  .brand small {
    font-size: 11.5px;
  }
  .numbers {
    gap: 8px;
  }
  .numbers b {
    font-size: 19px;
  }
  .numbers span {
    font-size: 13px;
  }
  .homecopy {
    max-width: 85%;
    bottom: calc(var(--bottom) + 102px);
  }
  .homebar {
    flex-wrap: wrap;
    gap: 7px;
  }
  .homebar .left,
  .homebar .right {
    justify-content: center;
    flex: 1 1 100%;
  }
  .edit-bottom {
    flex-wrap: wrap;
    justify-content: center;
  }
  .choice-block {
    flex: 1 1 100%;
  }
  .choice-stepper {
    min-height: 28px;
  }
  .choice-stepper .step-arrow {
    height: 28px;
  }
  .edit-caption {
    max-width: 63%;
  }
  .scenario-choices {
    justify-content: flex-start;
  }
  .sheet .tabs {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .options {
    flex: 1 1 100%;
  }
  .cost-action {
    justify-content: center;
    width: 100%;
  }
  .edit-dock {
    padding-top: 23px;
    gap: 7px;
  }
  .tabs {
    gap: 0;
  }
  .tab {
    padding: 0 9px;
    font-size: 13px;
  }
  .edit-caption {
    left: 65px;
    max-width: 52%;
  }
  .edit-caption h1 {
    font-size: 16px;
  }
  .capacity strong {
    font-size: 17px;
  }
  .compare-tags {
    top: 79px;
  }
  .works-caption {
    max-width: 90%;
    bottom: calc(var(--bottom) + 106px);
  }
  .pin {
    font-size: 13px;
    min-height: 38px;
    min-width: 38px;
    padding: 0 9px;
  }
  .pin.corner {
    width: 31px;
    min-width: 31px;
    min-height: 31px;
    height: 31px;
  }
  .scenario-choices .option {
    min-width: 130px;
  }
  .top {
    gap: 4px;
  }
}
@media (max-height: 390px) and (orientation: landscape) {
  .top {
    padding-top: 7px;
  }
  .homecopy h1 {
    font-size: 23px;
  }
  .homecopy {
    bottom: calc(var(--bottom) + 49px);
  }
  .homebar {
    padding-top: 23px;
  }
  .edit-dock {
    padding-top: 17px;
    gap: 3px;
  }
  .edit-hint {
    font-size: 13px;
    min-height: 12px;
  }
  .tabs .tab {
    min-height: 26px;
  }
  .option {
    min-height: 39px;
  }
  .sheet {
    gap: 4px;
    padding: 13px 23px;
  }
  .sheet p {
    font-size: 13px;
  }
  .sheet .price {
    font-size: 31px;
  }
  .sheet h1 {
    font-size: 20px;
  }
  .works-caption {
    bottom: calc(var(--bottom) + 49px);
  }
  .compare-tags {
    top: 69px;
  }
}

.wipe-input {
  position: absolute;
  left: var(--wipe, 38%);
  top: calc(48% - 24px);
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  opacity: 0;
  margin: 0;
  touch-action: none;
  cursor: ew-resize;
}
.edit-caption,
.capacity,
.compare-tags {
  z-index: 2;
}

.wipe::before {
  content: "";
  position: absolute;
  left: 0;
  top: 72px;
  bottom: 118px;
  border-left: 2px solid #eef1f7;
}
.wipe.focused b {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.build-decision {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: minmax(155px, 1fr) auto minmax(155px, 1fr);
  align-items: center;
  gap: clamp(15px, 3vw, 42px);
  width: min(92%, 790px);
  isolation: isolate;
  text-shadow: 0 2px 5px #090c12;
  pointer-events: none !important;
}
.build-decision::before {
  content: "";
  position: absolute;
  inset: -55px -25px;
  z-index: -1;
  background: radial-gradient(
    ellipse,
    #12161de6 10%,
    #12161db8 43%,
    transparent 73%
  );
  pointer-events: none;
}
.decision-cost {
  text-align: right;
}
.decision-cost strong,
.decision-consequence strong {
  display: block;
  margin-bottom: 3px;
  font-size: clamp(24px, 3.6vw, 43px);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.decision-consequence strong {
  color: var(--ink);
}
.build-decision div > span,
.build-decision small {
  display: block;
  line-height: 1.3;
}
.build-decision div > span {
  font-size: clamp(13px, 1.6vw, 17px);
  margin-bottom: 8px;
}
.build-decision small {
  font-size: clamp(11.5px, 1.3vw, 14px);
  font-weight: 500;
  color: #e2e7ef;
}
.confirm-circle {
  position: relative;
  width: clamp(108px, 13vw, 156px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--club) var(--sweep, 0%), #bbc1c9 0);
  display: grid;
  place-items: center;
  padding: 0;
  isolation: isolate;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  box-shadow: 0 3px 20px #06090f5c;
  transition:
    transform 150ms,
    box-shadow 150ms;
}
.confirm-circle::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: inherit;
  background: #242932;
}
.confirm-circle .confirm-label b,
.confirm-circle .confirm-label span {
  display: block;
}
.confirm-label b {
  font-size: clamp(22px, 2.5vw, 31px);
  line-height: 1;
  color: var(--accent);
}
.confirm-label span {
  font-size: clamp(13px, 1.4vw, 17px);
  margin-top: 5px;
}
.confirm-circle.holding {
  transform: scale(0.96);
  box-shadow:
    0 0 0 7px #e63d4e26,
    0 0 35px #e63d4e66;
}
.hold-instruction {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.commit-funds {
  text-align: right;
  text-shadow: 0 1px 4px #090c12;
}
.commit-funds span {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.commit-funds strong {
  font-size: 19px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.priced-choice {
  flex-direction: column;
  gap: 2px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.choice-price {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
}
#game[data-mode="cost"]::before,
#game[data-mode="works"]::before,
#game[data-mode="opening"]::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 25% 0 0;
  pointer-events: none;
  background: linear-gradient(transparent 15%, #11151da9 100%);
}
#hud {
  z-index: 3;
}
#game[data-mode="cost"] .homebar,
#game[data-mode="works"] .homebar,
#game[data-mode="opening"] .homebar {
  background: none;
}
#game[data-mode="cost"] .homebar .left,
#game[data-mode="works"] .homebar .left {
  flex-wrap: wrap;
}
@media (max-width: 575px) {
  .build-decision {
    top: 47%;
    width: min(90%, 380px);
    grid-template-columns: 1fr 1fr;
    gap: 25px 17px;
  }
  .confirm-circle {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: 126px;
  }
  .decision-cost,
  .decision-consequence {
    align-self: start;
  }
  .decision-cost strong,
  .decision-consequence strong {
    font-size: 28px;
  }
  .build-decision::before {
    inset: -55px -10px;
  }
  #game[data-mode="cost"] .homebar {
    flex-wrap: nowrap;
  }
  #game[data-mode="cost"] .homebar .left {
    flex: 0 1 auto;
  }
  .commit-funds {
    flex-shrink: 0;
  }
  .commit-funds strong {
    font-size: 16px;
  }
  .tab {
    padding: 0 7px;
  }
  .sheet {
    padding: 18px var(--right) calc(var(--bottom) + 8px) var(--edge);
  }
  .wipe::before {
    bottom: 183px;
  }
  .cost-action .pill {
    padding: 0 12px;
  }
  .works-caption h1 {
    font-size: 19px;
  }
}
@media (max-height: 390px) and (orientation: landscape) {
  .build-decision {
    top: 51%;
  }
  .sheet {
    gap: 5px;
    padding-top: 14px;
  }
  .works-caption h1 {
    font-size: 18px;
  }
  .works-caption p {
    font-size: 13px;
  }
  .wipe::before {
    bottom: 102px;
  }
}
#venue {
  z-index: 0;
}
#game[data-mode="cost"]::before,
#game[data-mode="works"]::before,
#game[data-mode="opening"]::before {
  z-index: 1;
  inset: 45% 0 0;
}
#hud > .homebar,
#hud > .edit-dock {
  pointer-events: none;
}
.homebar button,
.homebar a,
.edit-dock button {
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .confirm-circle {
    transition: none;
  }
}
@media (max-width: 360px) {
  .tab {
    padding: 0 4px;
    font-size: 13px;
  }
}

/* The builder is an overlay on the ground: tools, model pieces and one review
   control. No persistent menu panel or nested rows of text choices. */
#game[data-mode="edit"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent 48%, #14181c38 64%, #14181ce8 100%);
}
.build-tools, .tool-fan, .preview-tools, .build-review, .build-selector, .tier-handles {
  position: absolute;
  pointer-events: none !important;
}
.build-tools button, .tool-fan button, .preview-tools button,
.build-review button, .build-selector button, .model-tray, .tier-handles button {
  pointer-events: auto;
}
.build-tools {
  left: var(--edge);
  top: max(78px, calc(50% - 112px));
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 4;
}
.build-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-height: 56px;
  gap: 1px;
  padding: 6px 3px;
  border-radius: 50%;
  background: #242830eb;
  box-shadow: 0 3px 9px #0004, inset 0 0 0 1px #ffffff38;
  color: #f2f3f5;
}
.build-tool svg { width: 26px; height: 26px; }
.tool-name { font-size: 13px; line-height: 1.1; }
.build-tool[aria-pressed="true"] {
  background: var(--club);
  color: #fff;
  box-shadow: 0 3px 10px #0005, inset 0 0 0 1px #ffb4bd;
}
.tool-fan {
  z-index: 7;
  top: max(80px, calc(50% - 95px));
  left: calc(var(--edge) + 70px);
  display: grid;
  grid-template-columns: repeat(2, 85px);
  gap: 13px 9px;
  padding: 12px;
  isolation: isolate;
}
.tool-fan::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: -1;
  background: radial-gradient(ellipse, #11151ef7 35%, #11151eb0 60%, transparent 74%);
}
.fan-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 80px;
  min-height: 65px;
  padding: 2px;
  background: none;
  font-size: 13px;
  color: #f4f4f5;
}
.fan-tool svg { width: 42px; height: 42px; padding: 6px; border-radius: 50%; background: #353a45; }
.fan-tool[aria-pressed="true"] svg { background: var(--club); }
.fan-close { position: absolute; right: -11px; top: -12px; width: 40px; height: 40px; border-radius: 50%; background: #20242b; font-size: 24px; }
.build-selector {
  left: 96px;
  bottom: calc(var(--bottom) + 7px);
  width: calc(100% - 330px);
  max-width: 790px;
  z-index: 3;
  text-align: center;
}
.selector-title { font-size: 13px; font-weight: 600; letter-spacing: 0; text-shadow: 0 2px 5px #000; }
.model-carousel { display: flex; align-items: center; gap: 0; }
.model-tray {
  position: relative;
  display: flex;
  align-items: end;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  padding-inline: calc(50% - 68px);
  scroll-padding-inline: 0;
}
.model-tray::-webkit-scrollbar { display: none; }
.model-choice {
  position: relative;
  flex: 0 0 136px;
  width: 136px;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  padding: 4px 0 0;
  background: transparent;
  scroll-snap-align: center;
  color: #c3c9d1;
  opacity: .72;
  transition: opacity 160ms;
}
.choice-model {
  position: relative;
  display: grid;
  place-items: center;
  width: 136px;
  height: 86px;
  transform: scale(.88);
  transform-origin: center bottom;
  transition: transform 180ms;
  isolation: isolate;
}
.choice-model img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 2px #0005); }
.choice-model > svg { width: 30px; height: 30px; opacity: .35; }
.model-name { display: flex; align-items: center; justify-content: center; gap: 4px; max-width: 132px; min-height: 28px; font-size: 13px; line-height: 1.05; padding: 2px 3px; }
.model-choice[aria-pressed="true"] { opacity: 1; color: #fff; }
.model-choice[aria-pressed="true"] .choice-model { transform: scale(1.06); }
.model-choice[aria-pressed="true"] .choice-model::before {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: 2px;
  width: 89%;
  height: 16px;
  border: 2px solid var(--club);
  border-radius: 50%;
  background: #d831462b;
  box-shadow: 0 0 12px #d8314644;
}
.model-arrow { flex-shrink: 0; height: 48px; width: 44px; font-size: 37px; line-height: 1; background: transparent; color: #f0f2f5; padding: 0; }
.model-dots { display: flex; justify-content: center; gap: 0; height: 16px; }
.model-dot { width: 20px; height: 20px; padding: 0; background: transparent; position: relative; }
.model-dot::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #aeb7c3a6; display: block; margin: auto; }
.model-dot[aria-pressed="true"]::before { width: 14px; border-radius: 3px; background: #fff; }
.colour-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #fff9; flex-shrink: 0; }
.build-review {
  right: var(--right);
  bottom: calc(var(--bottom) + 23px);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 4;
}
.build-readout { text-align: right; text-shadow: 0 2px 6px #111; white-space: nowrap; }
.build-readout span { display: block; font-size: 13px; margin-bottom: 3px; }
.build-readout strong { font-size: clamp(21px, 2.8vw, 34px); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.review-orb {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #f2f3ef;
  color: #21252a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  box-shadow: 0 3px 10px #0005, inset 0 0 0 4px #dfe2e0;
  transition: transform 140ms;
}
.review-orb svg { width: 34px; height: 34px; color: #b51f34; }
.review-orb span { font-size: 13px; }
.review-orb:disabled { opacity: .48; }
.review-orb:active { transform: scale(.94); }
.preview-tools { left: var(--edge); bottom: var(--bottom); display: flex; gap: 6px; z-index: 4; }
.preview-tool { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #272c34e8; box-shadow: inset 0 0 0 1px #c0c8d03d; }
.preview-tool svg { width: 24px; height: 24px; }
.preview-tool[aria-pressed="true"] { background: #f0f2f4; color: #252a32; }
.build-note { position: absolute; bottom: 0; right: var(--right); max-width: 43%; margin: 0 0 3px; font-size: 13px; text-align: right; color: #dae0e7; pointer-events: none !important; }
.tier-handles { inset: 0; z-index: 3; }
.tier-handle { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #252a32e8; box-shadow: inset 0 0 0 1px #fff9, 0 2px 6px #0005; font-size: 18px; }
.tier-handle::after { content: ""; position: absolute; top: 50%; right: 100%; width: 13px; border-top: 1px solid #dbe0e7a6; }
.tier-handle[aria-pressed="true"] { background: var(--club); box-shadow: inset 0 0 0 2px #ffd7db, 0 2px 6px #0005; }
.confirm-label b { color: #fff; }
.confirm-circle { box-shadow: 0 3px 20px #06090f5c; }
#game[data-mode="edit"] .wipe::before { bottom: 150px; border-color: #eef1f7; }
#game[data-mode="edit"] .wipe b { background: #242932; color: #fff; }
@media (min-width: 1200px) {
  .build-selector { left: max(130px, calc(50% - 350px)); width: 700px; }
  .choice-model { height: 105px; width: 168px; }
  .model-choice { width: 168px; flex-basis: 168px; min-height: 140px; }
  .model-tray { padding-inline: calc(50% - 84px); }
  .model-name { max-width: 160px; font-size: 14px; }
  .build-review { gap: 18px; bottom: 30px; }
  .review-orb { width: 104px; height: 104px; }
}
@media (max-height: 410px) and (orientation: landscape) {
  .build-tools { top: 78px; gap: 5px; }
  .build-tool { width: 48px; min-height: 48px; padding: 4px 3px; }
  .build-tool svg { width: 23px; height: 23px; }
  .tool-name { font-size: 13px; }
  .build-selector { left: 116px; bottom: 8px; width: calc(100% - 325px); }
  .choice-model { height: 74px; width: 124px; }
  .model-choice { width: 124px; flex-basis: 124px; min-height: 103px; }
  .model-tray { padding-inline: calc(50% - 62px); }
  .model-name { max-width: 122px; font-size: 13px; min-height: 25px; }
  .model-dots { height: 15px; }
  .build-review { bottom: 28px; gap: 8px; }
  .review-orb { width: 77px; height: 77px; }
  .build-readout strong { font-size: 24px; }
  .build-readout span { font-size: 13px; }
  .preview-tools { bottom: 8px; gap: 3px; }
  .preview-tool { width: 44px; height: 44px; }
  .preview-tools .preview-tool:last-child { display: none; }
}
@media (orientation: portrait) {
  .build-tools { top: 104px; gap: 9px; }
  .build-tool { width: 52px; min-height: 52px; }
  .build-selector { left: 8px; bottom: calc(var(--bottom) + 110px); width: calc(100% - 16px); max-width: none; }
  .model-tray { padding-inline: calc(50% - 61px); }
  .model-choice { width: 122px; flex-basis: 122px; }
  .choice-model { width: 122px; height: 82px; }
  .model-name { max-width: 120px; }
  .model-arrow { width: 44px; }
  .build-review { bottom: calc(var(--bottom) + 20px); right: 17px; gap: 13px; }
  .review-orb { width: 82px; height: 82px; }
  .build-readout strong { font-size: 29px; }
  .preview-tools { bottom: calc(var(--bottom) + 40px); gap: 4px; }
  .preview-tool { width: 44px; height: 44px; }
  .preview-tool svg { width: 22px; height: 22px; }
  .build-note { bottom: var(--bottom); right: 17px; max-width: 90%; font-size: 13px; }
  .tool-fan { top: 110px; left: 80px; }
  #game[data-mode="edit"] .wipe::before { bottom: 280px; }
  #game[data-mode="edit"]::after { background: linear-gradient(transparent 44%, #14181c88 63%, #14181cf2 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .choice-model, .model-choice, .review-orb { transition: none; }
}
