:root {
  --ink: #3b2a1a;
  --cream: #fff6e6;
  --sun: #ffd43b;
  --pink: #ff8fb1;
  --sky: #a8ddf5;
  --grass: #7ec850;
  --btn: #ffffff;
  --shadow: 0 6px 0 rgba(59, 42, 26, 0.25);
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--sky);
  font-family: var(--font); color: var(--ink);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none; overscroll-behavior: none;
}
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- buttons */
button {
  font-family: inherit; color: var(--ink); cursor: pointer; border: none;
  background: var(--btn); border-radius: 22px; box-shadow: var(--shadow);
  font-weight: 800; font-size: 20px; padding: 12px 20px;
  transition: transform 0.08s ease; touch-action: manipulation;
}
button:active, button.pressed { transform: translateY(4px); box-shadow: 0 2px 0 rgba(59, 42, 26, 0.25); }
button:disabled { opacity: 0.45; }
button:focus-visible { outline: 4px solid #4dabf7; outline-offset: 2px; }
.big { font-size: 34px; padding: 16px 34px; border-radius: 28px; }
.huge { font-size: 46px; padding: 18px 48px; border-radius: 34px; background: var(--sun); }
.round { width: 64px; height: 64px; padding: 0; border-radius: 50%; font-size: 30px; display: grid; place-items: center; }
.small { font-size: 15px; padding: 8px 14px; border-radius: 14px; }
.name-preview { font-size: 34px; font-weight: 900; text-align: center; }
.name-part { display: flex; align-items: center; justify-content: center; gap: 12px; }
.name-part > div { min-width: 170px; text-align: center; }
.name-part b { display: block; font-size: 26px; }
/* Costume colour picker: looks like a round button, the native colour input covers it invisibly. */
.color-pick { position: relative; cursor: pointer; background: var(--btn); box-shadow: var(--shadow); color: var(--ink); }
.color-pick:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(59, 42, 26, 0.25); }
.color-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.lbl { display: block; font-size: 13px; font-weight: 800; opacity: 0.75; margin-top: 2px; }

