:root {
  --bg: #0a0912;
  --panel: #14121f;
  --panel-2: #1c192b;
  --line: #2d2942;
  --text: #f5ecdc;
  --muted: #a39db6;
  --gold: #ffc94d;
  --gold-deep: #f08a1c;
  --sauce: #e4492f;
  --basil: #7ccf63;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 var(--body);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .02em; }
[hidden] { display: none !important; }

#app { display: flex; flex-direction: column; min-height: 100%; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#logo {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; object-position: 45% 25%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 14px rgba(255, 201, 77, .45);
  background: #000;
}
.brand h1 { font-size: 22px; line-height: 1; color: var(--gold); }
#version { font-size: 11px; color: var(--muted); }
#ticker {
  flex: 1; margin: 0; min-width: 0;
  color: var(--muted); font-style: italic; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .4s;
}
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.chip {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--gold); }
.chip.icon-only { padding: 6px 10px; }
.chip.danger:hover { border-color: var(--sauce); color: var(--sauce); }
.chip.primary { background: var(--gold); border-color: var(--gold); color: #2a1a00; font-weight: 700; }
.chip.primary:hover { background: #ffd775; }
.chip:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- layout ---------- */
main {
  flex: 1; display: grid; min-height: 0;
  grid-template-columns: minmax(280px, 30%) 1fr minmax(280px, 340px);
}
@media (min-width: 901px) {
  body { overflow: hidden; }
  #app { height: 100vh; }
  .mid, .shop { overflow-y: auto; }
}

/* ---------- the stage ---------- */
.stage {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: 22px 12px 16px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 71%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 62%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 86%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 90%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 34%, #fff5 50%, transparent 51%),
    radial-gradient(ellipse at 50% 45%, #2a1840 0%, #100c1e 55%, #07060d 100%);
}
.count { text-align: center; position: relative; z-index: 3; text-shadow: 0 2px 8px #000; }
#balls { font: 400 clamp(30px, 3.4vw, 46px)/1.05 var(--display); color: #fff; }
.unit { font: 400 18px var(--display); color: var(--gold); letter-spacing: .06em; }
#mps { color: var(--muted); margin-top: 2px; }

.meat-wrap {
  position: relative; z-index: 2;
  width: min(280px, 70%, 36vh); aspect-ratio: 1;
  margin: auto 0;
  display: grid; place-items: center;
}
.corona, .rays { position: absolute; inset: -22%; border-radius: 50%; pointer-events: none; }
.corona {
  background: radial-gradient(circle, #fff 0 34%, #ffe9a8 40%, rgba(255, 190, 70, .55) 48%, rgba(240, 138, 28, .18) 60%, transparent 70%);
  animation: breathe 5s ease-in-out infinite;
}
.rays {
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 140, .22) 0 6deg, transparent 6deg 20deg);
  -webkit-mask: radial-gradient(circle, transparent 36%, #000 40%, transparent 70%);
  mask: radial-gradient(circle, transparent 36%, #000 40%, transparent 70%);
  animation: spin 70s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.05); opacity: .85; } }

#meatball {
  position: relative; width: 82%; aspect-ratio: 1;
  background: none; border: 0; padding: 0; border-radius: 50%;
  transition: transform .09s cubic-bezier(.3, 1.6, .5, 1);
  outline-offset: 6px;
}
#meatball img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 0 3px #000) drop-shadow(0 8px 14px rgba(0, 0, 0, .7));
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
#meatball:hover { transform: scale(1.04); }
#meatball.squish { transform: scale(.92); transition-duration: .04s; }

#buffs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 28px; position: relative; z-index: 3; }
.buff {
  font: 400 14px var(--display); letter-spacing: .04em;
  padding: 3px 12px; border-radius: 999px;
  background: var(--sauce); color: #fff;
  box-shadow: 0 0 14px rgba(228, 73, 47, .7);
}
.buff.mania { background: var(--gold); color: #2a1a00; box-shadow: 0 0 14px rgba(255, 201, 77, .7); }
#perClick { color: var(--muted); font-size: 13px; }

/* ---------- the sauce pot ---------- */
#pot {
  position: relative; z-index: 3; flex-shrink: 0;
  width: min(170px, 46%); margin-top: 8px; padding: 0;
  background: none; border: 0; border-radius: 16px;
  transition: transform .12s;
}
#pot:hover { transform: scale(1.04); }
#pot:active { transform: scale(.97); }
#pot svg { display: block; width: 100%; overflow: visible; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .6)); }
#pot .spoon { transform-box: fill-box; transform-origin: 50% 100%; transform: rotate(22deg); }
#pot.stirring .spoon { animation: stir 2s ease-in-out; }
@keyframes stir {
  0%, 100% { transform: translateX(0) rotate(22deg); }
  20% { transform: translateX(-36px) rotate(-20deg); }
  45% { transform: translateX(22px) rotate(30deg); }
  70% { transform: translateX(-30px) rotate(-14deg); }
}
#pot .bob { animation: bob 2.6s ease-in-out infinite; }
#pot .bob.b2 { animation-delay: -.9s; }
#pot .bob.b3 { animation-delay: -1.7s; }
@keyframes bob { 50% { transform: translateY(3px); } }
#pot.stirring .bobs { animation: swirl 2s ease-in-out; }
@keyframes swirl { 20% { transform: translateX(-14px); } 45% { transform: translateX(12px); } 70% { transform: translateX(-10px); } }
#pot .sauce { transform-box: fill-box; transform-origin: 50% 50%; }
#pot.plop .sauce { animation: plop .28s ease-out; }
@keyframes plop { 40% { transform: scale(1.05, 1.18); } }
#pot .steam path {
  fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 4; stroke-linecap: round;
  animation: steam 3.2s ease-in-out infinite;
}
#pot .steam path:nth-child(2) { animation-delay: -1.1s; }
#pot .steam path:nth-child(3) { animation-delay: -2.2s; }
@keyframes steam {
  0% { opacity: 0; transform: translateY(10px); }
  40% { opacity: .8; }
  100% { opacity: 0; transform: translateY(-14px); }
}
.fly { position: absolute; left: 0; top: 0; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .7)); will-change: transform; }
.splat { position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-radius: 50%; background: #e4492f; }

.flames {
  position: absolute; inset: 0; z-index: 0;
  background: url("../assets/cristo_pics/cristo-flames%20(1)%20(1).gif") center / cover;
  opacity: 0; transition: opacity .6s;
}
.stage.frenzy .flames { opacity: .38; }
.stage.frenzy .corona {
  background: radial-gradient(circle, #fff 0 34%, #ffd27a 40%, rgba(255, 110, 40, .7) 50%, rgba(228, 73, 47, .3) 62%, transparent 72%);
  animation-duration: .8s;
}
.stage.frenzy .rays { animation-duration: 8s; }

#peeker {
  position: absolute; left: 50%; bottom: 0; z-index: 1;
  width: 120px; height: 120px; object-fit: cover; object-position: 50% 0;
  transform: translate(-50%, 100%);
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1);
  pointer-events: none;
}
body.golden-active #peeker { transform: translate(-50%, -58%); }

