:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fdff;
  color: #332b27;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, .62) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 139, 150, .16) 1px, transparent 1px),
    linear-gradient(180deg, #f8fdff 0%, #e8fbf5 52%, #ffeef5 100%);
  background-size: 8px 8px, 8px 8px, 100% 100%, 100% 100%;
}

button {
  font: inherit;
}

.machine-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(320px, 1fr);
  gap: clamp(16px, 2.6vw, 34px);
  align-items: start;
  padding: clamp(12px, 2.4vw, 28px);
}

.cabinet {
  margin-top: 0;
  width: min(100%, 560px);
  position: relative;
  justify-self: end;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .08) 0 9%, transparent 9% 91%, rgba(0, 0, 0, .18) 91%),
    linear-gradient(180deg, #c63c52 0%, #b73046 62%, #8b2638 100%);
  border: 6px solid #49131f;
  border-radius: 4px;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .32);
  overflow: hidden;
}

.machine-result-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 88px 18px 18px;
  background: rgba(57, 18, 31, .28);
  backdrop-filter: blur(2px);
}

.machine-result-card {
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 3px solid rgba(232, 93, 138, .35);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, .56) 2px, transparent 2px),
    #fff8fb;
  background-size: 12px 12px;
  box-shadow: 0 10px 0 rgba(199, 72, 117, .18), 0 18px 34px rgba(73, 19, 31, .22);
}

.machine-result-modal.miss .machine-result-card {
  border-color: rgba(149, 130, 235, .45);
  background:
    linear-gradient(rgba(255, 255, 255, .56) 2px, transparent 2px),
    #f2edff;
}

.machine-result-card h2 {
  margin: 8px 0 4px;
  color: #6b3d54;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1;
}

.machine-result-card p {
  margin: 0 0 12px;
  color: #6b5045;
  font-weight: 800;
}

.marquee {
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px clamp(16px, 3vw, 26px);
  background:
    linear-gradient(rgba(255, 255, 255, .18) 3px, transparent 3px),
    #f2c24f;
  background-size: 14px 14px;
  color: #3c220a;
  border-bottom: 5px solid #49131f;
  font-weight: 900;
  text-transform: uppercase;
}

.marquee span:first-child {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.marquee span:last-child {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  white-space: nowrap;
}

.glass {
  margin: clamp(10px, 1.7vw, 16px);
  min-height: clamp(360px, 50vh, 450px);
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 7px solid #244758;
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, .34) 0 14%, transparent 14% 56%, rgba(255, 255, 255, .18) 57% 63%, transparent 64%),
    linear-gradient(180deg, #a9f0f2 0%, #d7f8f2 46%, #99c7af 100%);
  background-size: 8px 8px, 8px 8px, 100% 100%, 100% 100%;
  image-rendering: pixelated;
  perspective: 900px;
}

.machine-lights {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 7px;
  z-index: 4;
}

.machine-lights i {
  width: 13px;
  height: 13px;
  justify-self: center;
  background: #f2c24f;
  box-shadow: 0 0 0 3px #49131f;
  animation: machine-light 3.2s steps(1) infinite;
  animation-delay: calc(var(--i) * -.14s);
}

.glass::after,
.gallery-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(255, 255, 255, .16) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 0, 0, .18) 2px, transparent 2px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  opacity: .46;
}

.rail {
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 10px;
  background: #263d49;
  border-radius: 4px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .18);
  z-index: 8;
}

.claw {
  width: 92px;
  height: 108px;
  position: absolute;
  top: -2px;
  left: var(--claw-left, 45%);
  transform: translateX(-50%);
  transition:
    left .62s cubic-bezier(.2, .72, .22, 1),
    transform 1.05s cubic-bezier(.36, 0, .16, 1);
  z-index: 10;
}

.claw.armed:not(.dropping) {
  animation: claw-idle 4.2s ease-in-out infinite;
}

.claw.dropping {
  transform: translateX(-50%) translateY(var(--claw-drop, 154px));
  animation: none;
}

.claw::before {
  content: "";
  position: absolute;
  left: 40px;
  top: -72px;
  width: 12px;
  height: 80px;
  background:
    repeating-linear-gradient(180deg, #263942 0 4px, #9db8bd 4px 8px);
  box-shadow:
    -22px -8px 0 11px #22a8e5,
    22px -8px 0 11px #1778b8,
    0 0 0 4px #263942;
  transform-origin: top center;
  transition:
    top 1.05s cubic-bezier(.36, 0, .16, 1),
    height 1.05s cubic-bezier(.36, 0, .16, 1);
}

.claw.dropping::before {
  top: calc(-72px - var(--claw-drop, 154px));
  height: calc(80px + var(--claw-drop, 154px));
}

.claw::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 7px;
  width: 34px;
  height: 34px;
  border: 6px solid #5b6775;
  border-radius: 50%;
  background:
    radial-gradient(circle, #dbe3e8 0 20%, #8997a4 21% 43%, #d7e1e5 44%);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, .2);
}

.claw span {
  position: absolute;
  top: 30px;
  width: 12px;
  height: 66px;
  background: linear-gradient(90deg, #5f6e7b, #bcc9d1 42%, #687682 44%);
  border: 3px solid #47545f;
  border-radius: 3px;
  transform-origin: top center;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, .16);
}

.prize-shelf {
  position: absolute;
  left: 50%;
  top: 86px;
  width: min(84%, 430px);
  min-height: clamp(270px, 34vh, 330px);
  transform: translateX(-50%) rotateX(18deg);
  transform-origin: center top;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 5px solid rgba(38, 61, 73, .72);
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, .14) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 0, 0, .12) 2px, transparent 2px),
    rgba(232, 252, 246, .5);
  background-size: 10px 10px;
  box-shadow: 0 13px 0 rgba(44, 83, 100, .22), 0 23px 0 rgba(0, 0, 0, .16);
  z-index: 3;
  perspective: 900px;
}

.prize-shelf::after {
  content: none;
}

.shelf-bear {
  min-height: clamp(70px, 9vh, 92px);
  position: relative;
  display: grid;
  place-items: center;
  border: 4px solid rgba(44, 83, 100, .64);
  background:
    linear-gradient(rgba(255, 255, 255, .16) 2px, transparent 2px),
    rgba(255, 255, 255, .16);
  background-size: 10px 10px;
  border-radius: 4px;
  padding: 0;
  color: inherit;
  cursor: pointer;
  overflow: visible;
  transform: translateZ(0);
}

.shelf-bear.targeted {
  border-color: #f2c24f;
  background: rgba(242, 194, 79, .3);
  box-shadow: inset 0 0 0 3px rgba(242, 194, 79, .42), 0 6px 0 rgba(0, 0, 0, .14);
}

