/* Print Farm: the arcade idle HUD, from the approved mockup (mock.html, art/arcade-mock.png). */
:root {
  --font: "Arial Rounded MT Bold", ui-rounded, "Nunito", system-ui, sans-serif;
  --glass: rgba(34, 38, 46, 0.55);
  --edge: rgba(255, 255, 255, 0.25);
  --green: #43b05c;
  --green-dark: #2f8c46;
  --orange: #ff7a1a;
  --red: #ff3b3b;
  --ink: #2e3138;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #7cc46a; touch-action: none; }
body { font-family: var(--font); color: #fff; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#stage { position: fixed; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
canvas#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ol { text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 3px rgba(0, 0, 0, 0.55), 0 0 1px #000; }
[hidden] { display: none !important; }

/* ---- Top bar: settings, level and XP, money ---- */
.top { position: absolute; left: 0; right: 0; top: max(14px, env(safe-area-inset-top)); display: flex; align-items: center;
  justify-content: space-between; padding: 0 12px; pointer-events: none; }
.gear { width: 38px; height: 38px; border-radius: 12px; background: var(--glass); border: 1.5px solid var(--edge); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-family: inherit; padding: 0; pointer-events: auto; }
.lvl { display: flex; align-items: center; }
.star { width: 40px; height: 40px; display: grid; place-items: center; font-size: 19px; z-index: 1; margin-right: -10px; background: var(--orange);
  clip-path: polygon(50% 0, 63% 33%, 98% 36%, 71% 59%, 80% 95%, 50% 76%, 20% 95%, 29% 59%, 2% 36%, 37% 33%); transition: transform 0.15s; }
.star.bump { transform: scale(1.3); }
.xp { width: 112px; height: 18px; border-radius: 9px; background: var(--glass); border: 1.5px solid rgba(255, 255, 255, 0.3); overflow: hidden; position: relative; }
.xp i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--green); transition: width 0.25s; }
.xp span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 16px; }
.money { display: flex; align-items: center; gap: 7px; padding: 6px 13px 6px 8px; border-radius: 999px; background: var(--glass);
  border: 1.5px solid var(--edge); font-size: 22px; min-width: 76px; transition: transform 0.1s; }
.money.bump { transform: scale(1.08); }
.bill { width: 30px; height: 19px; border-radius: 4px; background: var(--green); box-shadow: inset 0 0 0 3px var(--green-dark); position: relative; flex: none; }
.bill::after { content: ""; position: absolute; left: 11px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--green-dark); }

/* ---- The goal line ---- */
.goal { position: absolute; left: 8px; right: 8px; top: calc(max(14px, env(safe-area-inset-top)) + 56px); text-align: center;
  font-size: 25px; line-height: 1.15; pointer-events: none; transition: opacity 0.2s; }