/* mini meatballs that rise off the big one as it produces on its own */
#rain { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.riser {
  position: absolute; display: flex; align-items: center; gap: 4px;
  transform: translate(-50%, -50%);
  font: 400 15px var(--display); color: var(--gold); text-shadow: 0 1px 3px #000, 0 0 6px #000;
  white-space: nowrap; opacity: 0;
  animation: rise 1.7s ease-out both;
}
@keyframes rise {
  0% { transform: translate(-50%, -50%) scale(.5); opacity: 0; }
  18% { transform: translate(-50%, -80%) scale(1.08); opacity: 1; }
  70% { opacity: .9; }
  100% { transform: translate(-50%, -300%) scale(.9); opacity: 0; }
}

/* ---------- middle column ---------- */
.mid { min-width: 0; background: var(--bg); }
.tabs {
  display: flex; gap: 2px; padding: 8px 12px 0;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 4; background: var(--bg);
  overflow-x: auto; scrollbar-width: none;
}
.tabs button {
  background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 8px 12px; color: var(--muted);
  font: 400 16px var(--display); letter-spacing: .03em; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--gold); border-bottom-color: var(--gold); }
.badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px;
  background: var(--sauce); color: #fff; border-radius: 999px;
  font: 700 11px/18px var(--body); vertical-align: 2px;
}
.panel { padding: 14px 16px 28px; }
.sub { font-size: 15px; color: var(--muted); margin: 22px 0 8px; }
.note, .empty { color: var(--muted); margin: 0 0 12px; }

.icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; overflow: hidden;
  background: #0d0b16; border: 2px solid var(--line);
  font-size: 24px; line-height: 1;
}
.icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icon.t2 { border-color: #8a8f9c; }
.icon.t3 { border-color: var(--basil); }
.icon.t4 { border-color: #4fb7ff; }
.icon.t5 { border-color: #c77dff; }
.icon.t6 { border-color: var(--gold); box-shadow: 0 0 8px rgba(255, 201, 77, .5); }

.upg-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.sec-head h3 { font-size: 17px; }
.sec-head h3 span { color: var(--muted); }
.upg-list + .sec-head, .empty + .sec-head { margin-top: 22px; }
.upg {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 10px;
  transition: transform .1s, border-color .15s, opacity .15s;
}
.upg .info { flex: 1; min-width: 0; }
.upg .name { font-weight: 700; }
.upg .desc { color: var(--muted); font-size: 13px; }
.upg .cost { font: 400 15px var(--display); color: var(--basil); white-space: nowrap; }
.upg .right { text-align: right; flex-shrink: 0; }
.upg .eta { font-size: 11px; color: var(--muted); white-space: nowrap; }
.upg .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.upg .bar div { height: 100%; width: 0; background: var(--gold); transition: width .3s linear; }
.upg.ready { border-color: #3f6b33; background: linear-gradient(180deg, #17201a, var(--panel)); }
.upg.ready .eta { color: var(--basil); font-weight: 700; }
.upg.ready .bar div { background: var(--basil); }
.upg.cant .cost { color: var(--gold); }
.upg.cant .icon, .upg.cant .name, .upg.cant .desc { opacity: .7; }
.upg.ready:hover { border-color: var(--basil); transform: translateY(-1px); }
.upg.locked { border-style: dashed; cursor: default; }
.upg.locked .icon, .upg.locked .name, .upg.locked .desc, .upg.locked .cost { opacity: .5; }
.upg.locked .need { font-size: 12px; color: var(--gold); margin-top: 2px; }
.ach-progress { margin: 0 0 14px; max-width: 460px; }

.owned { display: flex; flex-wrap: wrap; gap: 6px; }
.owned .icon { width: 34px; height: 34px; font-size: 18px; border-radius: 8px; }

.ach-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ach {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
}
.ach .name { font-weight: 700; }
.ach .desc { color: var(--muted); font-size: 13px; }
.ach.locked { opacity: .45; }
.ach.locked .icon { filter: grayscale(1); }
.ach:not(.locked) { border-color: #5a4a1c; }

.board-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.board-head .note { margin: 0; }
table.board { width: 100%; border-collapse: collapse; }
.board th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; }
.board td { padding: 9px 8px; border-top: 1px solid var(--line); }
.board td.rank { font: 400 18px var(--display); width: 44px; color: var(--muted); }
.board tr:nth-child(1) td.rank { color: var(--gold); }
.board tr:nth-child(2) td.rank { color: #cfd3dc; }
.board tr:nth-child(3) td.rank { color: #d08a4e; }
.board td.num, .board th.num { text-align: right; font-variant-numeric: tabular-nums; }
.board tr.me td { background: rgba(255, 201, 77, .09); }
.board tr.me td.pname { color: var(--gold); font-weight: 700; }
.sad-state { text-align: center; color: var(--muted); padding: 30px 10px; }
.sad-state img { width: 64px; height: 64px; image-rendering: pixelated; display: block; margin: 0 auto 10px; }

.stats { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; max-width: 460px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }

.eclipse-card { max-width: 520px; text-align: center; margin: 0 auto; }
.eclipse-card img {
  width: 150px; height: 150px; border-radius: 50%; object-fit: cover; object-position: 45% 25%;
  border: 3px solid var(--gold); box-shadow: 0 0 40px rgba(255, 201, 77, .5);
}
.eclipse-card h2 { font-size: 26px; color: var(--gold); margin: 12px 0 6px; }
.eclipse-card p { color: var(--muted); margin: 6px 0; }
.eclipse-card .big { font: 400 22px var(--display); color: var(--text); }
.progress { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin: 12px 0 4px; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 999px; }

/* ---------- shop ---------- */
.shop { background: var(--panel); border-left: 1px solid var(--line); }
.shop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--panel); z-index: 4;
}
.shop-head h2 { font-size: 20px; color: var(--gold); }
.qty { display: flex; background: var(--bg); border-radius: 999px; padding: 2px; }
.qty button { background: none; border: 0; border-radius: 999px; padding: 3px 11px; color: var(--muted); font-weight: 700; font-size: 13px; }
.qty button.active { background: var(--gold); color: #2a1a00; }

.bld {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  transition: background .12s, opacity .15s;
}
.bld .icon { width: 50px; height: 50px; font-size: 28px; }
.bld .info { flex: 1; min-width: 0; }
.bld .name { font: 400 17px var(--display); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld .cost { font-weight: 700; color: var(--basil); font-size: 14px; }
.bld .each { color: var(--muted); font-size: 12px; }
.bld .owned-n { font: 400 28px var(--display); color: rgba(255, 255, 255, .28); min-width: 30px; text-align: right; }
.bld.cant { opacity: .5; }
.bld.cant .cost { color: var(--sauce); }
.bld:not(.cant):hover { background: var(--panel-2); }
.bld.mystery { opacity: .35; pointer-events: none; }
.bld.mystery .icon > * { filter: brightness(0); }
.bld.bought { animation: bought .25s; }
@keyframes bought { 40% { background: rgba(124, 207, 99, .22); } }
.shake { animation: shake .25s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- always-on leaderboard strip ---------- */
#liveBoard {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  height: 46px; padding: 0 14px; z-index: 40;
  background: var(--panel); border-top: 1px solid var(--line);
}
.live-label { display: flex; align-items: center; gap: 7px; font: 400 15px var(--display); color: var(--gold); letter-spacing: .04em; flex-shrink: 0; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--basil); box-shadow: 0 0 8px var(--basil); animation: livePulse 2s ease-in-out infinite; }
.live-dot.off { background: var(--muted); box-shadow: none; animation: none; }
@keyframes livePulse { 50% { opacity: .35; } }
.live-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; align-items: center; }
.live-list::-webkit-scrollbar { display: none; }
.live-chip {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 8px;
}
.live-chip.me { border-color: var(--gold); background: rgba(255, 201, 77, .12); }
.live-rank { font: 400 14px var(--display); color: var(--muted); min-width: 20px; text-align: center; }
.live-name { font-weight: 700; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-score { color: var(--basil); font-variant-numeric: tabular-nums; font-weight: 600; }
.live-empty { color: var(--muted); font-size: 13px; }

/* ---------- effects ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.floater {
  position: absolute; transform: translate(-50%, -50%);
  font: 400 22px var(--display); color: #fff; text-shadow: 0 2px 4px #000, 0 0 8px #000;
  animation: floatUp 1s ease-out forwards; white-space: nowrap;
}
.floater.big { font-size: 30px; color: var(--gold); }
.ring {
  position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255, 220, 140, .9);
  transform: translate(-50%, -50%);
  animation: ring .45s ease-out forwards;
}
@keyframes ring { to { transform: translate(-50%, -50%) scale(3.4); opacity: 0; border-width: 1px; } }
@keyframes floatUp { to { transform: translate(-50%, -160%); opacity: 0; } }

#golden {
  position: absolute; width: 84px; height: 84px; padding: 0; border: 0; background: none;
  pointer-events: auto; border-radius: 50%;
  animation: goldenIn .5s ease-out, wobble 2.4s ease-in-out infinite .5s;
}
#golden img {
  width: 100%; height: 100%; object-fit: contain; pointer-events: none;
  filter: sepia(1) saturate(4) hue-rotate(-12deg) brightness(1.35) drop-shadow(0 0 10px #ffd34d) drop-shadow(0 0 24px #ffb300);
}
#golden.leaving { transition: opacity 3s; opacity: 0; }
@keyframes goldenIn { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.1); } }

.popface { position: absolute; width: 150px; transform: translate(-50%, -50%); animation: popface 1.4s ease-out forwards; }
@keyframes popface {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { transform: translate(-50%, -70%) scale(1); opacity: 0; }
}
.flash { position: absolute; inset: 0; background: #fff; animation: flash 1.6s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 62px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--gold); border-radius: 12px; padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  animation: toastIn .3s ease-out, toastOut .4s ease-in forwards 4s;
}
.toast img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.toast .emoji { font-size: 28px; }
.toast .t { font-weight: 700; }
.toast .x { color: var(--muted); font-size: 13px; }
@keyframes toastIn { from { transform: translateX(-30px); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(-30px); opacity: 0; } }

#modal { position: fixed; inset: 0; z-index: 80; background: rgba(4, 3, 10, .78); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 20px 60px #000; }
.modal-card h2 { font-size: 24px; color: var(--gold); margin-bottom: 10px; }
.modal-card p { margin: 8px 0; color: var(--muted); }
.modal-card .hero { display: block; width: 110px; height: 110px; object-fit: contain; margin: 0 auto 10px; }
.modal-card input, .modal-card textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; margin-top: 6px;
}
.modal-card textarea { height: 110px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
.modal-card input:focus, .modal-card textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.err { color: var(--sauce) !important; min-height: 1.4em; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  .stage { border-right: 0; border-bottom: 1px solid var(--line); min-height: 560px; }
  .meat-wrap { width: min(240px, 60%); margin: 34px 0; }
  .shop { border-left: 0; border-bottom: 1px solid var(--line); }
  .shop-head, .tabs { position: static; }
  #ticker { display: none; }
  .top { justify-content: space-between; padding: 8px 12px; }
  .brand h1 { font-size: 18px; }
  #toasts { left: 12px; right: 12px; bottom: 60px; transform: none; }
  #liveBoard { position: sticky; bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rays, .corona, #golden { animation: none; }
}

@media (max-width: 900px) {
  .shop { order: 2; }
  .mid { order: 3; }
}