.mystery-prize i,
.unrevealed-capsule i,
.selected-mystery i {
  width: 48px;
  height: 38px;
  display: block;
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(255, 255, 255, .42) 16% 30%, transparent 30%),
    linear-gradient(180deg, #f2c24f 0 43%, #5c1521 43% 52%, #6bd4b1 52%);
  border: 5px solid #5c1521;
  border-radius: 4px;
  box-shadow: 7px 8px 0 rgba(0, 0, 0, .22);
  transform: rotateX(-22deg);
}

.mystery-prize i {
  animation: capsule-drift 4.8s ease-in-out infinite;
}

.shelf-bear:nth-child(2n) .mystery-prize i,
.shelf-bear:nth-child(2n) i {
  animation-delay: -1.2s;
}

.shelf-bear:nth-child(3n) .mystery-prize i,
.shelf-bear:nth-child(3n) i {
  animation-delay: -2.1s;
}

.mystery-prize span {
  position: absolute;
  right: 6px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(22, 25, 29, .82);
  color: #f2c24f;
  font-size: .72rem;
  font-weight: 900;
}

.shelf-bear .bear-svg {
  filter: none;
}

.claw span:nth-child(1) {
  left: 31px;
  transform: rotate(47deg);
}

.claw span:nth-child(2) {
  display: block;
  left: 40px;
  top: -5px;
  width: 12px;
  height: 34px;
  background: #28333b;
  border: 0;
  box-shadow: inset 0 -8px 0 #151c21;
}

.claw span:nth-child(3) {
  right: 31px;
  transform: rotate(-47deg);
}

.claw span:nth-child(1)::after,
.claw span:nth-child(3)::after {
  content: "";
  position: absolute;
  bottom: -15px;
  width: 10px;
  height: 25px;
  background: #11191e;
  border-radius: 2px;
}

.claw span:nth-child(1)::after {
  right: -1px;
  transform: rotate(-4deg);
}

.claw span:nth-child(3)::after {
  left: -1px;
  transform: rotate(4deg);
}

.claw.armed span:nth-child(1) {
  transform: rotate(43deg);
}

.claw.armed span:nth-child(3) {
  transform: rotate(-43deg);
}

.claw.dropping span:nth-child(1) {
  transform: rotate(35deg);
}

.claw.dropping span:nth-child(3) {
  transform: rotate(-35deg);
}

.bear-svg {
  display: block;
  max-width: 100%;
  filter: drop-shadow(7px 9px 0 rgba(44, 28, 25, .18));
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.only-trait-sprite,
.only-trait-sprite * {
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.pixel-art-filter {
  filter:
    drop-shadow(7px 9px 0 rgba(44, 28, 25, .2))
    contrast(1.22)
    saturate(1.15);
}

.bear-bob {
  animation: bear-bob 5.8s ease-in-out infinite;
  transform-origin: 80px 92px;
}

.bear-blink {
  animation: bear-blink 7.2s infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.catch-label {
  position: absolute;
  left: clamp(12px, 3vw, 22px);
  right: clamp(12px, 3vw, 22px);
  bottom: 16px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-radius: 4px;
  background: rgba(22, 25, 29, .82);
  color: #fff7e3;
  z-index: 6;
}

.catch-label strong,
.catch-label span {
  overflow-wrap: anywhere;
}

.coin-slot,
.prize-door {
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border: 4px solid #49131f;
  border-radius: 4px;
  background: #2b3138;
  color: #f6f1e7;
  text-transform: uppercase;
  font-weight: 900;
}

.coin-slot span,
.prize-door span {
  color: #f2c24f;
  font-size: .8rem;
}

.coin-slot strong {
  font-size: 1.55rem;
}

.joystick {
  width: 84px;
  height: 66px;
  position: relative;
  grid-area: drop;
  align-self: center;
  justify-self: center;
  border: 4px solid #49131f;
  border-radius: 4px;
  background: #f2c24f;
  color: #3c220a;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .16);
}

.joystick::before {
  content: "";
  position: absolute;
  left: 37px;
  top: 14px;
  width: 10px;
  height: 34px;
  background: #26313a;
}

.joystick i {
  position: absolute;
  left: 25px;
  top: 4px;
  width: 34px;
  height: 23px;
  display: block;
  border-radius: 4px;
  background: #6bd4b1;
  box-shadow: 0 4px 0 #245d4e;
  animation: drop-button-blink 2.6s steps(1) infinite;
}

.joystick.pressed i,
.joystick:active i {
  transform: translateY(8px);
  box-shadow: 0 1px 0 #245d4e;
}

.joystick:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "wallet coin"
    "dpad drop";
  gap: 10px;
  padding: 10px clamp(10px, 1.7vw, 16px) clamp(10px, 1.7vw, 16px);
  align-items: stretch;
}

.wallet-button,
.coin-button,
.move-button {
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  color: #151515;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .26);
}

.wallet-connect-host {
  grid-area: wallet;
  min-height: 50px;
  display: flex;
  align-items: stretch;
}

.wallet-connect-host > div {
  width: 100%;
}

.wallet-button {
  background: #92e6d0;
  color: #143d36;
  text-transform: uppercase;
}

.coin-button {
  grid-area: coin;
  background: #f2c24f;
  text-transform: uppercase;
  min-height: 42px;
  padding: 7px 10px;
  font-size: .78rem;
}

.move-button {
  background: #91aaff;
}

.dpad {
  grid-area: dpad;
  display: grid;
  grid-template-columns: repeat(3, 58px);
  grid-template-rows: repeat(3, 43px);
  gap: 6px;
  justify-content: center;
  align-items: center;
  padding: 7px;
  border: 4px solid #49131f;
  border-radius: 4px;
  background: #242a31;
}

.dpad .move-button {
  min-height: 43px;
  width: 58px;
  padding: 0;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .26);
  font-size: .78rem;
  text-transform: uppercase;
}

.dpad .up {
  grid-column: 2;
  grid-row: 1;
}

.dpad .left {
  grid-column: 1;
  grid-row: 2;
}

.dpad .right {
  grid-column: 3;
  grid-row: 2;
}

.dpad .down {
  grid-column: 2;
  grid-row: 3;
}

.move-button:disabled {
  cursor: not-allowed;
  color: #66717b;
  background: #b7c4c6;
}

.unrevealed-capsule,
.selected-mystery {
  min-width: 180px;
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  color: #2b1d12;
  font-weight: 900;
  text-transform: uppercase;
}

.unrevealed-capsule.caught i {
  animation: capsule-ready 1.8s steps(2) infinite;
}

@keyframes capsule-ready {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.counter {
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border-radius: 4px;
  background: #2b3138;
  color: #edf4f3;
}

.counter span {
  font-size: .78rem;
  color: #aebdc0;
}

.counter strong {
  font-size: 1.35rem;
}

.mint-panel {
  margin-top: clamp(0px, 5vh, 38px);
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: minmax(360px, 620px) minmax(320px, 500px);
  align-content: start;
  align-items: start;
  gap: 18px;
}

.panel-header,
.supply-banner,
.selected-card,
.trait-bar {
  grid-column: 1;
}

.art-reel {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.chain-panel {
  grid-column: 2;
  grid-row: 4;
}

.mint-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mint-stats div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px;
  border-radius: 4px;
  background: #22272d;
  border: 1px solid rgba(255, 255, 255, .1);
}

.mint-stats span {
  color: #6bd4b1;
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 900;
}

.mint-stats strong {
  color: #f2c24f;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.panel-header p {
  margin: 0 0 8px;
  color: #6bd4b1;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: .95;
}

.supply-banner {
  min-height: 136px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, .12) 2px, transparent 2px),
    linear-gradient(135deg, #fff8e2, #e8fbf5 48%, #ffeef5);
  background-size: 12px 12px, 100% 100%;
}

.supply-banner-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2px;
}

