/* PUMPOPOLY: cozy paper + ink UI */
:root {
  --ink: #2b2140;
  --ink-2: #6e6283;
  --paper: #fff6e3;
  --paper-2: #fbe9c9;
  --line: #2b2140;
  --green: #5fcf88;
  --green-d: #2f9a5b;
  --gold: #ffd24d;
  --gold-d: #d9a520;
  --coral: #ff6f69;
  --pink: #ff94c6;
  --blue: #7fcaf2;
  --lilac: #b9a3ff;
  --hard: 0 4px 0 var(--ink);
  --hard-sm: 0 3px 0 var(--ink);
  --r: 16px;
  --display: 'Lilita One', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #bfe3fb; color: var(--ink); font-family: var(--body); font-weight: 700; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: var(--green-d); }
.muted { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.hidden { display: none !important; }

#scene { position: fixed; inset: 0; }
#scene canvas { display: block; }
#tags { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }

/* paper grain + soft vignette over the 3D view */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; mix-blend-mode: multiply; opacity: .5;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(80, 50, 90, .22) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .3 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* shared "sticker" surface */
.top, .stat, .panel, .dock, .cam button, .mobile-tabs button, .tile-card, .sheet {
  background: var(--paper); border: 2.5px solid var(--line); box-shadow: var(--hard);
}

/* ---------- top bar */
.top {
  position: fixed; top: 12px; left: 12px; right: 12px; height: 56px; z-index: 5;
  display: flex; align-items: center; gap: 14px; padding: 0 10px 0 14px; border-radius: 18px;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 25px; letter-spacing: .5px; color: var(--ink); text-decoration: none; }
.logo span:last-child { color: var(--green); -webkit-text-stroke: 1.6px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); }
.pill-ico { width: 32px; height: 16px; border-radius: 99px; background: linear-gradient(90deg, var(--green) 50%, #fff 50%); border: 2.5px solid var(--ink); transform: rotate(-30deg); animation: wobble 3s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-18deg) translateY(-2px); } }
.top nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.link { padding: 8px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 15px; }
.link:hover { background: var(--paper-2); }
.ca { margin-left: 6px; padding: 7px 12px; border-radius: 12px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 12px; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 2.5px solid var(--ink); transition: transform .1s; }
.ca:hover { transform: rotate(-2deg) scale(1.03); }
.ca.set { background: var(--green); color: var(--ink); box-shadow: var(--hard-sm); }
.buy { margin-left: 4px; padding: 7px 16px; border-radius: 12px; background: var(--gold); color: var(--ink); font-family: var(--display); font-size: 17px; letter-spacing: .5px; text-decoration: none; border: 2.5px solid var(--ink); box-shadow: var(--hard-sm); white-space: nowrap; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-4deg) scale(1.06); } 92% { transform: rotate(3deg) scale(1.06); } }
.live { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; background: var(--paper-2); border: 2px solid var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; font-weight: 900; }
.live i { width: 9px; height: 9px; border-radius: 50%; background: #b8adc9; border: 1.5px solid var(--ink); }
.live.on i { background: var(--green); animation: ping 1.6s infinite; }
.live.off i { background: var(--gold); }
@keyframes ping { 50% { transform: scale(1.35); } }

/* ---------- stats */
.stats { position: fixed; top: 82px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 8px; }
.stat { border-radius: 14px; padding: 5px 14px 6px; min-width: 112px; text-align: center; color: inherit; text-decoration: none; }
.stat:nth-child(odd) { transform: rotate(-1deg); }
.stat:nth-child(even) { transform: rotate(1deg); }
.stat small { display: block; font-size: 10.5px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .8px; font-weight: 900; }
.stat b { font-family: var(--mono); font-size: 17px; font-weight: 700; display: inline-block; }
.stat.jack { background: #fff1c2; }
.stat.jack b { color: #a8740f; }
.stat b.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.25) rotate(-3deg); color: var(--green-d); } }
.stat.mkt b em { font-style: normal; font-size: 12px; margin-left: 4px; }
.stat.mkt b em.up { color: var(--green-d); }
.stat.mkt b em.down { color: var(--coral); }

/* ---------- panels */
.panel {
  position: fixed; top: 140px; bottom: 116px; width: 290px; z-index: 3; overflow-y: auto;
  border-radius: 20px; padding: 14px 12px; scrollbar-width: thin; scrollbar-color: var(--paper-2) transparent;
}
.panel.left { left: 12px; }
.panel.right { right: 12px; }
.panel h3 { margin: 2px 4px 10px; font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .5px; color: var(--ink); }
.panel h3 + * { margin-bottom: 18px; }

.pl { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 1px 10px; align-items: center; padding: 8px 10px; border-radius: 14px; margin-bottom: 7px; background: #fff; border: 2px solid var(--ink); overflow: hidden; transition: transform .2s; }
.pl::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--pc); }
.pl.turn { transform: translateX(4px) rotate(-.6deg); box-shadow: var(--hard-sm); background: #fffdf5; }
.pl.out { opacity: .45; filter: grayscale(.7); }
.av { grid-row: span 2; display: grid; place-items: center; }
.av svg { display: block; }
.pl .nm { font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .cash { font-family: var(--mono); font-size: 14px; text-align: right; font-weight: 700; }
.pl .sub { font-size: 11px; color: var(--ink-2); font-weight: 700; }
.pl .nw { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); text-align: right; }
.badge { display: inline-block; font-size: 9.5px; padding: 1px 6px; border-radius: 6px; margin-left: 4px; vertical-align: 2px; letter-spacing: .5px; background: var(--paper-2); color: var(--ink); font-weight: 900; border: 1.5px solid var(--ink); }
.badge.ai { background: #d4f5df; }
.badge.you { background: var(--ink); color: var(--paper); }
.badge.jail { background: #ffd9d6; }
.badge.afk { background: #fff1c2; }
.pl .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--green); transition: width .25s linear; }
.pl .dots { display: flex; gap: 3px; margin-top: 3px; flex-wrap: wrap; }
.pl .dots i { width: 9px; height: 9px; border-radius: 3px; border: 1.5px solid var(--ink); }

.champs .ch { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 7px 9px; border-radius: 10px; border: 2px dashed rgba(43, 33, 64, .25); margin-bottom: 5px; }
.champs .ch span:first-child { border-left: 5px solid var(--pc); padding-left: 7px; }
.champs .ch span:last-child { font-family: var(--mono); color: var(--green-d); }

/* feed */
#feed { display: flex; flex-direction: column; gap: 8px; }
.f { font-size: 13px; line-height: 1.35; animation: fin .35s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes fin { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
.f.think { display: flex; gap: 6px; align-items: flex-start; }
.f.think .av svg { width: 28px; height: 28px; }
.f.think .bub { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 4px 14px 14px 14px; padding: 6px 10px 7px; font-weight: 700; }
.f.think .who { display: block; font-family: var(--display); font-size: 12.5px; letter-spacing: .4px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--pc); text-decoration-thickness: 3px; text-underline-offset: 1px; margin-bottom: 1px; }
.f.evt { color: var(--ink-2); font-size: 12px; padding-left: 34px; font-weight: 700; }
.f.bank { background: #fff1c2; border: 2px solid var(--ink); border-radius: 14px; padding: 7px 10px; transform: rotate(-.5deg); box-shadow: var(--hard-sm); }
.f.bank .bank-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.f.bank .tycoon svg { display: block; }
.f.bank b { font-family: var(--display); font-weight: 400; color: #a8740f; font-size: 12.5px; letter-spacing: .6px; }
.f.fee { color: var(--green-d); font-size: 12px; padding-left: 34px; }

/* ---------- dock */
.dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 10px; padding: 10px; min-height: 78px; max-width: calc(100vw - 24px);
  border-radius: 22px; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1);
}
.dock.mine { transform: translateX(-50%) translateY(-4px) rotate(-.5deg); background: #fffdf3; }
.dock .msg { padding: 0 10px; font-size: 15px; color: var(--ink-2); white-space: nowrap; font-weight: 700; }
.dock .msg b { color: var(--ink); font-weight: 900; }
.dock input { font: inherit; font-size: 16px; font-weight: 800; padding: 13px 16px; border-radius: 14px; border: 2.5px solid var(--ink); background: #fff; width: 210px; outline: none; color: var(--ink); }
.dock input:focus { background: #fffbe8; box-shadow: 0 0 0 4px rgba(95, 207, 136, .35); }
.btn { padding: 13px 20px; border-radius: 14px; font-family: var(--display); font-size: 18px; letter-spacing: .5px; background: #fff; border: 2.5px solid var(--ink); box-shadow: var(--hard); transition: transform .08s, box-shadow .08s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.go { background: var(--green); }
.btn.go.big { font-size: 21px; padding: 14px 26px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.05) rotate(-1deg); } }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.small { padding: 8px 12px; font-size: 14px; box-shadow: var(--hard-sm); }
.btn.chip { padding: 8px 12px; font-size: 14px; box-shadow: var(--hard-sm); background: #fff; border-color: var(--ink); border-bottom-width: 5px; border-bottom-color: var(--pc); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.builds { display: flex; gap: 6px; max-width: 46vw; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; }
.timer { width: 48px; height: 48px; flex: none; }
.timer circle { fill: none; stroke-width: 5.5; }
.timer circle:first-child { fill: #fff; }
.timer text { font-family: var(--mono); font-size: 15px; font-weight: 700; fill: var(--ink); }
.buy-card { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; background: #fff; border-radius: 14px; border: 2.5px solid var(--ink); transform: rotate(-1.5deg); }
.buy-card i { width: 12px; height: 42px; border-radius: 6px; border: 2px solid var(--ink); }
.buy-card div b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; }
.buy-card div small { color: var(--ink-2); font-size: 12px; }

/* ---------- camera + sound buttons */
.cam { position: fixed; right: 318px; bottom: 26px; z-index: 4; display: flex; flex-direction: column; gap: 7px; }
.cam button { padding: 7px 12px; border-radius: 12px; font-size: 13px; font-weight: 900; box-shadow: var(--hard-sm); }
.cam button:hover { transform: rotate(-2deg); }
.cam button.on { background: var(--ink); color: var(--paper); }

/* ---------- world tags + speech bubbles */
.tag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; will-change: transform; }
.tag .nm { font-size: 11px; font-weight: 900; padding: 2px 9px; border-radius: 9px; background: var(--paper); border: 2px solid var(--ink); white-space: nowrap; box-shadow: 0 2px 0 var(--ink); position: relative; }
.tag .nm::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--green)); border: 1.5px solid var(--ink); margin-right: 5px; vertical-align: -1px; }
.tag.turn .nm { background: var(--ink); color: var(--paper); }
.tag .bub { max-width: 200px; font-size: 12.5px; font-weight: 800; line-height: 1.3; color: var(--ink); background: #fff; padding: 7px 11px; border-radius: 14px; border: 2.5px solid var(--ink); box-shadow: var(--hard-sm); position: relative; opacity: 0; transform: translateY(8px) scale(.7) rotate(-3deg); transition: opacity .2s, transform .35s cubic-bezier(.2, 1.7, .4, 1); text-align: center; }
.tag .bub::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; background: #fff; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateX(-50%) rotate(45deg); border-bottom-right-radius: 3px; }
.tag .bub.show { opacity: 1; transform: none; }
.tag.anchor .nm { font-family: var(--mono); font-size: 12px; }
.tag.anchor .nm::before { display: none; }
.tag.anchor.gold .nm { background: #fff1c2; color: #8a5d0a; }
.tag.anchor.bank .nm { background: #d4f5df; }
.tag.anchor.banker .nm { font-family: var(--display); font-weight: 400; background: var(--gold); letter-spacing: .5px; }
.tag.anchor.sale .nm { font-family: var(--display); font-weight: 400; font-size: 14px; background: var(--green); padding: 4px 12px; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-2deg); } }

/* floating numbers */
.pop { position: absolute; left: 0; top: 0; font-family: var(--display); font-size: 22px; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; white-space: nowrap; animation: popin 1.5s ease-out forwards; will-change: transform; }
.pop.good { color: var(--green); }
.pop.bad { color: var(--coral); }
.pop.gold { color: var(--gold); }
.pop.ink { color: #fff; }
.pop.big { font-size: 34px; }
@keyframes popin { 0% { opacity: 0; scale: .3; } 12% { opacity: 1; scale: 1.25; } 22% { scale: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- tile inspector */
.tile-card { position: fixed; z-index: 7; left: 318px; bottom: 116px; width: 252px; border-radius: 18px; overflow: hidden; animation: cardin .3s cubic-bezier(.2, 1.6, .4, 1); transform: rotate(-1deg); }
@keyframes cardin { from { transform: translateY(20px) rotate(4deg) scale(.9); opacity: 0; } }
.tile-card .band { height: 50px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; color: var(--ink); border-bottom: 2.5px solid var(--ink); letter-spacing: .5px; }
.tile-card .body { padding: 10px 14px 14px; font-size: 13px; }
.tile-card .row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1.5px dashed rgba(43, 33, 64, .15); }
.tile-card .row span:last-child { font-family: var(--mono); }
.tile-card .row.cur { color: var(--green-d); font-weight: 900; }
.tile-card .x { position: absolute; right: 8px; top: 10px; width: 28px; height: 28px; border-radius: 9px; background: var(--paper); border: 2px solid var(--ink); font-size: 13px; }
.tile-card .btn { width: 100%; margin-top: 10px; }

/* ---------- drawn card */
.card-pop { position: fixed; z-index: 8; left: 50%; top: 40%; width: 310px; padding: 22px 24px; border-radius: 20px; text-align: center; border: 3px solid var(--ink); box-shadow: 0 7px 0 var(--ink); animation: flip .55s cubic-bezier(.2, 1.5, .4, 1) forwards; pointer-events: none; transform: translate(-50%, -50%) rotate(-2deg); }
.card-pop.chance { background: #ffe3f1; }
.card-pop.chest { background: #e2f0ff; }
.card-pop small { font-family: var(--display); font-size: 16px; letter-spacing: 1.5px; color: var(--ink); }
.card-pop.chance small { color: #d6408a; }
.card-pop.chest small { color: #2f58c9; }
.card-pop p { font-size: 19px; font-weight: 900; margin: 10px 0 6px; line-height: 1.3; }
.card-pop em { font-style: normal; font-size: 12px; color: var(--ink-2); }
@keyframes flip { from { transform: translate(-50%, -30%) rotateX(80deg) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) rotate(-2deg); opacity: 1; } }

/* ---------- toasts */
.toasts { position: fixed; z-index: 9; top: 146px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { max-width: 470px; padding: 9px 16px; border-radius: 14px; background: var(--ink); color: var(--paper); font-size: 14px; border: 2.5px solid var(--ink); box-shadow: 0 4px 0 rgba(43, 33, 64, .35); animation: tin .4s cubic-bezier(.2, 1.6, .4, 1), fout .4s 4.6s forwards; text-align: center; }
.toast.bank { background: #fff1c2; color: var(--ink); box-shadow: var(--hard-sm); }
.toast b { font-family: var(--display); font-weight: 400; color: #a8740f; margin-right: 6px; letter-spacing: .5px; }
@keyframes tin { from { opacity: 0; transform: translateY(-12px) scale(.9); } }
@keyframes fout { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- modal */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(43, 33, 64, .4); display: grid; place-items: center; padding: 16px; }
.sheet { position: relative; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; border-radius: 24px; padding: 26px 28px; box-shadow: 0 7px 0 var(--ink); animation: cardin .35s cubic-bezier(.2, 1.6, .4, 1); }
.sheet h2 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 32px; }
.sheet .x { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; background: #fff; border: 2px solid var(--ink); box-shadow: var(--hard-sm); }
.steps { padding-left: 22px; line-height: 1.5; font-weight: 600; }
.steps li { margin-bottom: 10px; }
.steps li::marker { font-family: var(--display); color: var(--green-d); }
.steps b { font-weight: 900; }

/* ---------- leaderboard rows */
.panel h3 .h-sub { font-family: var(--body); font-size: 11px; font-weight: 800; color: var(--ink-2); letter-spacing: .3px; margin-left: 4px; }
.pl.lb { grid-template-columns: 30px 34px 1fr auto; grid-template-areas: 'rank av nm fees' 'stats stats stats stats' 'props props props props'; gap: 3px 8px; padding: 9px 10px 8px; }
.pl.lb .rank { grid-area: rank; font-family: var(--display); font-size: 14px; color: var(--ink-2); text-align: center; }
.pl.lb.top1 .rank { color: #c98a00; font-size: 16px; }
.pl.lb.top2 .rank { color: #8c93a8; }
.pl.lb.top3 .rank { color: #b0703f; }
.pl.lb.top1 { background: #fffbe8; }
.pl.lb .av { grid-area: av; grid-row: auto; }
.pl.lb .nm { grid-area: nm; margin-top: 6px; }
.pl.lb .fees { grid-area: fees; text-align: right; margin-top: 6px; }
.pl.lb .fees b { display: block; font-family: var(--mono); font-size: 14px; color: var(--green-d); }
.pl.lb .fees small { font-size: 9.5px; color: var(--ink-2); font-weight: 800; }
.pl.lb .stats-line { grid-area: stats; display: flex; gap: 5px; flex-wrap: wrap; }
.pl.lb .stats-line span { font-size: 10.5px; font-weight: 900; padding: 1px 7px; border-radius: 7px; background: var(--paper-2); border: 1.5px solid rgba(43, 33, 64, .25); }
.pl.lb .props { grid-area: props; display: flex; gap: 4px; flex-wrap: wrap; }
.pl.lb .props .none { font-size: 11px; color: var(--ink-2); font-weight: 700; }
.pl.lb .props .chip { font-size: 10px; font-weight: 900; padding: 1px 6px 1px 5px; border-radius: 6px; background: #fff; border: 1.5px solid var(--ink); border-left: 6px solid var(--gc); white-space: nowrap; }

/* ---------- character select */
.sheet.join { max-width: 520px; }
.join-top { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.join-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 110px; padding: 10px; background: #fffbe8; border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: var(--hard-sm); transform: rotate(-2deg); }
.join-preview .av.big svg { width: 76px; height: 76px; animation: bob 1.4s ease-in-out infinite; }
.join-preview b { font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .4px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-name { flex: 1; display: flex; flex-direction: column; gap: 6px; font-weight: 900; font-size: 13px; }
.join-name input { font: inherit; font-size: 18px; font-weight: 800; padding: 12px 14px; border-radius: 14px; border: 2.5px solid var(--ink); background: #fff; outline: none; color: var(--ink); text-transform: uppercase; }
.join-name input:focus { box-shadow: 0 0 0 4px rgba(95, 207, 136, .35); }
.sheet.join h4 { margin: 14px 0 8px; font-family: var(--display); font-weight: 400; font-size: 16px; letter-spacing: .4px; }
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.char { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 14px; background: #fff; border: 2.5px solid var(--ink); box-shadow: var(--hard-sm); font-size: 12px; font-weight: 900; transition: transform .12s; }
.char .av svg { width: 44px; height: 44px; }
.char:hover { transform: translateY(-2px) rotate(-2deg); }
.char.on { background: var(--green); transform: translateY(-3px) rotate(-2deg); }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 12px; border: 2.5px solid var(--ink); box-shadow: var(--hard-sm); transition: transform .12s; }
.swatch.on { transform: scale(1.15) rotate(-6deg); outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch:disabled { opacity: .25; cursor: not-allowed; box-shadow: none; }
.sheet.join #joinGo { width: 100%; margin-top: 18px; }

/* ---------- cartoon scenes */
.scene-pop { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; background: rgba(43, 33, 64, .45); padding: 16px; animation: fadein .25s; cursor: pointer; }
@keyframes fadein { from { opacity: 0; } }
.scene-card { width: min(460px, 100%); background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); overflow: hidden; text-align: center; animation: scenein .55s cubic-bezier(.2, 1.5, .4, 1); }
.scene-pop.mine .scene-card { width: min(560px, 100%); }
@keyframes scenein { from { transform: scale(.5) rotate(-8deg); opacity: 0; } }
.scene-art { display: block; width: 100%; height: auto; border-bottom: 3px solid var(--ink); }
.scene-card h3 { margin: 12px 14px 2px; font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: .5px; }
.scene-pop.jail h3 { color: #c23a34; }
.scene-pop.parking h3 { color: var(--green-d); }
.scene-card p { margin: 0 14px 14px; font-weight: 800; color: var(--ink-2); }
.sc-bars { animation: slam .55s .35s cubic-bezier(.5, 0, .7, 1.4) both; }
@keyframes slam { from { transform: translateY(-230px); } }
.sc-swing { transform-origin: 320px 0; animation: swing 1.6s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.sc-bob { animation: scbob 1.2s ease-in-out infinite; }
@keyframes scbob { 50% { transform: translateY(4px); } }
.sc-dance { animation: dance .5s ease-in-out infinite alternate; transform-origin: 150px 170px; }
@keyframes dance { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-8px); } }
.sc-drive { animation: drive 3.2s linear infinite; }
.sc-drive2 { animation: drive2 2.6s .4s linear infinite; }
@keyframes drive { from { transform: translateX(-100px); } to { transform: translateX(440px); } }
@keyframes drive2 { from { transform: translateX(440px) scaleX(-1); } to { transform: translateX(-100px) scaleX(-1); } }
.sc-coin { animation: coinfall 1.4s ease-in infinite; }
@keyframes coinfall { to { transform: translateY(270px) rotate(360deg); } }

/* ---------- creator fee pot */
.potbox { background: #fff1c2; border: 2px solid var(--ink); border-radius: 16px; padding: 10px 12px; box-shadow: var(--hard-sm); transform: rotate(-.6deg); }
.potbox .pot-big { font-family: var(--display); font-size: 26px; line-height: 1.1; color: var(--ink); }
.potbox .pot-big small { font-size: 15px; color: #a8740f; }
.potbox.on .pot-big span { color: var(--ink); }
.pot-live { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; color: var(--green-d); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.pot-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 1.5px solid var(--ink); animation: ping 1.6s infinite; }
.pot-link { display: inline-block; margin: 4px 0 6px; font-size: 12px; font-weight: 800; color: var(--ink); }
.pot-claims { display: flex; flex-direction: column; gap: 3px; }
.pot-claim { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--ink); text-decoration: none; padding: 3px 6px; border-radius: 7px; background: rgba(255, 255, 255, .6); }
.pot-claim:hover { background: #fff; }
.pot-claim span:first-child { color: var(--green-d); font-weight: 700; }
.potbox .muted { margin: 6px 0 0; font-size: 11.5px; line-height: 1.35; }

/* ---------- turn order + waiting line */
.pl .seat { position: absolute; right: 8px; top: -1px; font-size: 9px; font-weight: 900; letter-spacing: .6px; padding: 1px 6px; border-radius: 0 0 7px 7px; background: var(--paper-2); border: 1.5px solid var(--ink); border-top: 0; color: var(--ink-2); }
.pl .seat.now { background: var(--green); color: var(--ink); }
.pl .seat.next { background: var(--gold); color: var(--ink); }
.pl .cash { margin-top: 8px; }
.line-h { margin: 14px 4px 8px; font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .4px; }
.wl { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 12px; border: 2px dashed rgba(43, 33, 64, .3); margin-bottom: 5px; font-size: 13px; }
.wl b { font-family: var(--mono); color: var(--ink-2); width: 26px; }
.wl .av svg { width: 24px; height: 24px; }
.wl.me { border-style: solid; border-color: var(--ink); background: #fffbe8; }

/* ---------- thinking dots */
.tag .bub.dots { font-size: 0; padding: 9px 14px; }
.tag .bub.dots::before { content: ''; display: block; width: 34px; height: 8px; background: radial-gradient(circle, var(--ink) 3.5px, transparent 4px) 0 0 / 12px 8px repeat-x; animation: dots 1s steps(4) infinite; }
@keyframes dots { 0% { width: 10px; } 100% { width: 46px; } }

/* ---------- turn banner */
.banner { position: fixed; z-index: 10; left: 50%; top: 36%; display: flex; align-items: center; gap: 12px; padding: 10px 26px 10px 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); font-family: var(--display); font-size: 30px; letter-spacing: .5px; pointer-events: none; opacity: 0; transform: translate(-50%, -50%); white-space: nowrap; }
.banner::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: var(--pc); border-radius: 16px 0 0 16px; }
.banner .av svg { width: 44px; height: 44px; }
.banner.mine { background: var(--green); font-size: 40px; }
.banner.go { animation: banner 2s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes banner {
  0% { opacity: 0; transform: translate(-150%, -50%) rotate(-8deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) rotate(-2deg); }
  80% { opacity: 1; transform: translate(-50%, -50%) rotate(-2deg); }
  100% { opacity: 0; transform: translate(60%, -50%) rotate(4deg); }
}

/* ---------- mega chest line on cards */
.card-pop .mega { margin-top: 10px; padding: 6px 10px; border-radius: 10px; border: 2px dashed rgba(43, 33, 64, .35); font-size: 12px; font-weight: 800; color: var(--ink-2); }
.card-pop .mega.hit { border: 2.5px solid var(--ink); background: var(--gold); color: var(--ink); font-family: var(--display); font-size: 16px; animation: bump .6s 3; }

.mobile-tabs { display: none; }

@media (max-width: 520px) {
  .cam { bottom: 154px !important; }
  .sheet { padding: 20px 14px; overflow-x: hidden; }
  .sheet h2 { font-size: 26px; padding-right: 40px; }
  .join-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .join-preview { flex-direction: row; justify-content: center; gap: 10px; min-width: 0; transform: none; }
  .join-preview .av.big svg { width: 52px; height: 52px; }
  .join-name input { min-width: 0; width: 100%; }
  .char-grid { gap: 6px; }
  .char { padding: 6px 2px 4px; font-size: 11px; }
  .char .av svg { width: 36px; height: 36px; }
  .swatch { width: 32px; height: 32px; }
  .scene-card h3 { font-size: 22px; }
  .top nav .link[data-open] { font-size: 12px; }
}

@media (max-width: 1240px) {
  .panel { width: 250px; }
  .cam { right: 276px; }
  .tile-card { left: 276px; }
}
@media (max-width: 860px) {
  .top { left: 8px; right: 8px; top: 8px; height: 50px; gap: 8px; padding: 0 8px 0 10px; border-radius: 15px; }
  .logo { font-size: 19px; gap: 7px; }
  .pill-ico { width: 24px; height: 12px; }
  .top nav .link { padding: 6px 6px; font-size: 13px; }
  .top nav .link[href="thesis.html"], .live b { display: none; }
  .ca { max-width: 92px; padding: 6px 8px; font-size: 10px; margin-left: 0; }
  .buy { padding: 5px 10px; font-size: 14px; }
  .stats { top: 66px; left: 8px; right: 8px; transform: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; }
  .stat { min-width: 0; padding: 4px 3px; border-radius: 11px; }
  .stat small { font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat b { font-size: 12px; }
  .panel { display: none; top: 122px; left: 8px; right: 8px; width: auto; bottom: 156px; }
  .panel.open { display: block; }
  .mobile-tabs { position: fixed; z-index: 6; left: 8px; bottom: 116px; display: flex; gap: 6px; }
  .mobile-tabs button { padding: 6px 12px; border-radius: 11px; font-size: 13px; font-weight: 900; box-shadow: var(--hard-sm); }
  .mobile-tabs button.on { background: var(--ink); color: var(--paper); }
  .cam { right: 8px; bottom: 116px; flex-direction: row; }
  .cam button { padding: 6px 9px; font-size: 12px; }
  .dock { left: 8px; right: 8px; transform: none; bottom: 8px; flex-wrap: wrap; justify-content: center; min-height: 0; }
  .dock.mine { transform: translateY(-3px); }
  .dock input { width: 100%; flex: 1; min-width: 0; }
  .dock .msg { white-space: normal; text-align: center; font-size: 13px; }
  .builds { max-width: 100%; }
  .tile-card { left: 8px; bottom: 156px; }
  .tag .bub { max-width: 150px; font-size: 11px; }
  .banner { font-size: 21px; top: 30%; }
  .banner.mine { font-size: 28px; }
  .btn.go.big { font-size: 16px; padding: 12px 16px; }
  .pop { font-size: 18px; }
  .pop.big { font-size: 26px; }
}
