:root {
  color-scheme: light;
  --ink: #17212f;
  --muted: #5b6878;
  --line: #d8e1e8;
  --paper: #f4efe3;
  --panel: #fffdf8;
  --green: #2f8f63;
  --lime: #6cc36c;
  --red: #d8524a;
  --blue: #2878c8;
  --gold: #d8a11d;
  --violet: #7b58b8;
  --shadow: 0 24px 70px rgba(23, 33, 47, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(216, 82, 74, 0.22), transparent 22%),
    radial-gradient(circle at 86% 12%, rgba(244, 170, 154, 0.24), transparent 24%),
    linear-gradient(135deg, #251722 0%, #fdeceb 38%, #fff3e3 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.page-jump {
  position: fixed;
  right: 18px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(23, 33, 47, 0.88);
  border-radius: 999px;
  background: linear-gradient(135deg, #fffdf8, #f3d071 52%, #e0655f);
  color: var(--ink);
  box-shadow: 0 14px 32px rgba(23, 33, 47, 0.22);
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.page-jump:hover {
  transform: translateY(-2px);
}

.page-jump-down {
  top: 18px;
}

.page-jump-up {
  bottom: 18px;
}

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
  gap: 20px;
  min-height: 100vh;
  padding: 20px;
}

.stage,
.panel {
  background: rgba(255, 253, 248, 0.93);
  border: 2px solid rgba(23, 33, 47, 0.12);
  box-shadow: var(--shadow);
}

.stage {
  align-self: start;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  min-height: 880px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 24px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 10px, transparent 10px 20px),
    linear-gradient(100deg, #251722 0%, #a92f38 52%, #d8a11d 100%);
  color: white;
  overflow: hidden;
}

.topbar::after {
  content: "$";
  position: absolute;
  right: 92px;
  bottom: -44px;
  color: rgba(255, 255, 255, 0.13);
  font-size: 10rem;
  font-weight: 950;
  line-height: 1;
  transform: rotate(-12deg);
}

h1,
h2,
p {
  margin: 0;
}

.eyebrow {
  margin-bottom: 0;
  color: #f3d071;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.social-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.social-button,
.buy-pepei {
  min-height: 40px;
  padding: 0 16px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.25), 0 0 26px rgba(243, 208, 113, 0.36);
}

.social-button {
  background: rgba(255, 253, 248, 0.94);
}

#xLink {
  background: #050609;
  color: #fffdf8;
}

#telegramLink {
  background: #2aabee;
  color: #fffdf8;
}

.social-button:hover,
.buy-pepei:hover {
  transform: translateY(-2px);
}

.social-button.is-placeholder {
  opacity: 0.78;
}