.supply-banner-copy span {
  color: #6bd4b1;
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.supply-banner-copy strong {
  color: #3c220a;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: .9;
}

.supply-banner-copy p {
  margin: 4px 0 0;
  color: #6b5045;
  font-weight: 800;
}

.selected-card {
  min-height: 158px;
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 4px;
  background: #22272d;
}

.selected-card.result-state {
  border-color: #f2c24f;
  background:
    linear-gradient(rgba(255, 255, 255, .08) 2px, transparent 2px),
    #242a31;
  background-size: 12px 12px;
}

.selected-card.result-state.miss {
  border-color: #91aaff;
}

.selected-card h2 {
  margin: 10px 0 4px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.selected-card p {
  margin: 0;
  color: #cfd7d4;
  font-weight: 700;
}

.seed-note {
  margin-top: 8px !important;
  color: #6bd4b1 !important;
  font-size: .84rem;
}

.trait-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.trait-details div {
  min-height: 48px;
  padding: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
}

.trait-details dt {
  color: #aebdc0;
  font-size: .74rem;
}

.trait-details dd {
  margin: 3px 0 0;
  color: #332b27;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.inline-result-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.inline-result-actions button {
  min-width: 132px;
}

.tier-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .78rem;
  color: #111;
  font-weight: 900;
  background: #f2c24f;
}

.tier-pill.common {
  background: #77d7be;
}

.tier-pill.uncommon {
  background: #dc7a9a;
}

.tier-pill.rare {
  background: #91aaff;
}

.tier-pill.epic {
  background: #f0cf61;
}

.tier-pill.legendary {
  color: #211406;
  background: #f3c04f;
}

.trait-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.art-reel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(85, 138, 148, .22);
  border-radius: 4px;
  background: rgba(255, 255, 255, .62);
  overflow: hidden;
}