.goal.new { animation: goalIn 0.35s ease-out; }
@keyframes goalIn { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
#banner { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: 40px; pointer-events: none; opacity: 0; color: #ffd84a; }
#banner small { display: block; font-size: 20px; color: #fff; margin-top: 4px; }
#banner.on { animation: banner 1.8s ease-out; }
@keyframes banner { 0% { opacity: 0; transform: scale(0.6); } 12% { opacity: 1; transform: scale(1.12); } 22% { transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

/* ---- Labels over the world ---- */
#tags, #fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tag { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; }
.max { color: var(--red); font-size: 20px; font-weight: bold; letter-spacing: 0.5px; }
.warn { color: #fff; background: #e8423f; border: 2px solid #fff; border-radius: 12px; padding: 3px 9px; font-size: 15px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); animation: bob 0.6s ease-in-out infinite alternate; }
.bang { color: #fff; background: #f47a26; border: 3px solid #fff; border-radius: 50%; width: 30px; height: 30px; line-height: 25px;
  text-align: center; font-size: 22px; font-weight: bold; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); animation: bob 0.6s ease-in-out infinite alternate; }
.soon { color: #3a2a00; background: #f5c542; border: 2px solid #fff; border-radius: 12px; padding: 2px 8px; font-size: 13px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
@keyframes bob { to { transform: translate(-50%, calc(-100% - 5px)); } }
.order, .say { background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.order { padding: 5px 10px 5px 6px; display: flex; align-items: center; gap: 5px; font-size: 18px; }
.order svg { width: 30px; height: 22px; }
.say { padding: 7px 11px; font-size: 14px; width: max-content; max-width: 180px; white-space: normal; text-align: center; animation: sayIn 0.25s ease-out; }
.say b { display: block; font-size: 11px; color: #e8423f; margin-bottom: 2px; }
.order::after, .say::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -8px; margin-left: -8px; border: 8px solid transparent;
  border-bottom: 0; border-top-color: #fff; }
@keyframes sayIn { from { opacity: 0; margin-top: 8px; } to { opacity: 1; margin-top: 0; } }
.ring { width: 46px; height: 46px; transform: translate(-50%, -50%); }
.sign { color: #fff; font-size: 13px; background: rgba(34, 38, 46, 0.62); border-radius: 9px; padding: 3px 8px; }

/* ---- Flying stars and bills ---- */
.fly { position: absolute; left: 0; top: 0; will-change: transform; }
.fly.star { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.fly.cash { width: 22px; height: 14px; margin: -7px 0 0 -11px; border-radius: 3px; background: var(--green); box-shadow: inset 0 0 0 2px var(--green-dark); }

/* ---- The joystick: a ring and knob where the thumb lands ---- */
.stick { position: fixed; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12); pointer-events: none; opacity: 0; transition: opacity 0.12s; z-index: 5; }
.stick.on { opacity: 1; }
.stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); transform: translate(-50%, -50%); }

/* ---- Panels: they slide up over the lower half; play goes on above them ---- */
#sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; z-index: 6; pointer-events: none; }
#sheet .card { pointer-events: auto; width: 100%; max-width: 520px; max-height: 58vh; overflow: auto; background: #fffdf6; color: var(--ink);
  border-radius: 22px 22px 0 0; padding: 12px 12px max(14px, env(safe-area-inset-bottom)); box-shadow: 0 -6px 0 rgba(0, 0, 0, 0.08);
  animation: up 0.22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
#sheet .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#sheet h2 { font-size: 20px; margin: 4px 6px; }
#sheet .x { font: inherit; border: 0; background: #ece4d2; width: 34px; height: 34px; border-radius: 10px; font-size: 16px; color: var(--ink); }
.card .row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: #f3ecdc; margin-bottom: 8px; }
.row .icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 22px; background: #fff; }
.row .txt { flex: 1; min-width: 0; }
.row .name { font-size: 16px; }
.row .sub { font-size: 13px; color: #6b6556; margin-top: 2px; line-height: 1.3; }
.row .sub a { color: #d4581f; text-decoration: none; white-space: nowrap; }
.row .dots { display: flex; gap: 3px; margin-top: 5px; }
.row .dots i { width: 14px; height: 6px; border-radius: 3px; background: #ddd3bd; }
.row .dots i.on { background: var(--green); }
.row button, .big { font: inherit; font-size: 15px; border: 0; border-radius: 12px; padding: 9px 12px; background: var(--green); color: #fff;
  box-shadow: 0 3px 0 var(--green-dark); flex: none; display: flex; align-items: center; gap: 6px; }
.row button .bill { width: 22px; height: 14px; box-shadow: inset 0 0 0 2px var(--green-dark); background: #8fdc9f; }
.row button .bill::after { left: 8px; top: 4px; width: 6px; height: 6px; }
.row button:disabled { background: #cfc6b3; box-shadow: 0 3px 0 #b3aa96; }
.row button.maxed { background: #8b8577; box-shadow: 0 3px 0 #6c675b; }
.big { display: flex; justify-content: center; width: 100%; margin-top: 10px; padding: 13px; font-size: 17px; }
.big.alt { background: #8b8577; box-shadow: 0 3px 0 #6c675b; }
.lead { font-size: 15px; color: #5b5f69; margin: 2px 6px 10px; line-height: 1.4; }
.lead b { color: var(--ink); }

/* Stills: everything at rest. */
.still *, .still *::after { animation: none !important; transition: none !important; }