/* ---------------------------------------------------------------- HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud button, #hud .clickable { pointer-events: auto; }
.top { position: absolute; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); display: flex; gap: 10px; align-items: flex-start; }
.chip {
  background: rgba(255, 255, 255, 0.92); border-radius: 18px; padding: 6px 12px; font-weight: 900; font-size: 20px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
/* 🔮 Ghoul Crystal icon (ui/crystalIcon.js), glowing like the pickup */
.gc-icon { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; filter: drop-shadow(0 0 3px rgba(176, 92, 255, 0.85)); }
.meter { min-width: 150px; }
.bar { flex: 1; height: 14px; background: #e9dcc5; border-radius: 8px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; width: 100%; background: linear-gradient(#ffe066, #f5b82e); border-radius: 8px; transition: width 0.2s; }
.bar.danger i { background: linear-gradient(#ff8a8a, #e85050); }
/* ❤️ keeper health: pink-red, flashes when you're low, wiggles when you get bumped */
#hud-hp { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 50px); left: max(10px, env(safe-area-inset-left)); min-width: 150px; }
.bar.hp i { background: linear-gradient(#ff8fa3, #e8445f); }
.bar.hp.danger i { animation: hp-flash 0.6s ease-in-out infinite alternate; }
@keyframes hp-flash { to { opacity: 0.45; } }
#hud-hp.armored .bar.hp i { background: linear-gradient(#ffa8d0, #d6409f); box-shadow: inset 0 0 0 2px #b9a6ff; }
#hud-hp.hurt { animation: hp-hurt 0.3s; }
@keyframes hp-hurt { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.spacer { flex: 1; }
#bossbar { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); width: min(440px, 60vw); }
#bossbar .bar { height: 18px; }
#bossbar .bar i { background: linear-gradient(#9ff8ff, #36c6e0); }

.bottom-right { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.types { display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: 12px 8px; max-width: min(92vw, 640px); }
.type-btn { position: relative; width: 70px; height: 70px; padding: 0; border-radius: 20px; background: rgba(255, 255, 255, 0.92); }
.type-btn img { width: 62px; height: 62px; pointer-events: none; }
.type-btn .count { position: absolute; right: -6px; top: -8px; background: var(--ink); color: white; border-radius: 12px; font-size: 15px; padding: 2px 7px; }
.type-btn.sel { background: var(--sun); outline: 4px solid #fff; }
.type-btn.empty { opacity: 0.4; }
.type-btn .gen, .ham-gen { position: absolute; left: -6px; top: -8px; background: linear-gradient(135deg, #ffd43b, #cc5de8); color: white; border-radius: 12px; font-size: 13px; font-weight: 900; padding: 2px 7px; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.ham-gen { left: auto; right: 4px; top: 26px; font-size: 12px; padding: 0 6px; }
.ham-pat { font-size: 11px !important; opacity: 0.75; }
.ham-bonus { font-size: 14px; line-height: 1.1; }
.ham-bonus i { font-style: normal; }
.ham-tile.glow { box-shadow: 0 0 12px 2px rgba(255, 212, 59, 0.75); }
.actions { display: flex; gap: 10px; align-items: flex-end; }
.act { width: 84px; height: 84px; border-radius: 50%; font-size: 40px; padding: 0; position: relative; display: grid; place-items: center; }
.act .cd { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(rgba(59, 42, 26, 0.55) var(--p, 0%), transparent 0); pointer-events: none; }
#btn-yeet { background: var(--pink); width: 96px; height: 96px; font-size: 46px; }
#btn-action { background: #b2f2bb; }
#btn-cannon { background: #ffd8a8; }
.boosts { position: absolute; left: max(12px, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.boost-btn { position: relative; width: 64px; height: 64px; padding: 0; border-radius: 20px; font-size: 32px; background: rgba(255, 255, 255, 0.92); display: grid; place-items: center; }
.boost-btn .count { position: absolute; right: -6px; top: -8px; background: var(--ink); color: white; border-radius: 12px; font-size: 15px; padding: 2px 7px; }
.boost-btn .cd { position: absolute; inset: 0; border-radius: 20px; background: conic-gradient(rgba(59, 42, 26, 0.45) var(--p, 0%), transparent 0); pointer-events: none; }
.boost-btn.on { background: #a5d8ff; outline: 4px solid #fff; animation: ping 1.2s ease-in-out infinite; }
.emotes { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.emotes button { font-size: 26px; padding: 6px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.9); }
#hint {
  position: absolute; left: 50%; top: 78px; transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95); border-radius: 20px; padding: 8px 18px; font-size: 22px; font-weight: 900; box-shadow: var(--shadow);
  animation: bob 1.4s ease-in-out infinite; white-space: nowrap;
  display: flex; align-items: center; gap: 12px;
}
#hint-skip { font-size: 15px; padding: 4px 10px; border-radius: 12px; background: var(--cream); box-shadow: none; }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-5px); } }
#toasts { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast { font-size: 54px; font-weight: 900; background: rgba(255, 255, 255, 0.95); border-radius: 26px; padding: 8px 26px; box-shadow: var(--shadow); animation: pop 2.2s ease forwards; white-space: nowrap; }
.toast.small { font-size: 30px; }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 12% { transform: scale(1.12); opacity: 1; } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

#joystick { position: fixed; left: 0; top: 0; width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); border: 4px solid rgba(255, 255, 255, 0.7); display: none; pointer-events: none; z-index: 6; }
#joyknob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow); }
.touch-hint { position: absolute; bottom: 18px; left: 18px; font-size: 40px; opacity: 0.5; }
body:not(.touch) .touch-only { display: none !important; }
body.touch .desktop-only { display: none !important; }

/* ---------------------------------------------------------------- overlay labels */
#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
#overlay > div { position: absolute; left: 0; top: 0; will-change: transform; }
.word { font-weight: 900; font-size: 30px; -webkit-text-stroke: 2px #3b2a1a; paint-order: stroke fill; text-shadow: 0 3px 0 #3b2a1a; white-space: nowrap; letter-spacing: 1px; }
.word.big { font-size: 42px; }
.nametag { color: white; font-weight: 900; font-size: 14px; padding: 2px 10px; border-radius: 10px; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }
.emote-bubble { background: white; border-radius: 16px; padding: 4px 12px; font-size: 24px; font-weight: 900; box-shadow: var(--shadow); white-space: nowrap; }
.trust { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(#ff6b9a var(--p, 0%), rgba(255, 255, 255, 0.85) 0); display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); }
.trust span { background: white; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.trust.nest { width: 54px; height: 54px; }
.tame-hint { font-size: 26px; animation: bob2 1s ease-in-out infinite; }
@keyframes bob2 { 50% { margin-top: -6px; } }
.hpbar { width: 70px; height: 10px; background: rgba(0, 0, 0, 0.35); border-radius: 6px; overflow: hidden; border: 2px solid white; }
.hpbar i { display: block; height: 100%; background: #ff6b6b; }
.hpbar.pile { width: 80px; height: 12px; }
.objective { font-size: 30px; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow); }
.objective b { position: absolute; font-size: 22px; color: #ff6b6b; transform-origin: center; left: 50%; top: 50%; margin: -14px 0 0 -10px; translate: 34px 0; }

/* ---------------------------------------------------------------- menus */
#menus { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  pointer-events: auto; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
/* 🔄🤖 reset robo-rats: a small button in the pause card's top-right corner (tap twice) */
.pause-card { position: relative; }
.reset-rats { position: absolute; top: 12px; right: 14px; font-size: 22px; padding: 6px 10px; border-radius: 18px; background: #fff; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.reset-rats .lbl { font-size: 11px; margin-top: 0; }
.reset-rats.armed { background: #ffc9c9; }
.screen.dim { background: rgba(59, 42, 26, 0.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.card { background: var(--cream); border-radius: 30px; padding: 22px 28px; box-shadow: 0 10px 0 rgba(59, 42, 26, 0.25); display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 94vw; max-height: 92vh; overflow-y: auto; overflow-x: hidden; }
.row { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.logo { font-size: clamp(44px, 9vw, 96px); font-weight: 900; color: white; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink); letter-spacing: 2px; text-align: center; line-height: 1; transform: rotate(-3deg); }
.logo small { display: block; font-size: 0.4em; color: var(--sun); }
.title-corner { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); }
.title-corner-r { position: absolute; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); }
.namecard { display: flex; align-items: center; gap: 10px; background: white; border-radius: 20px; padding: 8px 14px; box-shadow: var(--shadow); font-weight: 900; font-size: 22px; }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 2px var(--ink); }
.code { font-size: clamp(44px, 9vw, 72px); letter-spacing: 8px; background: white; border-radius: 22px; padding: 6px 18px; box-shadow: var(--shadow); }
.slots { display: flex; gap: 10px; }
.slot { width: 72px; height: 72px; border-radius: 18px; background: white; box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.1); display: grid; place-items: center; font-size: 44px; }
.grid { display: grid; grid-template-columns: repeat(6, 64px); gap: 10px; }
.grid button { width: 64px; height: 64px; padding: 0; font-size: 36px; border-radius: 18px; }
.players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.players .namecard { font-size: 18px; }
.reward-icon { font-size: 110px; line-height: 1; animation: spinpop 0.8s ease; }
.reward-icon img { width: 150px; height: 150px; }
@keyframes spinpop { 0% { transform: scale(0) rotate(-180deg); } 70% { transform: scale(1.2) rotate(10deg); } 100% { transform: scale(1); } }
.results { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.results .namecard { justify-content: space-between; }
.medal { font-size: 34px; }
.panel-intro { width: min(720px, 92vw); aspect-ratio: 16 / 9; background: white; border-radius: 26px; overflow: hidden; box-shadow: 0 10px 0 rgba(59, 42, 26, 0.25); }
.panel-intro svg { width: 100%; height: 100%; display: block; }
.tut-card { width: min(620px, 92vw); text-align: center; }
.tut-step { font-size: 16px; font-weight: 900; opacity: 0.6; }
.tut-pic { font-size: clamp(40px, 8vw, 72px); line-height: 1.1; white-space: nowrap; animation: spinpop 0.5s ease; }
.tut-title { font-size: clamp(24px, 4.5vw, 34px); font-weight: 900; }
.tut-how { font-size: 19px; background: white; border-radius: 16px; padding: 8px 16px; box-shadow: var(--shadow); }
.dots { display: flex; gap: 8px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); }
.dots i.on { background: white; }
.parent-text { max-width: 560px; font-size: 16px; line-height: 1.45; text-align: left; }
.hold { position: relative; overflow: hidden; }
.hold .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 212, 59, 0.6); pointer-events: none; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.seg button { font-size: 16px; padding: 8px 12px; }
.seg button.on { background: var(--sun); }
.setting { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.setting-title { font-weight: 900; font-size: 18px; }
.seg button { display: flex; flex-direction: column; align-items: center; min-width: 92px; }
.seg button .lbl { font-size: 11px; margin-top: 0; }
.card.wide { max-width: min(980px, 96vw); }
/* ✖ close button pinned to the top-right of long cards (menus.js → closeX); negative bottom margin so it doesn't push the title down */
.close-x { position: sticky; top: 0; z-index: 3; align-self: flex-end; flex-shrink: 0; width: 46px; height: 46px; padding: 0; margin: -14px -24px -60px 0; border-radius: 50%; font-size: 26px; line-height: 1; display: grid; place-items: center; }
.world-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.world-card {
  width: 160px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(var(--sky) 55%, var(--grass) 55%); border-radius: 22px; font-size: 20px;
}
.world-card .lbl { background: rgba(255, 255, 255, 0.85); border-radius: 8px; padding: 1px 6px; opacity: 1; }
.world-card b { background: rgba(255, 255, 255, 0.85); border-radius: 8px; padding: 1px 8px; }
.world-emoji { font-size: 48px; line-height: 1.1; }
.diff-btn { display: flex; flex-direction: column; align-items: center; min-width: 150px; font-size: 56px; }
.shop { display: flex; flex-direction: column; gap: 8px; width: min(560px, 86vw); }
.shop-row { display: flex; align-items: center; gap: 12px; background: white; border-radius: 18px; padding: 8px 12px; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.15); }
.shop-emoji { font-size: 36px; }
.shop-info { flex: 1; display: flex; flex-direction: column; text-align: left; }
.shop-info .lbl { margin-top: 0; }
.lvl { display: flex; gap: 4px; margin-top: 4px; }
.lvl i { width: 16px; height: 8px; border-radius: 4px; background: #e9dcc5; }
.lvl i.on { background: #f5b82e; }
.shop-info .stat { opacity: 0.9; color: #2b6cb0; }
.shop-info .lv { font-size: 13px; background: #f1e4cc; border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
.shop-head { font-size: 22px; font-weight: 900; text-align: left; margin-top: 6px; display: flex; align-items: baseline; gap: 10px; }
.shop-head .lbl { margin-top: 0; }
.tabs button { min-width: 120px; }
.buy.wear { background: #d0ebff; }
.wardrobe-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wardrobe-item { width: 104px; padding: 8px 4px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; }
.wardrobe-item.on { background: var(--sun); outline: 4px solid #fff; }
.custom-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.6); }
.custom-row > b { font-size: 20px; min-width: 96px; text-align: left; }
.custom-preview { width: 34px; height: 54px; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.25); }
.custom-pick { position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.custom-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.custom-dot { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.25); }
.custom-pick:active .custom-dot { transform: translateY(3px); }
.hat-toggle.on { background: var(--sun); }
.hair-colors { gap: 10px; justify-content: center; }
.hair-dot { width: 46px; height: 46px; min-width: 0; padding: 0; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.25); }
.hair-dot.on { outline: 4px solid var(--sun); outline-offset: 2px; }
.outfit-swatch { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; border: 3px solid #fff; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.25); }
.buy { min-width: 86px; display: flex; flex-direction: column; align-items: center; background: #b2f2bb; }
/* 📦 hamster house & 🗺️ missions */
.ham-section { width: min(860px, 88vw); background: rgba(255, 255, 255, 0.6); border-radius: 20px; padding: 8px 12px; }
.ham-head { display: flex; align-items: baseline; gap: 10px; font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.ham-head .lbl { margin-left: auto; }
.ham-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: min(860px, 88vw); }
.ham-tile { position: relative; width: 92px; padding: 6px 4px 4px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; border: 3px solid var(--rar); font-size: 14px; }
.ham-tile img { width: 60px; height: 60px; }
.ham-tile .lbl { font-size: 12px; margin-top: 0; }
.ham-n { position: absolute; top: 2px; right: 6px; background: var(--ink); color: white; border-radius: 10px; padding: 0 7px; font-size: 15px; font-weight: 900; }
.ham-pow { position: absolute; top: 2px; left: 4px; font-size: 12px; font-weight: 900; }
.ham-stars { color: var(--rar); font-size: 12px; letter-spacing: -1px; text-shadow: 0 1px 0 rgba(59, 42, 26, 0.3); }
.releasing .ham-section { background: rgba(211, 249, 216, 0.75); }
.ham-bye { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 15px; background: rgba(43, 138, 62, 0.88); color: white; font-size: 13px; font-weight: 900; line-height: 1.2; text-align: center; }
/* 🐹 Army Organizer */
#btn-organizer { font-size: 18px; padding: 10px 16px; border-radius: 20px; background: var(--sun); white-space: nowrap; }
.org-slot { position: relative; touch-action: none; cursor: grab; }
.org-slot .ham-tile { pointer-events: none; }
.org-slot.dragging { opacity: 0.3; }
.org-place { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--sun); color: var(--ink); border-radius: 10px; padding: 0 8px; font-size: 14px; font-weight: 900; box-shadow: 0 2px 0 rgba(59, 42, 26, 0.25); }
.org-x { position: absolute; top: -8px; left: -8px; width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: 15px; display: grid; place-items: center; background: #ff8a8a; color: white; z-index: 1; }
.org-ghost { position: fixed; z-index: 1000; pointer-events: none; transform: scale(1.1) rotate(-4deg); filter: drop-shadow(0 8px 10px rgba(59, 42, 26, 0.35)); }
.org-ghost .org-x { display: none; }
.team-row { gap: 10px; }
.team-slot { width: 84px; height: 84px; padding: 0; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.team-slot img { width: 58px; height: 58px; }
.team-slot.empty { background: #efe3cc; font-size: 36px; font-weight: 900; color: #b8a585; box-shadow: inset 0 3px 0 rgba(59, 42, 26, 0.12); }
.chance { display: flex; align-items: center; gap: 10px; width: min(420px, 80vw); font-size: 18px; }
.chance .bar { height: 18px; }
.mission-away { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: center; max-width: 140px; }
.mission-away img { width: 36px; height: 36px; }
.mission-away .lbl { width: 100%; text-align: center; font-size: 15px; opacity: 1; }
.mission-away.big-pics { max-width: none; }
.mission-away.big-pics img { width: 80px; height: 80px; }
.ping { animation: ping 1.2s ease-in-out infinite; }
@keyframes ping { 50% { transform: scale(1.07); } }

#loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--sky); z-index: 50; font-size: 64px; }
#loading div { animation: bob2 0.8s ease-in-out infinite; text-align: center; }
#loading small { display: block; font-size: 18px; font-weight: 800; }

#rotate { position: fixed; inset: 0; z-index: 100; background: var(--sky); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 80px; text-align: center; }
#rotate .phone { display: inline-block; animation: rot 1.8s ease-in-out infinite; }
@keyframes rot { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }

@media (max-height: 460px) {
  .bottom-right { flex-direction: row; align-items: flex-end; }
  .type-btn { width: 56px; height: 56px; border-radius: 16px; }
  .type-btn img { width: 50px; height: 50px; }
  .act { width: 70px; height: 70px; font-size: 32px; }
  #btn-yeet { width: 80px; height: 80px; font-size: 38px; }
  .chip { font-size: 16px; padding: 4px 10px; }
  #hud-hp { top: calc(max(10px, env(safe-area-inset-top)) + 40px); }
  #btn-organizer { font-size: 15px; padding: 7px 12px; }
  .toast { font-size: 40px; }
  .big { font-size: 26px; padding: 12px 24px; }
  .huge { font-size: 34px; padding: 12px 34px; }
  .card { padding: 14px 18px; gap: 10px; }
  .grid { grid-template-columns: repeat(6, 52px); }
  .grid button { width: 52px; height: 52px; font-size: 30px; }
  .slot { width: 56px; height: 56px; font-size: 34px; }
  #hint { font-size: 17px; top: 60px; }
}