.art-reel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.art-reel-heading p,
.art-reel-heading span {
  margin: 0;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.art-reel-heading p {
  color: #209981;
}

.art-reel-heading span {
  color: #b77600;
}

.art-reel-window {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.art-reel-track {
  width: max-content;
  display: flex;
  gap: 10px;
  animation: art-reel-scroll 24s linear infinite;
}

.art-reel-item {
  width: 148px;
  min-height: 122px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(85, 138, 148, .22);
  border-radius: 4px;
  background: rgba(255, 255, 255, .72);
  color: #332b27;
  cursor: pointer;
}

.art-reel-item span {
  width: 100%;
  text-align: center;
  font-size: .72rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.art-reel:hover .art-reel-track {
  animation-play-state: paused;
}

.chain-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(85, 138, 148, .28);
  border-radius: 4px;
  background: rgba(255, 255, 255, .72);
}

.chain-panel-heading,
.chain-links,
.global-mint-log a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chain-panel-heading p,
.chain-panel-heading strong,
.chain-panel-heading span,
.global-mint-log p {
  margin: 0;
}

.chain-panel-heading p {
  color: #209981;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chain-panel-heading span {
  padding: 5px 8px;
  border-radius: 3px;
  background: #f2c24f;
  color: #342308;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.global-mint-log {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px;
  background: rgba(224, 245, 242, .7);
  border: 1px solid rgba(85, 138, 148, .2);
}

.global-mint-log p,
.global-mint-log a {
  color: #465b5c;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}

.chain-links a {
  flex: 1;
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: #92e6d0;
  color: #143d36;
  font-size: .75rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.trait-bar span {
  color: #aebdc0;
  font-size: .86rem;
  font-weight: 800;
  margin-right: 4px;
}

.trait-bar button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  padding: 7px 10px;
  background: #2b3138;
  color: #f6f1e7;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 800;
}

.trait-bar button:hover {
  border-color: #f2c24f;
}

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

.bear-card {
  min-height: 148px;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  background: #22272d;
  color: #f6f1e7;
  cursor: pointer;
  overflow: hidden;
}

.bear-card.active {
  border-color: #6bd4b1;
  box-shadow: inset 0 0 0 2px rgba(107, 212, 177, .5), 4px 4px 0 rgba(0, 0, 0, .22);
}

.bear-card span,
.bear-card small {
  width: 100%;
  padding: 0 8px;
  text-align: center;
  overflow-wrap: anywhere;
}

.bear-card span {
  font-weight: 850;
}

.bear-card small {
  color: #b7c4c6;
}

.status-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status-list div {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid rgba(85, 138, 148, .22);
  background: rgba(255, 255, 255, .78);
}

.status-list span {
  color: #667774;
  font-size: .82rem;
}

.status-list strong {
  color: #332b27;
  overflow-wrap: anywhere;
}

/* Softer public theme */
.mint-panel,
.gallery-panel,
.trait-lab-shell {
  color: #2f2a28;
}

.cabinet {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .18) 0 9%, transparent 9% 91%, rgba(181, 79, 105, .16) 91%),
    linear-gradient(180deg, #ff8faf 0%, #f0698f 62%, #d94d74 100%);
  border-color: #9a3150;
  box-shadow: 10px 10px 0 rgba(154, 49, 80, .18);
}

.marquee {
  color: #5b3511;
  border-bottom-color: #9a3150;
  background:
    linear-gradient(rgba(255, 255, 255, .2) 3px, transparent 3px),
    #ffd66b;
}

.glass {
  border-color: #63a6b0;
  background:
    linear-gradient(rgba(255, 255, 255, .24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 109, 119, .12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, .42) 0 14%, transparent 14% 56%, rgba(255, 255, 255, .2) 57% 63%, transparent 64%),
    linear-gradient(180deg, #bdf8ff 0%, #eafffb 48%, #b9ead7 100%);
}

.rail,
.claw::before {
  background: #37545b;
  border-color: #37545b;
}

.claw span {
  background: #37545b;
  border-color: #37545b;
}

.claw::after {
  border-color: #37545b;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .36) 0 24%, transparent 25%),
    #7d98a3;
}

.claw::before {
  background:
    linear-gradient(180deg, #203942 0 18%, #6fa1aa 18% 30%, #203942 30% 48%, #6fa1aa 48% 60%, #203942 60%);
}

.claw span:nth-child(2) {
  background: #5e7980;
}

.prize-shelf {
  border-color: rgba(85, 138, 148, .72);
  background:
    linear-gradient(rgba(255, 255, 255, .22) 2px, transparent 2px),
    linear-gradient(90deg, rgba(85, 138, 148, .14) 2px, transparent 2px),
    rgba(250, 255, 252, .56);
}

.shelf-bear {
  border-color: rgba(85, 138, 148, .64);
  background:
    linear-gradient(rgba(255, 255, 255, .24) 2px, transparent 2px),
    rgba(255, 255, 255, .26);
}

.shelf-bear.targeted {
  border-color: #ffd66b;
  background: rgba(255, 214, 107, .36);
}

.catch-label,
.chance-panel {
  background: rgba(255, 255, 255, .82);
  color: #3d3430;
  border: 1px solid rgba(85, 138, 148, .22);
}

.coin-slot,
.prize-door,
.counter,
.selected-card,
.mint-stats div,
.bear-card,
.gallery-panel,
.gallery-card,
.gallery-rule,
.trait-bar button,
.gallery-filters button,
.gallery-pager button {
  background: rgba(255, 255, 255, .78);
  border-color: rgba(85, 138, 148, .24);
  color: #2f2a28;
}

.selected-card,
.mint-stats div,
.bear-card,
.gallery-panel,
.gallery-card {
  box-shadow: 0 8px 0 rgba(99, 166, 176, .12);
}

.panel-header p,
.gallery-header p,
.mint-stats span,
.trait-bar span,
.gallery-card span,
.seed-note {
  color: #2e9d8a !important;
}

.panel-header h1,
.selected-card h2,
.gallery-header h2,
.bear-card span,
.gallery-card strong,
.status-list strong {
  color: #342822;
}

.selected-card p,
.gallery-card small,
.trait-details dt,
.counter span,
.status-list span {
  color: #6d6a66;
}

.mint-stats strong,
.coin-slot span,
.prize-door span,
.gallery-header strong,
.gallery-pager span {
  color: #d89216;
}

.coin-button,
.wallet-button,
.joystick,
.gallery-filters button.active,
.lab-link {
  background: #ffd66b;
  color: #3d2c12;
}

.wallet-button {
  background: #92e6d0;
  color: #143d36;
}

.move-button {
  background: #9eb5ff;
}

.dpad {
  background: rgba(255, 255, 255, .6);
  border-color: #9a3150;
}

.selected-card.result-state {
  background:
    linear-gradient(rgba(255, 255, 255, .36) 2px, transparent 2px),
    #fff7d8;
}

.selected-card.result-state.miss {
  background:
    linear-gradient(rgba(255, 255, 255, .36) 2px, transparent 2px),
    #eef3ff;
}

.modal-mint,
.modal-try {
  min-height: 58px;
  border: 0;
  border-radius: 4px;
  color: #171717;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .3);
}

.modal-mint {
  background: #f2c24f;
}

.modal-try {
  background: #91aaff;
}

.gallery-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid rgba(85, 138, 148, .22);
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, .6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 138, 148, .1) 1px, transparent 1px),
    rgba(255, 255, 255, .84);
  background-size: 8px 8px, 8px 8px, 100% 100%;
  color: #332b27;
  box-shadow: 0 8px 0 rgba(99, 166, 176, .12);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.gallery-header p {
  margin: 0 0 6px;
  color: #209981;
  font-weight: 850;
  text-transform: uppercase;
}

.gallery-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
  color: #332b27;
}

.gallery-header strong {
  color: #b77600;
  white-space: nowrap;
}

.gallery-rule {
  position: relative;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 4px;
  color: #3d3430;
  border: 1px solid rgba(85, 138, 148, .18);
  background:
    linear-gradient(rgba(255, 255, 255, .48) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 138, 148, .1) 1px, transparent 1px),
    #f7fffb;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  overflow: hidden;
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-toolbar > span {
  color: #426f6e;
  font-weight: 850;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-filters button,
.gallery-pager button {
  min-height: 36px;
  border: 1px solid rgba(85, 138, 148, .28);
  border-radius: 4px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, .78);
  color: #332b27;
  font-weight: 850;
  cursor: pointer;
}

.gallery-filters button.active {
  color: #171717;
  background: #f2c24f;
  border-color: #f2c24f;
}

.gallery-pager button:disabled {
  cursor: not-allowed;
  color: #8a9b98;
  background: rgba(226, 239, 236, .78);
}

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

.gallery-card {
  position: relative;
  min-height: 190px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(85, 138, 148, .22);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(240, 255, 250, .82));
  color: #332b27;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(99, 166, 176, .12);
}

.gallery-card.active {
  border-color: #6bd4b1;
  box-shadow: inset 0 0 0 2px rgba(107, 212, 177, .55), 0 6px 0 rgba(99, 166, 176, .16);
}

.gallery-card span,
.gallery-card strong,
.gallery-card small {
  width: 100%;
  padding: 0 8px;
  text-align: center;
  overflow-wrap: anywhere;
}

.gallery-card span {
  color: #209981;
  font-size: .76rem;
  font-weight: 900;
}

.gallery-card strong {
  font-size: .96rem;
  color: #332b27;
}

.gallery-card small {
  color: #596b6a;
}

.gallery-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.gallery-pager.compact {
  justify-content: flex-end;
}

.gallery-pager span {
  color: #b77600;
  font-weight: 850;
}

.lab-link,
.lab-nav-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  padding: 7px 10px;
  background: #f2c24f;
  color: #171717;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 900;
}

.trait-lab-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: clamp(14px, 3vw, 34px);
}

.lab-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding-bottom: 4px;
}

.lab-header p,
.lab-section-heading p {
  margin: 0 0 6px;
  color: #6bd4b1;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lab-header h1,
.lab-section-heading h2,
.lab-preview-heading h2 {
  margin: 0;
  line-height: 1;
}

.lab-header h1 {
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.lab-picker,
.lab-preview-panel,
.lab-breakdown,
.trait-catalog,
.frame-strip {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 4px;
  background: #1f242a;
}

.lab-picker {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.lab-picker > span {
  color: #aebdc0;
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lab-bear-button {
  min-height: 94px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 2px 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  padding: 8px;
  background: #242a31;
  color: #f6f1e7;
  cursor: pointer;
  text-align: left;
}

.lab-bear-button svg {
  grid-row: 1 / 3;
  filter: none;
}

.lab-bear-button span,
.lab-bear-button small {
  overflow-wrap: anywhere;
}

.lab-bear-button span {
  align-self: end;
  font-weight: 900;
}

.lab-bear-button small {
  align-self: start;
  color: #b7c4c6;
}

.lab-bear-button.active {
  border-color: #6bd4b1;
  box-shadow: inset 0 0 0 2px rgba(107, 212, 177, .5);
}

.lab-workspace {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr);
  gap: 18px;
}

.lab-preview-panel,
.lab-breakdown,
.trait-catalog,
.frame-strip {
  padding: clamp(14px, 2vw, 20px);
}

.lab-preview-panel {
  display: grid;
  gap: 14px;
}

.lab-preview-heading {
  display: grid;
  gap: 10px;
}

.lab-preview-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.lab-preview-art {
  min-height: 330px;
  display: grid;
  place-items: center;
  border: 4px solid #2f3a44;
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .16) 1px, transparent 1px),
    #dfe7e5;
  background-size: 8px 8px;
}

.lab-preview-art .bear-svg,
.layer-art .bear-svg,
.frame-card .bear-svg {
  filter: none;
}

.layer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layer-controls button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 4px;
  padding: 7px 11px;
  background: #2b3138;
  color: #f6f1e7;
  font-weight: 900;
  cursor: pointer;
}