.buy-pepei {
  background: linear-gradient(90deg, #35b657, #72d86d);
  color: #fffdf8;
  text-shadow: 0 2px 0 rgba(23, 33, 47, 0.24);
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 5.2rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
}

.hero-line {
  margin-top: 4px;
  color: #f9f4d8;
  font-size: clamp(1.25rem, 2.5vw, 2.45rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar p:not(.eyebrow) {
  max-width: 700px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.03rem;
  font-weight: 750;
}

.tokenomics-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 980px;
  margin-top: 14px;
}

.tokenomics-strip span {
  padding: 7px 10px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.14);
  color: #fffdf8;
  box-shadow: inset 0 -4px 0 rgba(23, 33, 47, 0.14);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.meme-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 2px;
}

.meme-actions button {
  min-width: 66px;
  min-height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 5px 0 rgba(23, 33, 47, 0.22);
  cursor: default;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.meme-actions button:nth-child(2) {
  background: #f3d071;
}

.meme-actions button:nth-child(3) {
  background: #43b85c;
  color: #fffdf8;
  border-color: rgba(255, 255, 255, 0.9);
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  cursor: pointer;
  font-size: 1.5rem;
}

.world {
  position: relative;
  flex: 1;
  min-height: 790px;
  overflow: hidden;
  --skyline-bottom: 19%;
  --skyline-roof: 31%;
  --decision-building-gap: 26px;
  background:
    radial-gradient(circle at 15% 17%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 74% 48%, rgba(224, 101, 95, 0.14), transparent 22%),
    linear-gradient(to top, #f3c9c2 0 20%, transparent 20%),
    linear-gradient(180deg, #f8dedd 0%, #fbefea 58%, #fff4d8 100%);
}

.ticker-tape {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(37, 23, 34, 0.94), rgba(169, 47, 56, 0.94), rgba(216, 161, 29, 0.92));
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.era-strip {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 46px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.era-card {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 33, 47, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 10px 22px rgba(23, 33, 47, 0.1);
}

.era-card b,
.era-card span {
  display: block;
}

.era-card b {
  font-size: 0.9rem;
}

.era-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.era-card.locked {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(8, 12, 17, 0.9), rgba(23, 33, 47, 0.78));
  color: rgba(255, 255, 255, 0.75);
  filter: grayscale(0.45);
}

.era-card.locked span {
  color: rgba(255, 255, 255, 0.5);
}

.era-card.active {
  border-color: rgba(169, 47, 56, 0.45);
  background: linear-gradient(135deg, rgba(224, 101, 95, 0.42), rgba(255, 253, 248, 0.94));
}

.era-card.unlocked {
  opacity: 0.78;
}

.ticker-tape span {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.skyline {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: var(--skyline-bottom);
  height: 35%;
  display: flex;
  align-items: end;
  gap: 3%;
  opacity: 0.82;
}

.crypto-deck {
  position: absolute;
  left: 26px;
  right: 26px;
  top: 220px;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
  height: 72px;
  pointer-events: none;
}

.year-returns {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 122px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.return-pill {
  display: grid;
  gap: 2px;
  min-height: 84px;
  padding: 12px 10px;
  border: 2px solid rgba(23, 33, 47, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 8px 18px rgba(23, 33, 47, 0.1);
}

.return-pill b {
  font-size: 0.92rem;
}

.return-pill span {
  font-size: 1.08rem;
  font-weight: 950;
}

.return-pill small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.return-pill.positive span {
  color: var(--green);
}

.return-pill.negative span {
  color: var(--red);
}

.return-pill.crash {
  border-color: rgba(216, 82, 74, 0.6);
  background: linear-gradient(135deg, rgba(216, 82, 74, 0.18), rgba(255, 253, 248, 0.94));
  box-shadow: 0 9px 0 rgba(216, 82, 74, 0.14), 0 16px 30px rgba(23, 33, 47, 0.12);
}

.return-pill.crash span::after {
  content: " CRASH";
  display: inline-block;
  margin-left: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--red);
  color: white;
  font-size: 0.58rem;
  vertical-align: middle;
}

.return-pill.locked {
  opacity: 0.58;
  background: rgba(23, 33, 47, 0.82);
  color: white;
}

.candle {
  position: relative;
  display: block;
  width: 22px;
  height: 42px;
  border-radius: 7px;
  background: var(--green);
  box-shadow: 0 10px 20px rgba(23, 33, 47, 0.08);
}

.candle::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -18px;
  width: 3px;
  height: calc(100% + 36px);
  border-radius: 999px;
  background: rgba(23, 33, 47, 0.2);
}

.candle.red {
  height: 30px;
  background: var(--red);
}

.candle.tall {
  height: 62px;
}

.coin-chip {
  align-self: center;
  padding: 10px 16px;
  border: 2px solid rgba(23, 33, 47, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, #18243a, #fffdf8 44%, #f3d071);
  color: #a92f38;
  font-size: 1.12rem;
  font-weight: 950;
  box-shadow: 0 12px 0 rgba(23, 33, 47, 0.14), 0 20px 34px rgba(23, 33, 47, 0.18);
}

.tower {
  display: block;
  width: 16%;
  border: 3px solid rgba(23, 33, 47, 0.16);
  border-bottom: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.46) 18px 25px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(40, 120, 200, 0.27));
  border-radius: 8px 8px 0 0;
}

.tower-a { height: 50%; }
.tower-b { height: 78%; }
.tower-c { height: 42%; }
.tower-d { height: 64%; }

.market-cloud {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 3px;
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 33, 47, 0.13);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 10px 25px rgba(23, 33, 47, 0.1);
}

.market-cloud b {
  font-size: 0.76rem;
}

.market-cloud span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.hidden-cloud {
  display: none;
}

.cloud-a {
  top: 230px;
  left: 26px;
}

.cloud-b {
  top: 230px;
  right: 30px;
}

.cloud-c {
  top: 248px;
  left: 34%;
}

.orbit {
  position: absolute;
  border: 2px dashed rgba(23, 33, 47, 0.18);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}

.orbit-one {
  width: 220px;
  height: 220px;
  top: 96px;
  right: 13%;
}

.orbit-two {
  width: 118px;
  height: 118px;
  top: 150px;
  right: 22%;
  animation-direction: reverse;
  animation-duration: 18s;
}

.track {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 5%;
  height: 230px;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.track-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(23, 33, 47, 0.15);
  z-index: 1;
  pointer-events: none;
}

.top-line {
  top: 78px;
}

.bottom-line {
  top: 178px;
}

.milestone {
  position: absolute;
  top: 106px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(23, 33, 47, 0.14);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.m0 { left: 10%; }
.m1 { left: 86%; }
.m2 { left: 14%; top: 206px; }
.m3 { left: 88%; top: 206px; }

.map-item {
  position: absolute;
  bottom: 72px;
  z-index: 8;
  display: none;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.85), transparent 28%),
    linear-gradient(135deg, #fffdf8, #f0cc68);
  box-shadow: 0 12px 0 rgba(23, 33, 47, 0.16), 0 20px 34px rgba(23, 33, 47, 0.18);
  font-size: 2rem;
  transform: translateY(0);
  animation: pop-map 420ms ease both;
}

.asset-shelf {
  position: absolute;
  left: 8px;
  right: 8px;
  top: -62px;
  z-index: 9;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

.asset-shelf.second-lane {
  top: -132px;
}

.shelf-item {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffdf8, #f0cc68);
  box-shadow: 0 7px 0 rgba(23, 33, 47, 0.14);
  font-size: 1.35rem;
}

.map-item::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px dashed rgba(47, 143, 99, 0.28);
  border-radius: 20px;
}

.map-item.visible {
  display: grid;
}

.map-flat {
  left: 46%;
  background: linear-gradient(135deg, #fffdf8, #9fd4f2);
}

.map-studio {
  left: 58%;
  background: linear-gradient(135deg, #fffdf8, #b7bcc8);
}

.map-penthouse {
  left: 70%;
  background: linear-gradient(135deg, #fffdf8, #d8a11d);
}

.map-pizza {
  left: 8%;
  background: linear-gradient(135deg, #fffdf8, #f0a45b);
}

.map-rig {
  left: 24%;
  background: linear-gradient(135deg, #fffdf8, #7b58b8);
}

.map-car {
  left: 34%;
  background: linear-gradient(135deg, #fffdf8, #d8524a);
}

.path-fill {
  position: absolute;
  top: 78px;
  left: 0;
  height: 22px;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c94343, var(--gold), var(--blue));
  transition: width 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}

.path-fill-top {
  z-index: 1;
}

.path-fill.second-lane {
  top: 178px;
  bottom: auto;
}

.person {
  position: absolute;
  z-index: 20;
  left: 0%;
  top: -54px;
  bottom: auto;
  width: 106px;
  height: 128px;
  transform: translateX(-28%);
  transition: left 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.person.second-lane {
  top: 94px;
}

.lambo {
  position: absolute;
  left: -10px;
  bottom: 0;
  z-index: 1;
  display: none;
  width: 140px;
  height: 48px;
  border: 4px solid var(--ink);
  border-radius: 28px 38px 14px 14px;
  background: linear-gradient(90deg, #e0655f, #a92f38);
  box-shadow: 0 12px 0 rgba(23, 33, 47, 0.12);
}

.lambo::before {
  content: "";
  position: absolute;
  left: 38px;
  top: -18px;
  width: 48px;
  height: 24px;
  border: 4px solid var(--ink);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: rgba(159, 212, 242, 0.85);
}

.lambo::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -13px;
  height: 24px;
  background:
    radial-gradient(circle at 18px 12px, var(--ink) 0 10px, transparent 11px),
    radial-gradient(circle at calc(100% - 18px) 12px, var(--ink) 0 10px, transparent 11px);
}

.person.in-lambo,
.person.in-car {
  height: 112px;
}

.person.in-lambo .lambo {
  display: block;
}

.person.in-car .lambo {
  display: block;
  background: linear-gradient(90deg, #f1c84b, #d8524a);
}

.person.car-used .lambo {
  width: 124px;
  height: 44px;
  border-radius: 24px 28px 14px 14px;
  background: linear-gradient(90deg, #f1c84b, #d8524a);
}

.person.car-sports .lambo {
  left: -18px;
  width: 152px;
  height: 46px;
  border-radius: 16px 46px 12px 12px;
  background: linear-gradient(90deg, #2878c8, #7b58b8);
}

.person.car-lambo .lambo {
  left: -22px;
  width: 164px;
  height: 48px;
  border-radius: 10px 48px 12px 12px;
  background: linear-gradient(90deg, #e0655f, #d8a11d);
}

.person.car-lambo .lambo::before {
  left: 56px;
  width: 54px;
  background: rgba(159, 212, 242, 0.95);
}

.person.in-lambo .frog-head,
.person.in-car .frog-head {
  top: -18px;
}

.person.in-lambo .frog-body,
.person.in-car .frog-body {
  top: 32px;
  height: 42px;
}

.person.in-lambo .frog-arm,
.person.in-lambo .frog-leg,
.person.in-lambo .coin-bag,
.person.in-car .frog-arm,
.person.in-car .frog-leg,
.person.in-car .coin-bag {
  display: none;
}

.frog-head {
  position: absolute;
  left: 13px;
  top: 0;
  width: 78px;
  height: 58px;
  border: 4px solid var(--ink);
  border-radius: 44% 44% 48% 48%;
  background: linear-gradient(180deg, #e0655f, #a92f38);
  z-index: 3;
}

.frog-head::before,
.frog-head::after {
  content: "";
  position: absolute;
  top: -15px;
  width: 31px;
  height: 31px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #fffdf8;
}

.frog-head::before {
  left: 3px;
}

.frog-head::after {
  right: 3px;
}

.crown {
  position: absolute;
  left: 28px;
  top: -47px;
  z-index: 30;
  display: none;
  width: 50px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 5px 5px 9px 9px;
  background: linear-gradient(180deg, #ffe27a 0%, #d8a11d 100%);
  box-shadow: inset 0 -5px 0 rgba(161, 101, 18, 0.28), 0 4px 0 rgba(23, 33, 47, 0.16);
}

.crown::before {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: 8px;
  height: 31px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  background: linear-gradient(180deg, #fff08e 0%, #f3d071 72%, #d8a11d 100%);
  clip-path: polygon(0 100%, 0 42%, 17% 72%, 31% 0, 50% 68%, 69% 0, 83% 72%, 100% 42%, 100% 100%);
}

.person.crowned .crown {
  display: block;
}

.person.in-lambo .crown,
.person.in-car .crown {
  top: -65px;
}

.eye {
  position: absolute;
  top: -5px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.eye-left {
  left: 9px;
}

.eye-right {
  right: 9px;
}

.mouth {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 15px;
  height: 12px;
  border-bottom: 4px solid var(--ink);
  border-radius: 0 0 50% 50%;
}

.cheek {
  position: absolute;
  left: 10px;
  bottom: 18px;
  width: 14px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 202, 172, 0.7);
}

.frog-body {
  position: absolute;
  left: 27px;
  top: 48px;
  width: 52px;
  height: 58px;
  border: 4px solid var(--ink);
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(180deg, var(--jersey-color, #2f78c6), var(--jersey-dark, #1d4f88));
  z-index: 2;
}

.jersey-logo {
  position: absolute;
  left: 50%;
  top: 48%;
  display: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
  transform: translate(-50%, -50%);
}

.person.has-jersey .jersey-logo {
  display: grid;
}

.frog-arm,
.frog-leg {
  position: absolute;
  border: 4px solid var(--ink);
  background: #c94343;
  z-index: 1;
}

.frog-arm {
  top: 62px;
  width: 18px;
  height: 48px;
  border-radius: 14px;
}

.arm-left {
  left: 13px;
  transform: rotate(16deg);
}

.arm-right {
  right: 13px;
  transform: rotate(-16deg);
}

.frog-leg {
  top: 100px;
  width: 20px;
  height: 28px;
  border-radius: 14px;
}

.leg-left {
  left: 28px;
  transform: rotate(10deg);
}

.leg-right {
  left: 59px;
  transform: rotate(-10deg);
}

.person.walking .leg-left {
  animation: stride-left 420ms ease-in-out infinite alternate;
}

.person.walking .leg-right {
  animation: stride-right 420ms ease-in-out infinite alternate;
}

.person.walking .frog-head {
  animation: bob 420ms ease-in-out infinite alternate;
}

.coin-bag {
  position: absolute;
  right: 0;
  top: 54px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  border-radius: 45% 45% 50% 50%;
  background: var(--gold);
  border: 3px solid var(--ink);
  font-weight: 900;
}

.event-bubble {
  position: absolute;
  z-index: 4;
  left: 300px;
  bottom: 50%;
  max-width: min(510px, calc(100% - 48px));
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(23, 33, 47, 0.14);
  box-shadow: 0 12px 30px rgba(23, 33, 47, 0.12);
  color: var(--ink);
  font-weight: 800;
}

.event-bubble.second-lane {
  left: 300px;
  bottom: 50%;
}

.event-bubble.hidden {
  display: none;
}

.purchase-splash {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 9;
  display: grid;
  place-items: center;
  width: min(440px, calc(100% - 44px));
  min-height: 250px;
  padding: 24px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.78), transparent 24%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, #e0655f, #f3d071);
  box-shadow: 0 24px 80px rgba(23, 33, 47, 0.28);
  text-align: center;
  transform: translate(-50%, -50%) scale(0.82);
  pointer-events: auto;
}

.purchase-splash.danger {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(135deg, #151922, #d8524a);
  color: white;
}

.purchase-splash.danger small {
  color: rgba(255, 255, 255, 0.88);
}

.purchase-splash.hidden {
  display: none;
}

.purchase-splash.burst {
  animation: splash-pop 2600ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.purchase-splash.persistent {
  animation: splash-in 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.purchase-splash span {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  font-size: 4.6rem;
  line-height: 1;
  box-shadow: 0 12px 0 rgba(23, 33, 47, 0.16);
}

.purchase-splash b {
  margin-top: 12px;
  max-width: 360px;
  font-size: 1.55rem;
  line-height: 1.08;
  text-transform: uppercase;
}

.purchase-splash small {
  max-width: 280px;
  margin-top: 8px;
  color: #28313f;
  font-weight: 850;
}

.splash-close {
  margin-top: 16px;
  min-width: 96px;
  min-height: 42px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 6px 0 rgba(23, 33, 47, 0.18);
}

.purchase-splash.danger .splash-close {
  border-color: white;
  background: #fffdf8;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.67);
}

.top-ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.ledger-box {
  min-height: 112px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.74);
}

.ledger-box .group-title {
  margin-bottom: 8px;
}

.ledger-box ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  max-height: 132px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.ledger-box li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #344153;
  font-size: 0.86rem;
  font-weight: 750;
}

.ledger-box li:has(small) {
  grid-template-columns: 1fr auto;
}

.stats div {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats span,
.control-group label,
.group-title span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.stats strong {
  display: block;
  margin-top: 5px;
  font-size: 1.26rem;
}

.panel {
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3f6;
}

.personality-tabs {
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
}

.tab {
  min-height: 38px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
}

.tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 5px 16px rgba(23, 33, 47, 0.12);
}

.personality-card p {
  padding: 12px;
  border: 1px solid rgba(47, 143, 99, 0.22);
  border-radius: 8px;
  background: rgba(47, 143, 99, 0.08);
  color: #2c4052;
  font-size: 0.92rem;
  line-height: 1.35;
}

.control-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.owned {
  position: relative;
  z-index: 28;
  height: 104px;
  min-height: 104px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

h2 {
  font-size: 1rem;
}

.assets {
  display: grid;
  gap: 10px;
}

.asset {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.asset.locked {
  opacity: 0.62;
  background: #f5f7f8;
}

.asset.locked input {
  cursor: not-allowed;
}

.asset.stable-row strong {
  justify-self: end;
  color: var(--muted);
}

.asset b {
  text-transform: uppercase;
}

.asset-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
}

.asset b,
.asset small {
  display: block;
}

.asset small {
  margin-top: 2px;
  color: var(--muted);
}

.asset input {
  width: 80px;
  min-width: 80px;
  accent-color: var(--green);
}

.allocation-button {
  width: 100%;
  margin-top: 10px;
}

.compact {
  display: grid;
  gap: 10px;
}

.compact label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.switches {
  display: grid;
  gap: 10px;
}

.switches label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.switches input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.insight {
  display: grid;
  gap: 10px;
}

.decision {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(216, 161, 29, 0.45);
  border-radius: 8px;
  background: rgba(216, 161, 29, 0.12);
}

.map-decision {
  position: absolute;
  right: 32px;
  top: auto;
  bottom: calc(var(--skyline-roof) + var(--decision-building-gap));
  z-index: 18;
  width: min(390px, calc(100% - 64px));
  max-height: 220px;
  overflow: auto;
  border-color: rgba(216, 161, 29, 0.68);
  background: rgba(255, 247, 222, 0.94);
  box-shadow: 0 16px 34px rgba(23, 33, 47, 0.16);
  backdrop-filter: blur(8px);
}

.map-decision h2 {
  font-size: 1rem;
}

.decision.hidden {
  display: none;
}

.decision p {
  color: #2c4052;
  font-size: 0.92rem;
  line-height: 1.38;
}

.decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.insight p {
  min-height: 54px;
  padding: 12px;
  border: 1px solid rgba(47, 143, 99, 0.25);
  border-radius: 8px;
  background: rgba(47, 143, 99, 0.08);
  color: #2c4052;
  font-size: 0.92rem;
  line-height: 1.35;
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 62px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.bar {
  flex: 1;
  min-width: 8px;
  border-radius: 4px 4px 0 0;
  background: var(--green);
}

.bar.negative {
  background: var(--red);
}

.empty-chart {
  align-self: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.owned ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.owned li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #344153;
  font-size: 0.9rem;
  font-weight: 750;
}

.owned li strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.owned li small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.mini-sell {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.holdings {
  display: flex;
  gap: 6px;
  height: 42px;
  max-height: 42px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  cursor: default;
}

.holding-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  width: 74px;
  min-width: 74px;
  max-width: 74px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #344153;
  font-size: 0.9rem;
  font-weight: 800;
}

.holding-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.holding-row b {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holding-row strong {
  display: none;
}

.holding-row small {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.owned:hover .holdings,
.owned:focus-within .holdings {
  position: absolute;
  left: 0;
  right: 0;
  top: 52px;
  z-index: 55;
  display: grid;
  height: auto;
  max-height: 330px;
  gap: 8px;
  padding: 10px;
  overflow: auto;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 36px rgba(23, 33, 47, 0.18);
}

.owned:hover .holding-row,
.owned:focus-within .holding-row {
  width: auto;
  min-width: 0;
  max-width: none;
}

.owned:hover .holding-row strong,
.owned:focus-within .holding-row strong {
  display: block;
}

.owned:hover .holding-row small,
.owned:focus-within .holding-row small {
  display: block;
}

.holding-row.stable {
  border-color: rgba(138, 147, 155, 0.45);
  background: rgba(138, 147, 155, 0.08);
}

.source-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.legal-note {
  margin: 0 20px 24px;
  padding: 24px clamp(18px, 4vw, 44px);
  border: 0;
  background:
    repeating-linear-gradient(0deg, rgba(40, 120, 200, 0.08) 0 2px, transparent 2px 34px),
    #fffdf8;
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(23, 33, 47, 0.12);
  transform: rotate(-0.4deg);
  font-family: "Comic Sans MS", "Trebuchet MS", Inter, sans-serif;
  font-size: clamp(1.02rem, 2vw, 1.38rem);
  line-height: 1.22;
}

.legal-note strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(1.7rem, 4.4vw, 3.7rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0;
}

.legal-note p {
  max-width: 1180px;
  margin: 12px 0 0;
  font-weight: 850;
}

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 33, 47, 0.58);
}

.site-modal.hidden {
  display: none;
}

.site-modal-card {
  position: relative;
  width: min(440px, 100%);
  border: 3px solid rgba(23, 33, 47, 0.9);
  border-radius: 8px;
  padding: 28px 24px 24px;
  background:
    repeating-linear-gradient(135deg, rgba(216, 82, 74, 0.08) 0 12px, transparent 12px 24px),
    #fffdf8;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.site-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(23, 33, 47, 0.85);
  border-radius: 999px;
  background: #e0655f;
  color: #fffdf8;
  cursor: pointer;
  font-weight: 950;
  text-transform: uppercase;
}

.site-modal-chip {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 0 18px;
  border: 2px solid rgba(23, 33, 47, 0.86);
  border-radius: 999px;
  background: linear-gradient(90deg, #35b657, #f3d071);
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 8px 0 rgba(23, 33, 47, 0.2);
}

.site-modal-card h2 {
  font-size: 1.55rem;
  line-height: 1;
  text-transform: uppercase;
}

.site-modal-card p {
  margin-top: 12px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 850;
}

.site-modal-card small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.primary,
.secondary {
  min-height: 46px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.primary {
  border: 0;
  background: var(--ink);
  color: white;
}

.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.primary:disabled,
.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.log {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.log ol {
  display: grid;
  gap: 8px;
  max-height: 188px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}

.log li {
  padding: 10px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #344153;
  font-size: 0.9rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes stride-left {
  to { transform: rotate(-16deg); }
}

@keyframes stride-right {
  to { transform: rotate(16deg); }
}

@keyframes bob {
  to { transform: translateY(-4px); }
}

@keyframes pop-map {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45) rotate(-8deg);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(2deg);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85) rotate(4deg);
  }
}

@keyframes splash-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.58) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 880px;
  }

  .panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

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

  .topbar {
    padding: 16px;
  }

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

  .social-actions {
    justify-content: flex-start;
  }

  .social-button,
  .buy-pepei {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.74rem;
  }

  .world {
    min-height: 790px;
  }

  .year-returns {
    grid-template-columns: repeat(2, 1fr);
    top: 112px;
  }

  .crypto-deck {
    top: 255px;
  }

  .map-decision {
    left: auto;
    right: 22px;
    top: auto;
    bottom: calc(var(--skyline-roof) + 18px);
    width: min(390px, calc(100% - 44px));
    max-height: 240px;
  }

  .market-cloud {
    min-width: 96px;
    padding: 8px;
  }

  .cloud-c {
    display: none;
  }

  .event-bubble {
    bottom: 47%;
    font-size: 0.9rem;
  }

  .event-bubble.second-lane {
    left: 18px;
    bottom: 54%;
  }

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

  .stats div:nth-child(2) {
    border-right: 0;
  }

  .stats div {
    padding: 14px;
  }

  .top-ledger {
    grid-template-columns: 1fr;
  }

  .ledger-box ul {
    grid-template-columns: 1fr;
    max-height: 160px;
  }

  .tabs,
  .actions {
    grid-template-columns: 1fr;
  }

  .personality-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .decision-actions {
    grid-template-columns: 1fr;
  }

  .asset {
    grid-template-columns: 34px 1fr;
  }

  .asset input {
    grid-column: 1 / -1;
    width: 100%;
  }
}