.layer-controls button.active {
  color: #171717;
  background: #6bd4b1;
  border-color: #6bd4b1;
}

.lab-breakdown {
  display: grid;
  gap: 14px;
}

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

.layer-card {
  min-height: 286px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  padding: 12px;
  background: #242a31;
}

.layer-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.layer-card span {
  font-weight: 900;
}

.layer-card strong {
  color: #6bd4b1;
  font-size: .76rem;
  text-transform: uppercase;
}

.layer-card.empty strong {
  color: #aebdc0;
}

.layer-card p {
  margin: 0;
  color: #b7c4c6;
  font-size: .86rem;
  font-weight: 750;
}

.layer-art {
  min-height: 196px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .12) 1px, transparent 1px),
    #dfe7e5;
  background-size: 8px 8px;
}

.layer-card.empty .layer-art {
  opacity: .58;
}

.trait-catalog {
  grid-column: 2;
  display: grid;
  gap: 18px;
}

.trait-catalog-section {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.trait-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trait-token-card {
  min-height: 206px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  padding: 10px;
  background: #242a31;
  color: #f6f1e7;
  cursor: pointer;
  text-align: left;
}

.trait-token-card:hover {
  border-color: #6bd4b1;
}

.trait-token-card span {
  min-height: 34px;
  font-size: .86rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.trait-token-card small {
  color: #b7c4c6;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.trait-token-art {
  min-height: 132px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .12) 1px, transparent 1px),
    #dfe7e5;
  background-size: 8px 8px;
}

.trait-token-art .bear-svg {
  filter: none;
}

.frame-strip {
  grid-column: 2;
  display: grid;
  gap: 14px;
}

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

.frame-card {
  min-height: 230px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  padding: 12px;
  background: #242a31;
}

.frame-card span {
  color: #f2c24f;
  font-weight: 900;
}

@keyframes claw-sway {
  0%, 100% {
    transform: translateX(-28px);
  }
  50% {
    transform: translateX(34px);
  }
}

@keyframes claw-idle {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  45% {
    transform: translateX(-50%) translateY(4px);
  }
  70% {
    transform: translateX(-50%) translateY(2px);
  }
}

@keyframes capsule-drift {
  0%, 100% {
    transform: rotateX(-22deg) translateY(0);
  }
  50% {
    transform: rotateX(-22deg) translateY(-3px);
  }
}

@keyframes art-reel-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes machine-light {
  0%, 100% {
    background: #ffd66b;
  }
  33% {
    background: #92e6d0;
  }
  66% {
    background: #ffb2c8;
  }
}

@keyframes drop-button-blink {
  0%, 100% {
    background: #92e6d0;
  }
  50% {
    background: #b7c6ff;
  }
}

@keyframes bear-blink {
  0%, 92%, 100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(.08);
  }
}

@keyframes bear-bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Final light-theme overrides for sections declared later in the file. */
.gallery-panel,
.trait-catalog,
.frame-strip,
.lab-picker,
.lab-preview-panel,
.lab-breakdown,
.layer-card,
.trait-token-card,
.frame-card {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(85, 138, 148, .22);
  color: #332b27;
  box-shadow: 0 8px 0 rgba(99, 166, 176, .12);
}

.gallery-rule,
.layer-art,
.trait-token-art,
.lab-preview-art {
  background:
    linear-gradient(rgba(255, 255, 255, .58) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 138, 148, .12) 1px, transparent 1px),
    #f6fffb;
  color: #3d3430;
}

.gallery-card,
.bear-card {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(85, 138, 148, .2);
  color: #332b27;
}

.gallery-card strong,
.bear-card span,
.gallery-header h2,
.lab-header h1,
.lab-section-heading h2,
.lab-preview-heading h2 {
  color: #332b27;
}

.gallery-card small,
.bear-card small,
.layer-card p,
.trait-token-card small {
  color: #596b6a;
}

.gallery-filters button,
.gallery-pager button,
.trait-bar button,
.layer-controls button {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(85, 138, 148, .28);
  color: #332b27;
}

.gallery-filters button.active,
.gallery-pager button:not(:disabled):hover,
.layer-controls button.active {
  background: #ffd66b;
  border-color: #e4a829;
  color: #3d2c12;
}

.gallery-header p,
.gallery-card span,
.lab-header p,
.lab-section-heading p {
  color: #2e9d8a;
}

.gallery-header strong,
.gallery-pager span {
  color: #d89216;
}

@media (max-width: 920px) {
  .machine-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .cabinet,
  .mint-panel {
    justify-self: center;
  }

  .mint-panel {
    width: min(100%, 620px);
    grid-template-columns: 1fr;
  }

  .panel-header,
  .supply-banner,
  .selected-card,
  .trait-bar,
  .art-reel,
  .chain-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .supply-banner {
    max-width: 620px;
  }

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

  .trait-lab-shell,
  .lab-workspace {
    grid-template-columns: 1fr;
  }

  .lab-picker {
    position: static;
  }

  .trait-catalog,
  .frame-strip {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .machine-shell {
    padding: 10px;
    gap: 14px;
  }

  .cabinet {
    width: min(100%, 390px);
    border-width: 4px;
    box-shadow: 6px 6px 0 rgba(154, 49, 80, .18);
  }

  .marquee {
    min-height: 42px;
    padding: 8px 12px;
  }

  .marquee,
  .catch-label {
    flex-direction: column;
    align-items: flex-start;
  }

  .glass {
    min-height: 322px;
    margin: 8px;
    border-width: 5px;
  }

  .machine-lights {
    top: 7px;
    left: 9px;
    right: 9px;
    gap: 5px;
  }

  .machine-lights i {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 0 2px #49131f;
  }

  .rail {
    top: 18px;
    left: 10%;
    right: 10%;
    height: 8px;
  }

  .claw {
    scale: .78;
  }

  .prize-shelf {
    top: 72px;
    width: 88%;
    min-height: 220px;
    gap: 7px;
    padding: 8px;
    border-width: 4px;
  }

  .shelf-bear {
    min-height: 58px;
    border-width: 3px;
  }

  .mystery-prize i,
  .unrevealed-capsule i,
  .selected-mystery i {
    width: 40px;
    height: 32px;
    border-width: 4px;
  }

  .catch-label {
    bottom: 8px;
    min-height: 42px;
    gap: 3px;
    padding: 7px 9px;
    font-size: .78rem;
  }

  .prize-stage {
    min-height: 300px;
    padding-bottom: 88px;
  }

  .supply-banner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .joystick {
    width: 74px;
    height: 58px;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 8px 8px 10px;
  }

  .dpad {
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 32px);
    gap: 4px;
    padding: 5px;
    border-width: 3px;
  }

  .dpad .move-button {
    width: 40px;
    min-height: 32px;
    font-size: .62rem;
  }

  .coin-button,
  .wallet-button,
  .move-button {
    min-height: 44px;
    font-size: .78rem;
  }

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

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

  .selected-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .art-reel-item {
    width: calc((100vw - 56px) / 2);
    max-width: 148px;
    min-height: 110px;
  }

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

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

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

  .layer-grid,
  .trait-catalog-grid,
  .frame-grid {
    grid-template-columns: 1fr;
  }

  .lab-preview-art {
    min-height: 280px;
  }
}

/* ============================================================
   KAWAII ARCADE THEME
   Candy cabinet, round gacha capsules, pastel lights.
   Bear art (bearArt.js output) is never restyled here.
   ============================================================ */

:root {
  --kw-pink: #ff8fb0;
  --kw-pink-soft: #ffc7d9;
  --kw-pink-deep: #e85d8a;
  --kw-pink-dark: #c43e6d;
  --kw-cream: #fff6fa;
  --kw-mint: #9ef0d6;
  --kw-mint-dark: #3eb491;
  --kw-sky: #aee9ff;
  --kw-lavender: #cfc3ff;
  --kw-lavender-dark: #8d7bd8;
  --kw-sun: #ffd66b;
  --kw-sun-dark: #e0a32e;
  --kw-choco: #5b3a4a;
  --kw-text-soft: #8a6a78;
  --kw-radius-lg: 26px;
  --kw-radius: 18px;
  --kw-radius-sm: 13px;
}

:root,
body,
button,
input,
select {
  font-family: "Baloo 2", Inter, ui-sans-serif, system-ui, sans-serif;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  color: var(--kw-choco);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='110' viewBox='0 0 110 110'%3E%3Cpath d='M30 44C14 32 14 18 24 18c5 0 6 5 6 5s1-5 6-5c10 0 10 14-6 26z' fill='%23ff9fc0' fill-opacity='.16'/%3E%3Cpath d='M82 92l2.6 7 7 2.6-7 2.6-2.6 7-2.6-7-7-2.6 7-2.6z' fill='%23ffd66b' fill-opacity='.3'/%3E%3C/svg%3E"),
    radial-gradient(circle at 8% 12%, rgba(255, 199, 217, .5) 0 120px, transparent 150px),
    radial-gradient(circle at 92% 8%, rgba(174, 233, 255, .55) 0 100px, transparent 130px),
    radial-gradient(circle at 80% 88%, rgba(207, 195, 255, .4) 0 130px, transparent 160px),
    linear-gradient(180deg, #fff0f6 0%, #effbf6 48%, #ffeef6 100%);
}

/* ---------- Cabinet: candy machine ---------- */

.cabinet {
  border: 6px solid var(--kw-pink-dark);
  border-radius: 34px 34px var(--kw-radius-lg) var(--kw-radius-lg);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .3) 0 7%, transparent 7% 93%, rgba(160, 42, 90, .18) 93%),
    linear-gradient(180deg, #ffa9c6 0%, var(--kw-pink) 55%, #ef6f9c 100%);
  box-shadow:
    0 12px 0 #d8638c,
    0 24px 34px rgba(196, 62, 109, .28);
}

.marquee {
  border-bottom: 5px solid var(--kw-pink-dark);
  background:
    radial-gradient(circle at 10px 8px, rgba(255, 255, 255, .5) 0 3px, transparent 4px),
    linear-gradient(180deg, #ffe9a8, var(--kw-sun));
  background-size: 26px 100%, 100% 100%;
  color: #7a4a12;
  letter-spacing: .02em;
}

.marquee span:first-child::after {
  content: " ♡";
  color: var(--kw-pink-deep);
}

.machine-lights i {
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(196, 62, 109, .8), 0 0 10px rgba(255, 214, 107, .8);
}

/* ---------- Glass: pastel sky window ---------- */

.glass {
  border: 6px solid #7fc4d8;
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .85) 0 16px, rgba(255, 255, 255, .55) 17px 26px, transparent 27px),
    radial-gradient(circle at 30% 12%, rgba(255, 255, 255, .8) 0 12px, transparent 13px),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, .7) 0 14px, rgba(255, 255, 255, .4) 15px 22px, transparent 23px),
    linear-gradient(180deg, #c8f3ff 0%, #ecfffb 52%, #c4ecd9 100%);
}

.glass::after {
  opacity: .18;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 32%, rgba(255, 255, 255, .5) 42%, rgba(255, 255, 255, .14) 50%, transparent 58%);
  background-size: 280% 100%;
  animation: kw-glass-shine 7s ease-in-out infinite;
}

@keyframes kw-glass-shine {
  0%, 58%, 100% {
    background-position: 120% 0;
  }
  78% {
    background-position: -30% 0;
  }
}

.rail {
  background: var(--kw-pink-dark);
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(160, 42, 90, .3);
}

/* ---------- Claw: soft lavender metal ---------- */

.claw span {
  background: linear-gradient(90deg, #8d80c4, #d9d1f6 42%, #9a8cd0 44%);
  border-color: #6f63a8;
  border-radius: 999px;
}

.claw span:nth-child(2) {
  background: #7c70b4;
  border-radius: 4px;
  box-shadow: inset 0 -8px 0 #5c5190;
}

.claw span:nth-child(1)::after,
.claw span:nth-child(3)::after {
  background: #4d4378;
  border-radius: 999px;
}

.claw::after {
  border-color: #6f63a8;
  background:
    radial-gradient(circle at 32% 30%, #ffffff 0 26%, transparent 27%),
    radial-gradient(circle, #efeafe 0 22%, #a99ddb 23% 46%, #e6dffc 47%);
  box-shadow: 3px 4px 0 rgba(109, 91, 165, .3);
}

.claw::before {
  background: repeating-linear-gradient(180deg, var(--kw-pink-deep) 0 5px, #ffe3ee 5px 10px);
  border-radius: 999px;
  box-shadow:
    -22px -8px 0 11px var(--kw-pink-soft),
    22px -8px 0 11px var(--kw-pink),
    0 0 0 4px #6f63a8;
}

/* ---------- Prize shelf + round gacha capsules ---------- */

.prize-shelf {
  border: 5px solid rgba(127, 196, 216, .85);
  border-radius: var(--kw-radius);
  background:
    linear-gradient(rgba(255, 255, 255, .4) 2px, transparent 2px),
    rgba(255, 255, 255, .62);
  background-size: 12px 12px;
  box-shadow: 0 12px 0 rgba(127, 196, 216, .3), 0 22px 0 rgba(95, 156, 175, .18);
}

.shelf-bear {
  border: 4px solid rgba(127, 196, 216, .55);
  border-radius: var(--kw-radius-sm);
  background: rgba(255, 255, 255, .55);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.shelf-bear:hover {
  transform: translateY(-3px);
}

.shelf-bear:disabled {
  cursor: not-allowed;
  transform: none;
}

.shelf-bear.targeted {
  border-color: var(--kw-pink-deep);
  background: rgba(255, 199, 217, .55);
  box-shadow: inset 0 0 0 3px rgba(255, 143, 176, .5), 0 7px 0 rgba(232, 93, 138, .25);
}

.shelf-bear.targeted::before {
  content: "♡";
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--kw-pink-deep);
  font-size: 1rem;
  font-weight: 800;
  animation: kw-heart-bounce 1.1s ease-in-out infinite;
  z-index: 2;
}

@keyframes kw-heart-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

.mystery-prize i,
.unrevealed-capsule i,
.selected-mystery i {
  width: 48px;
  height: 48px;
  border: 4px solid var(--kw-pink-dark);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .95) 0 7px, transparent 8px),
    linear-gradient(180deg, rgba(255, 255, 255, .95) 0 46%, rgba(255, 246, 250, .9) 46% 50%, var(--kw-pink) 50%);
  box-shadow:
    inset -5px -6px 0 rgba(196, 62, 109, .18),
    0 7px 0 rgba(196, 62, 109, .28);
  transform: none;
}

.shelf-bear:nth-child(3n+2) .mystery-prize i,
.shelf-bear:nth-child(3n+2) i {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .95) 0 7px, transparent 8px),
    linear-gradient(180deg, rgba(255, 255, 255, .95) 0 46%, rgba(255, 246, 250, .9) 46% 50%, var(--kw-sky) 50%);
  border-color: #4e93ad;
  box-shadow:
    inset -5px -6px 0 rgba(78, 147, 173, .2),
    0 7px 0 rgba(78, 147, 173, .3);
}

.shelf-bear:nth-child(3n) .mystery-prize i,
.shelf-bear:nth-child(3n) i {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .95) 0 7px, transparent 8px),
    linear-gradient(180deg, rgba(255, 255, 255, .95) 0 46%, rgba(255, 246, 250, .9) 46% 50%, var(--kw-lavender) 50%);
  border-color: var(--kw-lavender-dark);
  box-shadow:
    inset -5px -6px 0 rgba(141, 123, 216, .2),
    0 7px 0 rgba(141, 123, 216, .3);
}

@keyframes capsule-drift {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.mystery-prize span {
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--kw-pink-dark);
  border: 2px solid var(--kw-pink-soft);
  font-size: .68rem;
  padding: 2px 7px;
}

.shelf-bear.revealed.empty {
  opacity: .75;
}

.catch-label {
  border-radius: 999px;
  border: 3px solid var(--kw-pink-soft);
  background: rgba(255, 255, 255, .92);
  color: var(--kw-choco);
}

/* ---------- Controls: candy buttons ---------- */

.controls {
  user-select: none;
}

.controls button,
.modal-mint,
.modal-try {
  touch-action: manipulation;
}

.wallet-button,
.coin-button,
.move-button,
.joystick,
.modal-mint,
.modal-try,
.lab-link,
.lab-nav-link {
  border-radius: var(--kw-radius);
  transition: transform .1s ease, box-shadow .1s ease, filter .1s ease;
}

.coin-button {
  background: linear-gradient(180deg, #ffe49a, var(--kw-sun));
  color: #6b4310;
  box-shadow: 0 5px 0 var(--kw-sun-dark), inset 0 2px 0 rgba(255, 255, 255, .65);
}

.wallet-button {
  background: linear-gradient(180deg, #c2f7e4, var(--kw-mint));
  color: #115843;
  box-shadow: 0 5px 0 var(--kw-mint-dark), inset 0 2px 0 rgba(255, 255, 255, .65);
}

.move-button {
  background: linear-gradient(180deg, #e2daff, var(--kw-lavender));
  color: #4d3f8c;
  box-shadow: 0 4px 0 var(--kw-lavender-dark), inset 0 2px 0 rgba(255, 255, 255, .6);
}

.coin-button:not(:disabled):active,
.wallet-button:not(:disabled):active,
.move-button:not(:disabled):active,
.modal-mint:active,
.modal-try:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .5);
}

.move-button:disabled {
  background: #e7e3f2;
  color: #a9a3c2;
  box-shadow: 0 3px 0 #c9c3de;
}

.dpad {
  border: 4px solid var(--kw-pink-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 6px 0 rgba(232, 93, 138, .14);
}

.dpad .move-button {
  border-radius: var(--kw-radius-sm);
  font-size: 1rem;
}

.joystick {
  border: 4px solid var(--kw-pink-dark);
  background: linear-gradient(180deg, #ffd3e2, var(--kw-pink-soft));
  box-shadow: 0 6px 0 #d8638c, inset 0 2px 0 rgba(255, 255, 255, .6);
}

.joystick::before {
  background: #7c70b4;
  border-radius: 4px;
}

.joystick i {
  border-radius: 999px;
  background: var(--kw-pink-deep);
  box-shadow: 0 4px 0 var(--kw-pink-dark);
}

@keyframes drop-button-blink {
  0%, 100% {
    background: var(--kw-pink-deep);
  }
  50% {
    background: var(--kw-lavender-dark);
  }
}

.counter {
  border: 3px solid var(--kw-pink-soft);
  border-radius: var(--kw-radius-sm);
  background: rgba(255, 255, 255, .9);
}

.counter span {
  color: var(--kw-text-soft);
}

.counter strong {
  color: var(--kw-pink-deep);
}

/* ---------- Panels and cards ---------- */

.selected-card,
.mint-stats div,
.bear-card,
.gallery-panel,
.gallery-card,
.gallery-rule,
.art-reel,
.chain-panel,
.lab-picker,
.lab-preview-panel,
.lab-breakdown,
.trait-catalog,
.frame-strip,
.layer-card,
.trait-token-card,
.frame-card,
.status-list div {
  border-radius: var(--kw-radius);
  border-color: rgba(232, 93, 138, .18);
  box-shadow: 0 7px 0 rgba(232, 93, 138, .08);
}

.global-mint-log,
.layer-art,
.trait-token-art,
.lab-preview-art,
.art-reel-item {
  border-radius: var(--kw-radius-sm);
}

.selected-card.result-state {
  border-color: var(--kw-sun);
  background:
    linear-gradient(rgba(255, 255, 255, .5) 2px, transparent 2px),
    #fff8e2;
}

.selected-card.result-state.miss {
  border-color: var(--kw-lavender);
  background:
    linear-gradient(rgba(255, 255, 255, .5) 2px, transparent 2px),
    #f0edff;
}

.modal-mint {
  background: linear-gradient(180deg, #ffe49a, var(--kw-sun));
  color: #6b4310;
  box-shadow: 0 5px 0 var(--kw-sun-dark), inset 0 2px 0 rgba(255, 255, 255, .65);
}

.modal-try {
  background: linear-gradient(180deg, #e2daff, var(--kw-lavender));
  color: #4d3f8c;
  box-shadow: 0 5px 0 var(--kw-lavender-dark), inset 0 2px 0 rgba(255, 255, 255, .6);
}

.tier-pill,
.chain-panel-heading span {
  border-radius: 999px;
}

.gallery-filters button,
.gallery-pager button,
.trait-bar button,
.layer-controls button {
  border-radius: 999px;
  border-color: rgba(232, 93, 138, .26);
}

.gallery-filters button.active,
.gallery-pager button:not(:disabled):hover,
.layer-controls button.active {
  background: var(--kw-pink-deep);
  border-color: var(--kw-pink-dark);
  color: #fff;
}

.chain-links a {
  border-radius: 999px;
}

.panel-header p,
.gallery-header p,
.art-reel-heading p,
.chain-panel-heading p,
.lab-header p,
.lab-section-heading p,
.gallery-card span,
.seed-note,
.mint-stats span,
.trait-bar span {
  color: var(--kw-pink-deep) !important;
}

.panel-header h1,
.gallery-header h2,
.selected-card h2,
.lab-header h1 {
  color: var(--kw-choco);
  letter-spacing: .01em;
}

.gallery-header strong,
.gallery-pager span,
.art-reel-heading span,
.mint-stats strong {
  color: var(--kw-sun-dark);
}

.gallery-card.active,
.bear-card.active {
  border-color: var(--kw-pink-deep);
  box-shadow: inset 0 0 0 2px rgba(232, 93, 138, .5), 0 7px 0 rgba(232, 93, 138, .14);
}

.gallery-card:hover,
.bear-card:hover,
.art-reel-item:hover {
  border-color: var(--kw-pink);
}

.lab-link,
.lab-nav-link {
  background: linear-gradient(180deg, #ffd3e2, var(--kw-pink-soft));
  color: var(--kw-pink-dark);
  border: 2px solid rgba(196, 62, 109, .35);
  box-shadow: 0 4px 0 rgba(216, 99, 140, .5);
}

.wallet-connect-host button {
  font-family: "Baloo 2", Inter, ui-sans-serif, system-ui, sans-serif !important;
  border-radius: var(--kw-radius) !important;
}

.trait-details dd {
  overflow-wrap: break-word;
}

/* RainbowKit modal no tema kawaii (so visual; opcoes e fluxo intactos) */
[data-rk] {
  --rk-fonts-body: "Baloo 2", Inter, ui-sans-serif, system-ui, sans-serif;
  --rk-colors-modalBackground: #fff6fa;
  --rk-colors-modalBackdrop: rgba(232, 93, 138, .3);
  --rk-colors-modalText: #5b3a4a;
  --rk-colors-modalTextSecondary: #8a6a78;
  --rk-colors-modalBorder: rgba(232, 93, 138, .2);
  --rk-colors-generalBorder: rgba(232, 93, 138, .18);
  --rk-colors-menuItemBackground: #ffe9f1;
  --rk-colors-actionButtonSecondaryBackground: #ffd3e2;
  --rk-colors-closeButton: #c43e6d;
  --rk-colors-closeButtonBackground: #ffe3ee;
  --rk-colors-profileForeground: #fff6fa;
  --rk-colors-profileAction: #ffe9f1;
  --rk-colors-profileActionHover: #ffd3e2;
  --rk-radii-modal: 26px;
  --rk-radii-modalMobile: 26px;
  --rk-radii-menuButton: 16px;
  --rk-radii-actionButton: 999px;
  --rk-shadows-dialog: 0 10px 0 rgba(196, 62, 109, .18), 0 24px 40px rgba(196, 62, 109, .25);
}

[data-rk] [role="dialog"] {
  animation: kw-modal-pop .4s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes kw-modal-pop {
  from {
    transform: scale(.85) translateY(14px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.wallet-connect-host button[data-testid="rk-connect-button"] {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, #c2f7e4, var(--kw-mint)) !important;
  color: #115843 !important;
  box-shadow: 0 5px 0 var(--kw-mint-dark), inset 0 2px 0 rgba(255, 255, 255, .65) !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  transition: transform .1s ease, box-shadow .1s ease;
}

.wallet-connect-host button[data-testid="rk-connect-button"]:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .5) !important;
}

/* ---------- Focus + scrollbar sugar ---------- */

:focus-visible {
  outline: 3px solid var(--kw-pink-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #ffeef6;
}

::-webkit-scrollbar-thumb {
  background: var(--kw-pink-soft);
  border-radius: 999px;
  border: 3px solid #ffeef6;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--kw-pink);
}

@media (prefers-reduced-motion: reduce) {
  .glass::before,
  .mystery-prize i,
  .shelf-bear.targeted::before,
  .art-reel-track,
  .machine-lights i {
    animation: none;
  }
}

/* ---------- Mobile: big friendly touch targets ---------- */

@media (max-width: 620px) {
  .cabinet {
    border-radius: 26px 26px 20px 20px;
    box-shadow: 0 9px 0 #d8638c, 0 18px 24px rgba(196, 62, 109, .26);
  }

  .glass {
    border-radius: 16px;
    border-width: 5px;
  }

  .prize-shelf {
    border-radius: 14px;
  }

  .shelf-bear {
    min-height: 64px;
    border-radius: 11px;
  }

  .mystery-prize i,
  .unrevealed-capsule i,
  .selected-mystery i {
    width: 42px;
    height: 42px;
    border-width: 4px;
  }

  .controls {
    gap: 10px;
    padding: 10px 10px 14px;
  }

  .dpad {
    grid-template-columns: repeat(3, 54px);
    grid-template-rows: repeat(3, 46px);
    gap: 6px;
    padding: 7px;
    border-radius: 20px;
  }

  .dpad .move-button {
    width: 54px;
    min-height: 46px;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  .joystick {
    width: 88px;
    height: 64px;
  }

  .coin-button,
  .wallet-button {
    min-height: 48px;
    font-size: .82rem;
  }

  .catch-label {
    border-radius: var(--kw-radius);
  }
}
