:root {
  --font: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 22px;
}
body.theme-sky    { --bg1: #5aaef0; --bg2: #a8daf9; --ink: #16213d; --muted: #52607a; --card: rgba(255,255,255,.92); --card2: #fff; --accent: #0a8a85; --accent2: #2457d6; --line: rgba(22,33,61,.18); }
body.theme-cotton { --bg1: #ffd6ec; --bg2: #d7e6ff; --ink: #4a2a52; --muted: #8a6b92; --card: rgba(255,255,255,.78); --card2: #fff; --accent: #ff5fa8; --accent2: #8f7bff; --line: rgba(120,60,130,.12); }
body.theme-mint   { --bg1: #d8fbe9; --bg2: #fff6d6; --ink: #24514a; --muted: #5f8b83; --card: rgba(255,255,255,.8); --card2: #fff; --accent: #20b486; --accent2: #f5a524; --line: rgba(30,90,80,.12); }
body.theme-sunset { --bg1: #ffd3b0; --bg2: #ffb4d1; --ink: #5a2a3a; --muted: #9a6070; --card: rgba(255,255,255,.78); --card2: #fff; --accent: #ff6b6b; --accent2: #ff9f1c; --line: rgba(130,50,60,.14); }
body.theme-ocean  { --bg1: #b9ecff; --bg2: #c9c3ff; --ink: #26365e; --muted: #5d6e98; --card: rgba(255,255,255,.78); --card2: #fff; --accent: #3a86ff; --accent2: #b14cff; --line: rgba(40,60,120,.14); }
body.theme-night  { --bg1: #2c2366; --bg2: #5b3d8f; --ink: #fbefff; --muted: #c8b5e6; --card: rgba(40,28,90,.75); --card2: #3a2c7a; --accent: #ff7ad9; --accent2: #7ad7ff; --line: rgba(255,255,255,.12); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; }
/* iPhone Safari ignores user-scalable=no: no double-tap zoom anywhere (tapping is the whole game), and no text
   inflation when the phone turns. Pinch is blocked in main.js. */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
input, select, textarea { font-size: max(16px, 1em); } /* iPhone zooms into any text box smaller than 16px */
body {
  font-family: var(--font); color: var(--ink);
  background: linear-gradient(160deg, var(--bg1), var(--bg2)); background-attachment: fixed;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overflow: hidden;
}
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

#app {
  height: 100dvh; display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "hud" "stage" "panel";
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
@media (min-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr) 430px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "hud panel" "stage panel"; }
}

/* ---------- HUD ---------- */
#hud { grid-area: hud; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 0; }
.brand { height: 46px; width: auto; display: block; filter: drop-shadow(0 2px 2px #0001); }
.counter { text-align: center; line-height: 1.05; }
#squishCount { font-size: clamp(28px, 6vw, 44px); font-weight: 700; }
.counter .unit { font-size: 16px; color: var(--muted); font-weight: 600; }
#spsLabel { font-size: 14px; color: var(--muted); font-weight: 500; }
.net-pill { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: var(--card); white-space: nowrap; }
@media (max-width: 520px) { .brand { height: 38px; } #hud { padding: 8px 12px 0; } .net-pill { font-size: 11px; padding: 5px 8px; } }

/* ---------- Stage ---------- */
#stageWrap { grid-area: stage; position: relative; overflow: hidden; min-height: 0; }
#stage { width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.bg-bubbles i { position: absolute; bottom: -60px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.35); animation: rise 14s linear infinite; }
.bg-bubbles i:nth-child(1) { left: 8%; animation-delay: 0s; }
.bg-bubbles i:nth-child(2) { left: 24%; width: 22px; height: 22px; animation-delay: 4s; animation-duration: 11s; }
.bg-bubbles i:nth-child(3) { left: 45%; width: 60px; height: 60px; animation-delay: 7s; animation-duration: 18s; }
.bg-bubbles i:nth-child(4) { left: 66%; width: 28px; height: 28px; animation-delay: 2s; }
.bg-bubbles i:nth-child(5) { left: 82%; animation-delay: 9s; animation-duration: 16s; }
.bg-bubbles i:nth-child(6) { left: 93%; width: 18px; height: 18px; animation-delay: 5s; animation-duration: 10s; }
@keyframes rise { to { transform: translateY(-120vh) translateX(30px); opacity: 0; } }

.combo { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%) scale(.6); opacity: 0; font-weight: 700; font-size: 20px; color: #fff;
  background: linear-gradient(90deg, #ff8a3d, #f5b700); padding: 6px 14px; border-radius: 99px; transition: .2s; pointer-events: none; box-shadow: 0 4px 14px #ff8a3d55; white-space: nowrap; }
.combo.show { opacity: 1; transform: translateX(-50%) scale(1); }
.hold-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 14px; background: var(--card); padding: 8px 14px; border-radius: 99px; white-space: nowrap; transition: opacity .6s; pointer-events: none; }
.hold-hint.gone { opacity: 0; }
#buffs { display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.buff { display: flex; align-items: center; gap: 6px; background: var(--card); padding: 5px 10px; border-radius: 99px; font-size: 13px; animation: pulse 1.2s ease-in-out infinite; }

.buff small { color: var(--muted); }
@keyframes pulse { 50% { transform: scale(1.05); } }

#sparkleLayer, #emoteLayer { position: absolute; inset: 0; pointer-events: none; }
.sparkle { position: absolute; pointer-events: auto; width: 68px; height: 62px; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 35% 30%, #fffbe0, #ffd84d 55%, #ffad0d);
  box-shadow: 0 0 24px #ffd84dcc, 0 0 60px #ffcf3388; animation: bob 2.4s ease-in-out infinite, fadeLife linear forwards; display: grid; place-items: center; }
.sparkle .face { font-size: 15px; color: #6b3d00; font-weight: 700; }
.sparkle::before, .sparkle::after { content: '✦'; position: absolute; color: #fff; font-size: 18px; animation: twinkle 1s infinite alternate; }
.sparkle::before { top: -10px; left: -4px; } .sparkle::after { bottom: -6px; right: -6px; animation-delay: .5s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-6deg) scale(1); } 50% { transform: translateY(-14px) rotate(6deg) scale(1.08, .94); } }
@keyframes fadeLife { 0% { opacity: 0; } 5%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes twinkle { to { opacity: .2; transform: scale(.6); } }
.emote-float { position: absolute; bottom: 20px; display: flex; flex-direction: column; align-items: center; animation: floatUp 3.2s ease-out forwards; }
.emote-float .float-ic { width: 44px; height: 44px; }
.emote-float small { font-size: 11px; background: var(--card); padding: 2px 8px; border-radius: 99px; font-weight: 600; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.5); opacity: 0; } 15% { transform: translateY(-30px) scale(1.1); opacity: 1; } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }

/* ---------- Panel ---------- */
#panel { grid-area: panel; display: flex; flex-direction: column; min-height: 0; background: var(--card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -6px 30px rgba(20,35,60,.12); }
@media (min-width: 900px) { #panel { border-radius: var(--radius); margin: 12px; } }
#tabs { display: flex; padding: 6px 6px 0; gap: 2px; border-bottom: 1px solid var(--line); }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 12px; font-weight: 600; padding: 6px 2px 8px; border-radius: 14px 14px 0 0; color: var(--muted); position: relative; }
#tabs .tab-ic { width: 26px; height: 26px; transition: transform .2s; }
#tabs button.active { color: var(--ink); background: var(--card2); }
#tabs button.active .tab-ic { transform: scale(1.15) translateY(-1px); }
#tabs button.dot::after { content: ''; position: absolute; top: 6px; right: 22%; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
#tabBody { flex: 1; overflow-y: auto; padding: 10px 14px calc(16px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.tab-pane { display: none; } .tab-pane.show { display: block; }
.section-title { font-weight: 700; font-size: 16px; margin: 6px 2px 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.section-title small { font-weight: 500; color: var(--muted); font-size: 12px; }
.section-title.row { justify-content: space-between; align-items: center; margin-top: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 10px; text-align: center; background: var(--card2); border-radius: 16px; }

/* Shop */
.upgrade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.upg { background: var(--card2); border-radius: 16px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; opacity: .55; border: 2px solid transparent; transition: .15s; }
.upg .e { width: 34px; height: 34px; } .upg .c { font-size: 11px; font-weight: 600; }
.upg.can { opacity: 1; border-color: var(--accent); box-shadow: 0 3px 0 var(--accent); animation: wiggle 2.5s ease-in-out infinite; }
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-6deg); } 97% { transform: rotate(6deg); } }
.qty { display: flex; gap: 4px; }
.qty button { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--card2); color: var(--muted); }
.qty button.on { background: var(--accent2); color: #fff; }
.helper { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card2); border-radius: 18px; padding: 10px 12px; margin-bottom: 8px; opacity: .6; border-bottom: 4px solid var(--line); transition: transform .1s, opacity .2s; }
.helper.can { opacity: 1; }
.helper.can:active { transform: scale(.97); }
.helper.bump { animation: bump .3s; }
@keyframes bump { 40% { transform: scale(1.04); } }
.helper .he { width: 44px; height: 44px; flex: none; }
.helper .hi { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.helper .hi b { font-size: 15px; } .helper .hi small { font-size: 12px; color: var(--muted); }
.helper .hi small.rate { color: var(--accent2); font-weight: 600; }
.helper .hc { display: flex; flex-direction: column; align-items: flex-end; }
.helper .cost { font-weight: 700; font-size: 14px; } 
.helper .own { font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1; }
.helper.mystery { opacity: .45; }

/* Squishies */
.sq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.sq-card { background: var(--card2); border-radius: 18px; padding: 8px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 3px solid transparent; position: relative; }
.sq-card canvas { width: 88px; height: 88px; }
.sq-card b { font-size: 13px; text-align: center; }
.sq-card.active { border-color: var(--accent); box-shadow: 0 4px 0 var(--accent); }
.sq-card.locked b { color: var(--muted); }
.sq-card .perk { position: absolute; top: 6px; right: 6px; font-size: 11px; }
.perk { background: var(--accent2); color: #fff; font-weight: 700; padding: 2px 7px; border-radius: 99px; font-size: 12px; }
.lock { font-size: 11px; color: var(--muted); }
.lock.plus { color: var(--accent); font-weight: 700; }
.prog { width: 80%; height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent); }

/* Friends */
.me-card { display: flex; justify-content: space-between; align-items: center; background: var(--card2); border-radius: 18px; padding: 10px 14px; margin-bottom: 10px; }
.me-card small { display: block; color: var(--muted); font-size: 12px; } .me-card b { font-size: 17px; }
.party-card { background: linear-gradient(135deg, #eef7ff, #ecfbf6); color: #1f2a44; border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; }
.party-card .row { display: flex; justify-content: space-between; font-size: 14px; } .party-card .row span { font-size: 12px; color: #1a9b6c; font-weight: 600; }
.party-card small { color: #64748b; font-size: 12px; }
.bar { height: 16px; background: #fff; border-radius: 99px; overflow: hidden; margin: 8px 0 6px; box-shadow: inset 0 2px 4px rgba(0,0,0,.08); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #5eead4, #60a5fa); border-radius: 99px; transition: width .6s; }
.emotes { display: flex; flex-wrap: wrap; gap: 8px; }
.emotes button { background: var(--card2); border-radius: 16px; width: 52px; height: 52px; display: grid; place-items: center; transition: transform .1s; }
.emotes .ic { width: 32px; height: 32px; }
.emotes button:active { transform: scale(.85); }
.board { list-style: none; padding: 0; margin: 0; }
.board li { display: flex; align-items: center; gap: 10px; background: var(--card2); border-radius: 14px; padding: 8px 12px; margin-bottom: 6px; font-size: 14px; }
.board li.me { outline: 3px solid var(--accent); }
.board .rk { width: 28px; text-align: center; font-weight: 700; font-size: 16px; }
.board .nm { flex: 1; font-weight: 600; } .board .sc { font-weight: 700; color: var(--accent2); }

/* Stickers */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sticker { background: var(--card2); border-radius: 16px; padding: 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; opacity: .5; }
.sticker .st-ic { width: 40px; height: 40px; margin: 0 auto; filter: grayscale(1); }
.sticker b { font-size: 12px; } .sticker small { font-size: 10px; color: var(--muted); }
.sticker.got { opacity: 1; } .sticker.got .st-ic { filter: none; animation: pop .4s; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } }

/* Settings */
.card { background: var(--card2); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; }
.card p { font-size: 14px; margin: 6px 0; }
.rebirth { background: linear-gradient(135deg, #fff7d6, #e8f4ff); color: #5a3a2a; }
.plus-card { background: linear-gradient(135deg, #e7efff, #e2f8f1); color: #1f2a44; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 15px; font-weight: 500; cursor: pointer; }
.toggle input { display: none; }
.toggle i { width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; transition: .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px #0003; transition: .2s; }
.toggle input:checked + i { background: var(--accent); } .toggle input:checked + i::after { left: 23px; }
.slider-row { display: flex; align-items: center; gap: 12px; padding: 4px 0 10px 30px; font-size: 14px; color: var(--muted, #777); }
.slider-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); height: 28px; }
.themes { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.themes button { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px #0002; font-size: 14px; }
.themes button.on { outline: 3px solid var(--accent); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fine { font-size: 12px; color: var(--muted); text-align: center; }

.btn { background: var(--card2); border: 2px solid var(--line); border-radius: 99px; padding: 10px 18px; font-weight: 700; font-size: 15px; box-shadow: 0 3px 0 var(--line); transition: transform .1s; }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 70%, #000); }
.btn.danger { background: #ff5f6d; color: #fff; border-color: transparent; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; }

/* Toasts */
#toasts { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(92vw, 380px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: #fff; color: #1f2a44; padding: 10px 14px; border-radius: 18px; box-shadow: 0 8px 24px rgba(20,35,60,.2); font-size: 14px; animation: toastIn .35s cubic-bezier(.2,1.6,.4,1); transition: .4s; }
.toast .big { width: 36px; height: 36px; flex: none; }
.toast.gold { background: linear-gradient(135deg, #fffbe6, #fff0c2); }
.toast.party { background: linear-gradient(135deg, #e0f2fe, #dcfce7); }
.toast.out { opacity: 0; transform: translateY(-20px); }
@keyframes toastIn { from { transform: translateY(-30px) scale(.8); opacity: 0; } }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(15,25,45,.4); display: grid; place-items: center; z-index: 60; padding: 16px; backdrop-filter: blur(4px); }
.modal.hidden { display: none; }
.modal-card { background: #fff; color: #1f2a44; border-radius: 28px; padding: 20px; width: min(100%, 400px); text-align: center; box-shadow: 0 20px 60px rgba(15,25,45,.3); animation: modalIn .4s cubic-bezier(.2,1.5,.4,1); max-height: 90dvh; overflow-y: auto; }
@keyframes modalIn { from { transform: scale(.7); opacity: 0; } }
.modal-card h2 { margin: 0 0 8px; font-size: 24px; }
.modal-body p { margin: 8px 0; }
.modal-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.modal-thumb { width: 160px; height: 160px; }
.bigline { font-size: 26px; font-weight: 700; color: var(--accent); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { display: flex; flex-direction: column; align-items: center; background: #f1f5f9; border-radius: 12px; padding: 6px 0; }
.day .day-ic { width: 26px; height: 26px; }
.day small { font-size: 10px; color: #64748b; }
.day.past { opacity: .45; } .day.today { background: #ddf4f1; outline: 3px solid var(--accent); animation: pulse 1s infinite; }
.plus-list { text-align: left; padding-left: 4px; list-style: none; font-size: 14px; } .plus-list li { margin: 6px 0; }
.gate { background: #f1f5f9; border-radius: 16px; padding: 10px; }
.gate input, .code { font-family: inherit; font-size: 18px; padding: 10px; border-radius: 12px; border: 2px solid #d6dee8; width: 100%; text-align: center; user-select: text; -webkit-user-select: text; }
.code { font-size: 12px; height: 120px; text-align: left; }

/* ---------- Icons (PNG slots, placeholder tile until art exists) ---------- */
.ic { display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; vertical-align: -0.25em; position: relative; flex: none; }
.ic img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ic.ph { border-radius: 28%; background: color-mix(in srgb, var(--accent2) 22%, #fff); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent2) 35%, transparent); }
.ic.ph::after { content: attr(data-l); font-weight: 700; font-size: max(9px, 45%); color: color-mix(in srgb, var(--accent2) 80%, #000); line-height: 1; }
.ic.ph:has(.ic-badge)::after { font-size: 40%; }
.ic.sm { width: 18px; height: 18px; }
.ic.cost-ic { width: 16px; height: 16px; margin-right: 3px; }
.ic-badge { position: absolute; right: -6px; bottom: -4px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 10px/16px var(--font); font-style: normal; text-align: center; padding: 0 3px; }
.count-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cur-ic { width: clamp(26px, 5vw, 38px); height: clamp(26px, 5vw, 38px); }
.net-pill { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink, #2a2340); cursor: pointer; }
.net-pill .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #a9b0bd; }
.net-pill.online .dot { background: #22b07d; box-shadow: 0 0 0 3px rgba(34,176,125,.2); }
.net-pill.connecting .dot { background: #f2b33d; }
.net-pill:active { transform: translateY(2px); }
.buff .ic { width: 20px; height: 20px; }
.modal-ic { width: 56px; height: 56px; margin-bottom: 4px; }
.section-title .ic { width: 20px; height: 20px; }

/* ---------- Loading scene: game first, studio lockup bottom-centre ---------- */
#splash { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: linear-gradient(160deg, var(--bg1), var(--bg2)); padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); transition: opacity .45s; }
#splash.gone { opacity: 0; pointer-events: none; }
.splash-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.splash-logo { font-weight: 700; font-size: clamp(44px, 12vw, 76px); color: var(--accent); letter-spacing: -1px; text-shadow: 0 4px 0 #fff9; }
.splash-logo b { color: var(--accent2); }
#splashSquishy { width: min(60vw, 240px); height: min(60vw, 240px); animation: bob 2.4s ease-in-out infinite; }
.btn.play { font-size: 26px; padding: 14px 64px; letter-spacing: 1px; }
.splash-studio { width: 180px; max-width: 50vw; height: auto; margin-top: 28px; } /* breathing room under PLAY */
body.theme-night .splash-studio { content: url(../assets/brand/powellplay-lockup-white-520.png); }

/* Studio credit in More */
.studio { text-align: center; padding: 8px 0 4px; }
.studio img { width: 120px; height: auto; opacity: .85; }
.studio p { font-size: 13px; margin: 6px 0; color: var(--muted); }
.studio a { color: var(--accent2); font-weight: 600; }

/* ---------- Squishy care ---------- */
#careBox { position: absolute; bottom: 12px; left: 12px; display: flex; align-items: center; gap: 6px; background: var(--card); padding: 5px 10px; border-radius: 99px; pointer-events: none; }
#careBox .ic { width: 18px; height: 18px; }
.care-bar { width: 70px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.care-bar i { display: block; height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #7be0a8, #3cc98a); transition: width .4s, background .4s; }
.care-bar i.mid { background: linear-gradient(90deg, #ffd56b, #ffb340); }
.care-bar i.low { background: linear-gradient(90deg, #ff9a9a, #ff5f6d); }
.patch-btn { position: absolute; bottom: 54px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; animation: pulse 1.1s ease-in-out infinite; z-index: 2; }
.patch-btn .ic { width: 22px; height: 22px; }
.hidden { display: none !important; }
#patchHint { bottom: 54px; background: #fff; color: #1f2a44; font-weight: 600; }
.sq-card .kind { font-size: 10px; color: var(--muted); }
.sq-card .care-bar { width: 70%; height: 5px; margin-top: 2px; }
.sq-card .status { font-size: 10px; font-weight: 700; color: #ff5f6d; }
.sq-card .status.rest { color: #1a9b6c; }
.feel { font-size: 13px; color: #64748b; font-style: italic; }

/* ---------- Series shelves ---------- */
.series-head { display: flex; align-items: center; gap: 6px; margin: 14px 2px 8px; font-size: 15px; }
.series-head small { color: var(--muted); }
.series-goal { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--card2); padding: 3px 8px; border-radius: 99px; }
.series-goal.done { color: #fff; background: #3cc98a; }
.season-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #ff8a1f, #8a3fd6); padding: 2px 7px 2px 4px; border-radius: 99px; z-index: 1; }
.season-badge .ic { width: 14px; height: 14px; }
.sq-card.seasonal, .sticker.seasonal { box-shadow: inset 0 0 0 2px #ffb36b55; position: relative; }
.lock.event { color: #e8761a; font-weight: 700; }

/* ---------- Seasonal event ---------- */
.event-banner { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; margin-bottom: 8px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #ff8a1f, #b34ce0 60%, #5b2bb5); box-shadow: 0 4px 0 #4a2390; }
.event-banner .big { width: 40px; height: 40px; }
.event-banner small { opacity: .9; }
.candy-count { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 22px; margin: 6px 0 10px; color: #e8761a; }
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.event-card { background: #faf5ff; border-radius: 16px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.event-card canvas { width: 76px; height: 76px; }
.event-card.owned { background: #eafaf2; }
.adopted { color: #1a9b6c; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.goals { list-style: none; padding: 0; margin: 0; text-align: left; font-size: 13px; }
.goals li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: #f1f5f9; margin-bottom: 4px; }
.goals li span:nth-child(2) { flex: 1; }
.goals li b { color: #e8761a; }
.goals li.done { background: #eafaf2; text-decoration: line-through; color: #6b8f7d; }
.goal-n { font-size: 11px; font-weight: 700; color: #64748b; min-width: 44px; }
/* Spooky Sparkle: the Sparkle Squishy in its Halloween costume */
.sparkle.spooky { background: radial-gradient(circle at 35% 30%, #ffe0b8, #ff9a2e 55%, #b34ce0); box-shadow: 0 0 24px #ff9a2ecc, 0 0 60px #b34ce088; }
.sparkle.spooky .face { color: #3a1450; }
.sparkle.spooky::before, .sparkle.spooky::after { color: #ffd27a; }
/* Halloween mood on the play area */
body.season-halloween #stageWrap { background: radial-gradient(circle at 50% 110%, rgba(255,140,40,.22), transparent 60%), radial-gradient(circle at 10% 0%, rgba(140,60,210,.18), transparent 50%); }
body.season-halloween .bg-bubbles i:nth-child(odd) { background: rgba(255,160,60,.28); }
body.season-halloween .bg-bubbles i:nth-child(even) { background: rgba(150,80,220,.22); }

.sticker .season-badge { align-self: center; margin-bottom: 2px; }

/* ---------- Goal card: always show what you're earning toward ---------- */
#stageTop { position: absolute; top: 8px; left: 10px; right: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 3; pointer-events: none; }
#goalCard { width: min(100%, 440px); display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.goal-row { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card2); border-radius: 18px; padding: 7px 12px 8px 7px; box-shadow: 0 4px 16px rgba(20,35,60,.13); border: 2px solid transparent; }
.goal-row canvas { width: 46px; height: 46px; flex: none; background: color-mix(in srgb, var(--accent2) 10%, #fff); border-radius: 14px; }
.goal-info { flex: 1; min-width: 0; }
.goal-label { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-label small { font-weight: 500; color: var(--muted); }
.goal-bar { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 3px 0 2px; }
.goal-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .3s; }
.goal-nums { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.goal-nums .ic { width: 14px; height: 14px; }
.goal-row.event .goal-bar i { background: linear-gradient(90deg, #ff9a2e, #b34ce0); }
.goal-row.event { border-color: #ffb36b88; }
.goal-row.ready { border-color: #3cc98a; animation: pulse 1.1s ease-in-out infinite; }
.goal-row.ready .goal-bar i { background: linear-gradient(90deg, #7be0a8, #3cc98a); }
#careBox.hidden { display: none; }

/* ---------- Phones: let the squishy fill the screen ---------- */
#panel { height: 44dvh; }
@media (min-width: 900px) { #panel { height: auto; } }
@media (max-width: 899px) {
  body.panel-folded #panel { height: auto; }
  body.panel-folded #tabBody { display: none; }
  body.panel-folded #tabs { border-bottom: 0; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  body.panel-folded #tabs button.active { background: transparent; color: var(--muted); }
  body.panel-folded #tabs button.active .tab-ic { transform: none; }
}
@media (max-width: 600px) {
  .net-pill { position: absolute; right: 10px; top: 8px; max-width: 92px; white-space: normal; text-align: left; line-height: 1.15; font-size: 11px; padding: 5px 9px; }
  .goal-row canvas { width: 40px; height: 40px; }
  .goal-row { padding: 5px 10px 6px 5px; }
  .goal-bar { height: 12px; }
}
.event-how { font-size: 14px; background: #fff4e6; border-radius: 14px; padding: 8px 10px; margin: 4px 0; }

/* ---------- Calm layout pass: slim goal chips, less clutter ---------- */
#goalCard { flex-direction: row; width: min(100%, 520px); gap: 8px; }
.goal-row { flex: 1; min-width: 0; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 99px; box-shadow: 0 2px 10px rgba(20,35,60,.10); }
.goal-row canvas { width: 34px; height: 34px; border-radius: 50%; }
.goal-label { display: none; }
.goal-bar { height: 10px; margin: 0 0 2px; }
.goal-nums { font-size: 11px; white-space: nowrap; overflow: hidden; }
.goal-nums .ic { width: 12px; height: 12px; }
@media (max-width: 600px) { .goal-row canvas { width: 30px; height: 30px; } }
@media (max-width: 899px) { .bg-bubbles { display: none; } }
#spsLabel.zero { visibility: hidden; }

/* The squishy is the focus: everything around it stays quiet */
.goal-row { background: color-mix(in srgb, var(--card2) 72%, transparent); box-shadow: none; }
.goal-row.ready { background: var(--card2); }
@media (max-width: 600px) { .brand { display: none; } #hud { justify-content: center; } }

/* ---------- Bottom bar: app-style tabs at the bottom, content as a sheet above ---------- */
#tabs { order: 3; border-bottom: 0; border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); gap: 0; }
#tabBody { order: 2; padding: 6px 14px 12px; }
#sheetHandle { order: 1; display: flex; justify-content: center; align-items: center; height: 18px; width: 100%; flex: none; }
#sheetHandle i { width: 42px; height: 5px; border-radius: 99px; background: var(--line); }
#tabs button { border-radius: 12px; padding: 6px 2px 4px; font-size: 11px; position: relative; }
#tabs button.active { background: transparent; color: var(--accent); }
#tabs button.active::before { content: ''; position: absolute; top: -4px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
#tabs .tab-ic { width: 24px; height: 24px; }
#tabs button.dot::after { top: 3px; }
#panel { box-shadow: 0 -4px 20px rgba(20,35,60,.10); }
@media (max-width: 899px) {
  #panel { height: 52dvh; }
  body.panel-folded #sheetHandle { display: none; }
  body.panel-folded #tabs { border-top: 0; }
  body.panel-folded #tabs button.active::before { display: none; }
  body.panel-folded #tabs button.active { color: var(--muted); }
}
@media (min-width: 900px) { #sheetHandle { display: none; } }
/* tighter, calmer content */
.section-title { font-size: 15px; margin: 4px 2px 8px; }
.card { padding: 10px 12px; border-radius: 16px; }
.me-card { padding: 8px 12px; border-radius: 16px; margin-bottom: 8px; }
.me-card b { font-size: 15px; }
.party-card { padding: 10px 12px; border-radius: 16px; }
.helper { padding: 8px 10px; border-radius: 16px; margin-bottom: 6px; }

/* ---------- Compact bottom sheet on phones and narrow windows ---------- */
@media (max-width: 899px) {
  #panel { height: 38dvh; }
  #sheetHandle { height: 12px; }
  #sheetHandle i { width: 36px; height: 4px; }
  #tabBody { padding: 2px 10px 8px; }
  #tabs { padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); }
  #tabs button { padding: 4px 2px 2px; font-size: 10px; }
  #tabs .tab-ic { width: 20px; height: 20px; }
  .section-title { font-size: 13px; margin: 2px 2px 6px; }
  .section-title.row { margin-top: 8px; }
  .qty button { padding: 2px 8px; font-size: 11px; }
  /* power-ups: one swipeable row of small tiles */
  .upgrade-grid { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
  .upgrade-grid::-webkit-scrollbar { display: none; }
  .upg { flex: none; width: 54px; padding: 4px 2px; border-radius: 12px; }
  .upg .e { width: 26px; height: 26px; }
  .upg .c { font-size: 10px; }
  .upg.can { box-shadow: 0 2px 0 var(--accent); }
  /* helpers: one slim line each */
  .helper { padding: 5px 8px; gap: 8px; margin-bottom: 5px; border-radius: 12px; border-bottom-width: 2px; }
  .helper .he { width: 32px; height: 32px; }
  .helper .hi b { font-size: 13px; }
  .helper .hi small:not(.rate) { display: none; }
  .helper .hi small.rate { font-size: 11px; }
  .helper .hc { flex-direction: row; align-items: center; gap: 8px; }
  .helper .cost { font-size: 12px; }
  .helper .own { font-size: 18px; min-width: 18px; text-align: right; }
  .empty { padding: 6px; font-size: 12px; border-radius: 12px; }
  /* collection, stickers, friends */
  .series-head { margin: 8px 2px 6px; font-size: 13px; }
  .sq-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
  .sq-card { padding: 4px 4px 6px; border-radius: 12px; border-width: 2px; }
  .sq-card canvas { width: 58px; height: 58px; }
  .sq-card b { font-size: 11px; }
  .sq-card .kind { display: none; }
  .sticker-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
  .sticker { padding: 5px; border-radius: 12px; }
  .sticker .st-ic { width: 30px; height: 30px; }
  .sticker small { display: none; }
  .me-card { padding: 6px 10px; }
  .me-card small { display: none; }
  .party-card { padding: 8px 10px; margin-bottom: 8px; }
  .party-card small { font-size: 11px; }
  .emotes { gap: 5px; }
  .emotes button { width: 40px; height: 40px; border-radius: 12px; }
  .emotes .ic { width: 24px; height: 24px; }
  .board li { padding: 5px 10px; font-size: 13px; }
  .card { padding: 8px 10px; margin-bottom: 8px; }
  .card p { font-size: 13px; margin: 4px 0; }
  .toggle { padding: 5px 0; font-size: 14px; }
  .btn { padding: 8px 14px; font-size: 14px; }
}

/* ---------- Event screen (Halloween Squish Fest) ---------- */
.modal-card.event-modal { padding: 0 0 14px; overflow-x: hidden; width: min(100%, 420px); }
.event-modal .modal-body { margin: 0; }
.ev-head { position: relative; color: #fff; padding: 18px 18px 14px; text-align: center; border-radius: 28px 28px 0 0;
  background: radial-gradient(circle at 50% 120%, rgba(255,140,30,.55), transparent 60%), linear-gradient(160deg, #2b1747, #4a2477 60%, #2b1747); }
.ev-head h2 { margin: 2px 0 4px; font-size: 22px; color: #fff; }
.ev-head p { margin: 0 auto 10px; font-size: 13px; opacity: .92; max-width: 300px; }
.ev-head small { display: block; margin-top: 8px; font-size: 11px; opacity: .7; }
.ev-season { width: 40px; height: 40px; }
.ev-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 20px; line-height: 1; }
.ev-balance { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px 6px 8px; border-radius: 99px; background: rgba(255,255,255,.12); box-shadow: 0 0 0 2px rgba(255,170,70,.6), 0 0 22px rgba(255,140,30,.45); }
.ev-balance b { font-size: 26px; color: #ffc46b; }
.ev-balance span { font-size: 14px; font-weight: 600; opacity: .9; }
.ev-candy { width: 30px; height: 30px; }
.ev-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 12px 4px; margin-top: -2px; }
.ev-card { background: #f8f6fb; border: 2px solid transparent; border-radius: 16px; padding: 8px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: #1f2a44; }
.ev-card canvas { width: 72px; height: 72px; }
.ev-card b { font-size: 12px; line-height: 1.15; min-height: 28px; display: flex; align-items: center; text-align: center; }
.ev-price { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: #e8761a; }
.ev-bar { width: 86%; height: 7px; border-radius: 99px; background: #e5e1ec; overflow: hidden; margin: 2px 0; }
.ev-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff9a2e, #b34ce0); }
.ev-bar.small { width: 100%; height: 5px; margin: 3px 0 0; }
.ev-adopt { margin-top: 2px; padding: 6px 14px; border-radius: 99px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #ff8a1f, #f5b700); box-shadow: 0 3px 0 #c76a00; animation: pulse 1.1s ease-in-out infinite; }
.ev-need { margin-top: 2px; font-size: 11px; font-weight: 700; color: #64748b; }
.ev-owned { margin-top: 2px; display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: #1a9b6c; }
.ev-card.ready { border-color: #ffb340; background: #fff8ee; }
.ev-card.owned { background: #ecfaf3; }
.ev-section { text-align: left; font-weight: 700; font-size: 14px; color: #1f2a44; padding: 10px 16px 6px; }
.ev-goals { list-style: none; margin: 0; padding: 0 12px; text-align: left; }
.ev-goals li { display: flex; align-items: center; gap: 8px; background: #f3f5f8; border-radius: 12px; padding: 7px 10px; margin-bottom: 5px; font-size: 13px; color: #1f2a44; }
.ev-goal { flex: 1; min-width: 0; }
.ev-reward { color: #e8761a; font-size: 13px; }
.ev-goals li.done { background: #ecfaf3; color: #6b8f7d; }
.ev-goals li.done .ev-reward { color: #1a9b6c; }
.ev-earn { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px; justify-content: center; }
.ev-earn span { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; background: #fff4e6; color: #7a4a14; border-radius: 99px; padding: 3px 9px 3px 4px; }
.ev-earn b { color: #e8761a; }
.event-modal .modal-btns { padding: 0 16px; }

/* ---------- Quick-buy power-ups on the left of the play area ---------- */
#quickUps { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.qup { width: 54px; padding: 5px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--card2); border: 2px solid var(--accent);
  border-radius: 16px; box-shadow: 0 3px 0 var(--accent); font-size: 10px; font-weight: 700; animation: qupIn .45s cubic-bezier(.2,1.6,.4,1); }
.qup:active { transform: translateY(2px); box-shadow: none; }
.qup-ic { width: 30px; height: 30px; }
@keyframes qupIn { from { transform: translateX(-70px) scale(.6); opacity: 0; } }

/* ---------- Helper crew row ---------- */
#crew { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; max-width: calc(100% - 20px); }
.crew-chip { position: relative; display: inline-flex; align-items: center; gap: 3px; background: color-mix(in srgb, var(--card2) 80%, transparent); border-radius: 99px; padding: 3px 9px 3px 4px; font-size: 12px; box-shadow: 0 2px 8px rgba(20,35,60,.10); }
.crew-chip b { color: var(--ink); }
.crew-ic { width: 26px; height: 26px; }
.crew-chip.work { animation: crewBounce .5s cubic-bezier(.2,1.8,.4,1); }
@keyframes crewBounce { 40% { transform: translateY(-6px) scale(1.08); } }
.crew-float { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; pointer-events: none; animation: crewFloat 1.2s ease-out forwards; }
@keyframes crewFloat { from { opacity: 0; transform: translate(-50%, 6px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -26px); } }
#careBox { top: 50%; bottom: auto; left: auto; right: 10px; transform: translateY(-50%); flex-direction: column; padding: 8px 6px; }
#careBox .care-bar { width: 8px; height: 70px; display: flex; align-items: flex-end; }
#careBox .care-bar i { transition: height .4s; }
@media (max-width: 600px) { .crew-ic { width: 22px; height: 22px; } .crew-chip { font-size: 11px; padding: 2px 7px 2px 3px; } }

/* ---------- Squishy levels ---------- */
.stars { color: #f5b700; font-size: 11px; letter-spacing: 1px; line-height: 1; }
.stars i { color: var(--line); font-style: normal; }
.lvl-bar { width: 80%; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f5b700, #ff8a1f); }
.lvl-max { font-size: 10px; font-weight: 700; color: #e8a400; }
#lvlPill { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; z-index: 3;
  background: color-mix(in srgb, var(--card2) 75%, transparent); border-radius: 99px; padding: 4px 10px; font-size: 12px; }
#lvlPill .lvl-bar { width: 54px; height: 6px; }
.combo { bottom: 92px; }
.lvl-list { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.lvl-row { display: flex; align-items: center; gap: 10px; background: #f3f5f8; border-radius: 14px; padding: 4px 10px 4px 4px; opacity: .65; }
.lvl-row.got { opacity: 1; background: #fff8e6; }
.lvl-row canvas { width: 56px; height: 56px; flex: none; }
.lvl-row small { display: block; font-size: 11px; color: #64748b; }
/* ---------- Collection: one simple screen ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 5px 10px; border-radius: 99px; background: var(--card2); font-size: 12px; font-weight: 600; border: 1.5px solid var(--line); }
.chip small { color: var(--muted); font-weight: 500; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.on small { color: #e6fffb; }
.chip.done:not(.on) { border-color: #3cc98a; }
.next-list { display: flex; flex-direction: column; gap: 6px; }
.next-row { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card2); border-radius: 14px; padding: 4px 12px 6px 4px; }
.next-row canvas { width: 48px; height: 48px; flex: none; }
.next-row > div { flex: 1; min-width: 0; }
.next-row b { font-size: 13px; } .next-row small { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.next-row .goal-bar { height: 8px; margin: 3px 0 2px; }
.sq-grid.minis { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.sq-card.mini { padding: 4px 2px 5px; }
.sq-card.mini canvas { width: 44px; height: 44px; }
.sq-card.mini small { font-size: 10px; color: var(--muted); }
.sq-card .season-badge { margin-top: 2px; }
@media (max-width: 899px) { .sq-card.mini canvas { width: 40px; height: 40px; } }
.sq-card.locked canvas { filter: grayscale(1) opacity(.55); }

/* ---------- Squishy Packs ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0; }
.pack-item { background: #f6f3fb; border-radius: 14px; padding: 6px; display: flex; flex-direction: column; align-items: center; font-size: 12px; }
.pack-item canvas { width: 72px; height: 72px; }
.pack-item small { color: #64748b; font-size: 11px; }
.price-line { font-weight: 700; color: #0f9f9a; font-size: 14px; }
.packs-card { background: linear-gradient(135deg, #fff6e8, #eef7ff); }
.pack-row { width: 100%; display: flex; align-items: center; gap: 2px; background: #fff; border-radius: 14px; padding: 4px 10px 4px 4px; margin-top: 6px; text-align: left; }
.pack-row canvas { width: 38px; height: 38px; }
.pack-row span { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.pack-row small { color: #0f9f9a; font-weight: 700; }

#lvlPill { position: static; transform: none; pointer-events: auto; }
.combo { bottom: 54px; }

.patch-btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.patch-btn small { font-size: 10px; font-weight: 600; opacity: .9; }
.btn.patch-btn { background: #ff5f6d; color: #fff; box-shadow: 0 4px 0 #c43d4a; }

/* Squishable logo on the PLAY screen */
#splashLogo { width: min(94vw, 600px, 66vh); aspect-ratio: 1600 / 626; /* smaller on short screens so the whole PLAY screen fits */ touch-action: none; cursor: pointer; }
.splash-hint { font-size: 13px; color: var(--muted); margin-top: -6px; }
#splashSquishy { width: min(36vw, 150px); height: min(36vw, 150px); }

/* Helper merging */
.tier-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 1px; box-shadow: 0 0 0 1.5px #fff; }
.tier-dot.t1 { background: linear-gradient(135deg, #f4f6fa, #aab4c4); } .tier-dot.t2 { background: linear-gradient(135deg, #fff1a6, #f2a900); } .tier-dot.t3 { background: linear-gradient(135deg, #ffffff, #b9e3ff 45%, #e2d6ff); }
.crew-chip.can-merge { background: #ffd34d; cursor: pointer; animation: mergeGlow 1.1s ease-in-out infinite; }
.crew-chip.can-merge b { color: #5a3b00; }
@keyframes mergeGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 211, 77, .9); transform: scale(1); } 50% { box-shadow: 0 0 0 7px rgba(255, 211, 77, 0); transform: scale(1.08); } }
.merge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 4px 10px 56px; font-size: 12px; color: var(--ink2, #667); }
.mg-have { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--ink); }
.mg-prog { width: 70px; height: 6px; border-radius: 99px; background: rgba(120,130,160,.2); overflow: hidden; }
.mg-prog span { display: block; height: 100%; background: linear-gradient(90deg, #7fb2f5, #ffd34d); }
.btn.mg-btn { background: #ffd34d; color: #5a3b00; box-shadow: 0 3px 0 #d9a91f; padding: 6px 12px; font-size: 13px; animation: mergeGlow 1.1s ease-in-out infinite; }

/* Simple line icons, merge button icon, show/hide helpers */
.glyph { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.btn.mg-btn { display: inline-flex; align-items: center; gap: 5px; }
.crew-chip .mg-g { color: #5a3b00; width: 15px; height: 15px; }
.crew-chip.off { opacity: .55; }
.eye-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 99px; padding: 4px 9px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.eye-btn.off { background: rgba(120,130,160,.15); color: #7a8296; }

/* Power-up celebration */
.celebrate { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
.cel-card { pointer-events: auto; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; max-width: min(340px, calc(100% - 32px)); animation: celIn .5s cubic-bezier(.2,1.6,.4,1) both; }
/* no frame: the icon, rays and words float right over the squishy, with a soft white glow so they stay readable */
.cel-card small, .cel-card b, .cel-card p { position: relative; z-index: 1; text-shadow: 0 0 6px #fff, 0 0 12px #fff, 0 2px 0 #fff; }
.cel-card small { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.cel-card b { font-size: 24px; color: var(--ink); }
.cel-card p { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.cel-ic { width: 84px !important; height: 84px !important; position: relative; z-index: 1; filter: drop-shadow(0 6px 14px rgba(20,35,60,.25)); animation: celPop .7s cubic-bezier(.2,1.8,.4,1) .1s both; }
.cel-rays { position: absolute; left: 50%; top: 42px; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,211,77,.45) 0 10deg, transparent 10deg 30deg); -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); animation: celSpin 4s linear infinite; }
.celebrate.gold .cel-rays { background: repeating-conic-gradient(from 0deg, rgba(255,190,40,.6) 0 10deg, transparent 10deg 30deg); }
.celebrate.out .cel-card { animation: celOut .35s ease-in both; }
@keyframes celIn { from { transform: scale(.4) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes celOut { to { transform: scale(.85) translateY(-20px); opacity: 0; } }
@keyframes celPop { from { transform: scale(0) rotate(-20deg); } to { transform: none; } }
@keyframes celSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cel-rays, .crew-chip.can-merge, .btn.mg-btn { animation: none; } }

/* ---------- Game-style interface: soft outlines and gentle drop shadows (the art carries the contrast) ---------- */
:root { --edge: #1e2a4a; --soft: rgba(30,42,74,.16); --drop: rgba(30,42,74,.12); }
body.theme-night { --edge: #0b0826; --soft: rgba(255,255,255,.14); --drop: rgba(0,0,0,.3); }
#squishCount { color: #fff; -webkit-text-stroke: 3px var(--edge); paint-order: stroke fill; text-shadow: 0 4px 0 var(--edge); letter-spacing: .5px; }
.counter .unit, #spsLabel { color: #fff; font-weight: 700; text-shadow: 0 2px 0 var(--edge), 0 0 6px rgba(16,24,48,.35); }
.net-pill, .goal-row, .crew-chip, .buff, #careBox, .toast, .card { border: 1.5px solid var(--soft); box-shadow: 0 3px 0 var(--drop), 0 6px 16px rgba(20,35,60,.10); }
.goal-row { background: #fff; }
.btn { border: 1.5px solid var(--soft); box-shadow: 0 3px 0 var(--drop); }
.btn.primary, .btn.play { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 75%, #fff), var(--accent)); border-color: transparent; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 60%, #000); text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.helper { border: 1.5px solid var(--soft); border-bottom-width: 4px; }
.helper:not(.can) { opacity: .8; filter: saturate(.6); }
.helper.mystery { opacity: .6; }
.upg.can { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.section-title { font-weight: 800; letter-spacing: .2px; }

/* ---------- The town fills the whole window; the menu floats over it ---------- */
#stage { position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 0; }
#app { grid-template-columns: minmax(0, 1fr); } /* never wider than the screen, even when a row of power-ups is long */
#panel, #stageWrap, #hud { min-width: 0; }
#hud { position: relative; z-index: 4; }
#panel { position: relative; z-index: 10; background: rgba(255,255,255,.96); border: 0; }
body.theme-night #panel { background: rgba(30,22,72,.96); }
#tabs { background: transparent; }
@media (min-width: 900px) {
  /* big screens: the game gets the whole window; the menu is a drawer on the right that opens from the tab bar */
  #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "hud" "stage"; }
  #panel { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 420px; margin: 0; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(20,35,60,.25); }
  body.panel-folded #panel { top: auto; height: auto; width: 380px; }
  body.panel-folded #tabBody { display: none; }
  body.panel-folded #tabs { border-bottom: 0; }
  body.panel-folded #tabs button.active { background: transparent; color: var(--muted); }
  body.panel-folded #tabs button.active::before { display: none; }
  #sheetHandle { display: flex; }
  body.panel-folded #sheetHandle { display: none; }
}

/* Winking Cat mascot on the PLAY screen: a happy bounce, and a squish when tapped */
.splash-mascot { width: 150px; height: auto; cursor: pointer; filter: drop-shadow(0 8px 10px rgba(20,40,90,.25)); animation: mascotBob 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.splash-mascot.boop { animation: mascotBoop .45s cubic-bezier(.2,1.6,.4,1), mascotBob 2.4s ease-in-out .45s infinite; }
@keyframes mascotBob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-8px) scale(.98, 1.03); } }
@keyframes mascotBoop { 0% { transform: scale(1.25, .7); } 100% { transform: scale(1, 1); } }
@media (prefers-reduced-motion: reduce) { .splash-mascot, .splash-mascot.boop { animation: none; } }

/* Stickers not earned yet: the real art, greyed out and a little faded */
.st-ic.st-locked img { filter: grayscale(1) brightness(1.15); opacity: .45; }
.st-ic.st-locked.ph { opacity: .45; }

/* ---------- Stickers look like real die-cut stickers ----------
   A thick white edge that follows the art, a thin outline in the tier color, a soft shadow, and a little tilt.
   Tier colors: 1 plain, 2 Bronze, 3 Silver, 4 Gold, 5 Diamond, 6 Rainbow (the same order as helper upgrades). */
.sticker .st-ic { width: 52px; height: 52px; }
.st-tier1 { --tc: #c9d1de; } .st-tier2 { --tc: #b0652f; --badge: #a85a26; } .st-tier3 { --tc: #8a94a6; --badge: #6f7889; }
.st-tier4 { --tc: #e0a400; --badge: #c48a00; } .st-tier5 { --tc: #2f9cf0; --badge: #2f86e6; } .st-tier6 { --tc: #b46cff; --badge: #8a5cf0; }
.sticker .st-ic img, .toast.st-toast .ic img {
  filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
          drop-shadow(0 1.5px 0 var(--tc, #c9d1de)) drop-shadow(0 -1.5px 0 var(--tc, #c9d1de)) drop-shadow(1.5px 0 0 var(--tc, #c9d1de)) drop-shadow(-1.5px 0 0 var(--tc, #c9d1de))
          drop-shadow(0 3px 2px rgba(20,30,60,.28));
}
.sticker:nth-child(3n+1) .st-ic { transform: rotate(-5deg); } .sticker:nth-child(3n+2) .st-ic { transform: rotate(3deg); } .sticker:nth-child(3n) .st-ic { transform: rotate(-2deg); }
.sticker.got .st-tier4 img, .toast.st-toast.st-tier4 .ic img { filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 1.5px 0 var(--tc)) drop-shadow(0 -1.5px 0 var(--tc)) drop-shadow(1.5px 0 0 var(--tc)) drop-shadow(-1.5px 0 0 var(--tc)) drop-shadow(0 0 6px rgba(255,200,40,.7)); }
.sticker.got .st-tier5 img, .toast.st-toast.st-tier5 .ic img { filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 1.5px 0 var(--tc)) drop-shadow(0 -1.5px 0 var(--tc)) drop-shadow(1.5px 0 0 var(--tc)) drop-shadow(-1.5px 0 0 var(--tc)) drop-shadow(0 0 7px rgba(80,180,255,.75)); }
.sticker.got .st-tier6 img, .toast.st-toast.st-tier6 .ic img { filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 1.5px 0 var(--tc)) drop-shadow(0 -1.5px 0 var(--tc)) drop-shadow(1.5px 0 0 var(--tc)) drop-shadow(-1.5px 0 0 var(--tc)) drop-shadow(0 0 7px rgba(255,120,220,.7)); }
.sticker .st-ic .ic-badge { background: var(--badge, var(--accent)); box-shadow: 0 0 0 2px #fff; }
.sticker .st-ic.st-locked { filter: grayscale(1); opacity: .45; }
.sticker .st-ic.st-locked img { opacity: 1; }

/* ---------- My Sticker Board (a brag board) ---------- */
.board-open { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px 16px; margin-bottom: 12px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #ff8fb8, #8a7bff 55%, #4fb2ff); box-shadow: 0 4px 0 rgba(60,40,140,.35); }
.board-open b { font-size: 18px; text-shadow: 0 2px 0 rgba(0,0,0,.2); } .board-open small { font-size: 12px; opacity: .95; }
#boardView { position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column; background: #eaf2fb; }
#boardView.show { display: flex; }
.bv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #fff; box-shadow: 0 2px 10px rgba(20,35,60,.08); }
.bv-title { display: flex; flex-direction: column; align-items: center; line-height: 1.1; } .bv-title b { font-size: 17px; } .bv-title small { color: var(--muted); font-size: 12px; }
.bv-stage { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px; overflow: hidden; touch-action: none; }
.bv-board { position: relative; width: 100%; height: 100%; min-height: 0; /* the board fills all the space */ /* a taller board on phones held upright */ border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(20,35,60,.25), inset 0 0 0 4px rgba(255,255,255,.7); touch-action: none; }
.bv-name { position: absolute; left: 14px; top: 12px; display: flex; flex-direction: column; padding: 8px 14px; border-radius: 16px; background: rgba(255,255,255,.88); box-shadow: 0 3px 0 rgba(30,42,74,.15); z-index: 5; }
.bv-name b { font-size: clamp(15px, 2.6vw, 24px); } .bv-name span { font-size: 12px; color: var(--muted); font-weight: 600; }
.bv-hint { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 99px; background: rgba(255,255,255,.88); font-weight: 600; font-size: 14px; pointer-events: none; text-align: center; }
.bv-item { position: absolute; cursor: grab; touch-action: none; }
.bv-item.sel { outline: 3px dashed rgba(255,255,255,.95); outline-offset: 4px; border-radius: 12px; }
.bv-st, .bv-st img { display: block; width: 100%; height: 100%; }
.bv-st img { object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff)
          drop-shadow(0 1.5px 0 var(--tc, #c9d1de)) drop-shadow(0 -1.5px 0 var(--tc, #c9d1de)) drop-shadow(1.5px 0 0 var(--tc, #c9d1de)) drop-shadow(-1.5px 0 0 var(--tc, #c9d1de))
          drop-shadow(0 4px 3px rgba(20,30,60,.3)); }
.bv-ghost { position: fixed; z-index: 90; transform: translate(-50%, -50%) scale(1.1); pointer-events: none; }
.bv-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 0 10px 6px; }
.bv-bgs { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 4px 10px 8px; }
.bv-bg { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(20,35,60,.25); }
.bv-bg.on { box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(20,35,60,.25); }
.bv-tray { display: flex; gap: 10px; overflow-x: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 10px rgba(20,35,60,.08); min-height: 84px; align-items: center; }
.bv-tray-item { flex: none; width: 62px; height: 62px; cursor: grab; touch-action: none; }
.bv-tray-empty { width: 100%; text-align: center; color: var(--muted); font-size: 14px; }

/* the board fills the space; on a big screen the tray sits on the right so the board gets the whole height */
.bv-tools { position: absolute; left: calc(50% - 45px); bottom: 20px; transform: translateX(-50%); z-index: 20; padding: 6px; border-radius: 99px; background: rgba(255,255,255,.92); box-shadow: 0 6px 20px rgba(20,35,60,.2); width: max-content; max-width: calc(100% - 20px); }


/* ---------- Squishy Playroom ---------- */
.board-open.play-open { background: linear-gradient(135deg, #ffb347, #ff8fb8 50%, #8a7bff); }
#playroom { position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column; background: #ffc58a; }
#playroom.show { display: flex; }
.pr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #fff; box-shadow: 0 2px 10px rgba(20,35,60,.1); z-index: 2; }
.pr-title { display: flex; flex-direction: column; align-items: center; line-height: 1.1; } .pr-title b { font-size: 17px; } .pr-title small { color: var(--muted); font-size: 12px; }
.pr-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#prCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.pr-rooms { display: flex; gap: 6px; padding: 6px 10px; background: rgba(255,255,255,.85); overflow-x: auto; scrollbar-width: none; z-index: 2; }
.pr-room { flex: 1 0 auto; min-width: 104px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 12px; border-radius: 14px; border: 2px solid transparent; background: #fff4e6; line-height: 1.15; }
.pr-room b { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; } .pr-room small { font-size: 11px; color: var(--muted); font-weight: 600; }
.pr-room.on { background: #fff; border-color: #ff8fb8; box-shadow: 0 3px 0 rgba(255,95,143,.25); }
.pr-room.locked { opacity: .6; }
.pr-hud { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; z-index: 3; pointer-events: none; max-width: calc(100% - 20px); }
.pr-hud span { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 5px 12px; border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 3px 0 rgba(30,42,74,.12); line-height: 1.1; }
.pr-hud small { font-size: 11px; color: var(--muted); font-weight: 600; } .pr-hud b { font-size: 19px; color: #3b2440; }
.pr-hud em { flex-basis: 100%; text-align: center; font-style: normal; font-size: 12px; font-weight: 700; color: #5a3fa0; }
.pr-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; display: none; flex-direction: column; align-items: center; gap: 8px; width: min(360px, calc(100% - 32px)); padding: 20px 22px; border-radius: 24px; background: #fff; box-shadow: 0 12px 34px rgba(20,35,60,.3); text-align: center; animation: celIn .45s cubic-bezier(.2,1.6,.4,1) both; }
.pr-card.show { display: flex; }
.pr-card > b { font-size: 22px; color: #ff3d7f; } .pr-card p { margin: 0; font-size: 14px; line-height: 1.4; color: #3b2440; } .pr-card small { font-size: 13px; color: var(--muted); font-weight: 600; }
.pr-card .pr-big { font-size: 46px; font-weight: 800; color: #3b2440; line-height: 1; } .pr-card .pr-best { color: #ff3d7f; font-size: 15px; }
.pr-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pr-shelf { background: #fff; box-shadow: 0 -2px 10px rgba(20,35,60,.1); padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); z-index: 2; }
.pr-shelf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pr-shelf-head b { font-size: 14px; } .pr-shelf-head small { flex: 1; font-size: 12px; color: var(--muted); }
.pr-shelf-head .btn.small { padding: 4px 10px; font-size: 12px; }
.pr-shelf-row { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 2px; touch-action: pan-x; scrollbar-width: thin; }
.pr-sq { flex: 0 0 auto; width: 66px; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border-radius: 14px; border: 2px solid #f1e6ff; background: #fbf7ff; cursor: grab; touch-action: pan-x; }
.pr-sq img { width: 52px; height: 52px; pointer-events: none; } .pr-sq span { font-size: 10px; font-weight: 600; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.pr-sq.out { opacity: .4; border-style: dashed; }
#prStage .pr-next { display: none; }
.pr-unlock { padding: 5px 11px; border-radius: 12px; background: rgba(255,255,255,.75); font-size: 11px; }
@media (max-height: 640px) { .pr-sq { width: 54px; } .pr-sq img { width: 40px; height: 40px; } .pr-sq span { display: none; } .pr-room { padding: 4px 10px; } .pr-room small { display: none; } .pr-unlock { display: none; } }
.pr-pad { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #2a1f4d; z-index: 2; }
.pr-arrow { width: 70px; height: 56px; border-radius: 18px; border: 0; background: #ffd166; color: #5a3b00; box-shadow: 0 4px 0 #d9a91f; display: grid; place-items: center; touch-action: none; user-select: none; }
.pr-grab { min-width: 130px; height: 60px; border-radius: 99px; border: 0; background: #ff3d7f; color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 5px 0 #c4245c; touch-action: manipulation; }
.pr-grab.hold { background: #6fdc8c; box-shadow: 0 5px 0 #3fa860; }
.pr-arrow:active, .pr-grab:active { transform: translateY(3px); box-shadow: none; }
.pr-next { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.92); font-size: 13px; box-shadow: 0 3px 0 rgba(30,42,74,.12); white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.pr-hint { position: absolute; left: 50%; top: 74px; transform: translateX(-50%); padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.92); font-size: 13px; font-weight: 600; transition: opacity .4s; pointer-events: none; }
.pr-hint.gone { opacity: 0; }
.pr-goals { position: absolute; top: 18px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 3; max-width: min(330px, calc(100% - 20px)); pointer-events: none; }
.pr-goal { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 7px 11px; border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 3px 0 rgba(30,42,74,.12); font-size: 12px; font-weight: 600; }
.pr-goal i { grid-column: 1; height: 6px; border-radius: 99px; background: rgba(120,130,160,.2); overflow: hidden; } .pr-goal i b { display: block; height: 100%; background: linear-gradient(90deg, #ff8fb8, #8a7bff); }
.pr-goal small { grid-row: 1 / span 2; grid-column: 2; font-weight: 700; color: var(--accent2); }
.pr-hint { top: auto; bottom: 58px; text-align: center; max-width: calc(100% - 24px); white-space: normal; }
.pr-done { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 22px; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(20,35,60,.25); animation: celIn .45s cubic-bezier(.2,1.6,.4,1) both; text-align: center; }
.pr-done b { font-size: 20px; color: #ff3d7f; } .pr-done span { font-size: 13px; color: var(--muted); }
.pr-done.out { animation: celOut .35s ease-in both; }
@media (max-width: 600px) { .pr-goal { font-size: 11px; padding: 5px 9px; } }

/* ---------- Helper cards: one card per helper (buy area, then merging and show/hide inside the same card) ---------- */
.helper.hcard { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; opacity: 1; filter: none; }
.hcard .hbuy { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: filter .2s, opacity .2s; }
.hcard:not(.can) .hbuy { filter: grayscale(1); opacity: .5; cursor: default; }
.hcard:not(.can) .hbuy .cost { color: #8a8fa0; }
.hcard.can .hbuy:active { transform: scale(.98); }
.hcard .merge-row { margin: 0; padding: 7px 12px 9px; gap: 6px 8px; border-top: 1.5px dashed var(--soft); background: color-mix(in srgb, var(--card2) 70%, #f3f6fb); }
.hcard .merge-row { flex-wrap: nowrap; }
.hcard .mg-have { flex: none; white-space: nowrap; }
.hcard .mg-next { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.hcard .mg-next small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hcard .mg-prog { flex: 1; min-width: 40px; max-width: 140px; height: 8px; }
.hcard .btn.mg-btn { flex: 1; justify-content: center; white-space: nowrap; overflow: hidden; }
.hcard .eye-btn { flex: none; }
.hcard .merge-row small { font-weight: 600; }
.hcard .eye-btn { padding: 5px 7px; }
.hcard .eye-btn .gl, .hcard .eye-btn svg { width: 16px; height: 16px; }
@media (max-width: 899px) { .hcard .hbuy { padding: 7px 10px; gap: 8px; } .hcard .merge-row { padding: 5px 10px 7px; } }

.ic.mg-ic { width: 20px; height: 20px; flex: none; }
.mg-have { gap: 2px; }

/* Earned candy flying into the candy bar */
.candy-fly { position: fixed; left: -21px; top: -21px; width: 42px; height: 42px; z-index: 60; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(60,30,0,.3)); will-change: transform; }
.candy-bump { animation: candyBump .35s cubic-bezier(.2,1.8,.4,1); }
@keyframes candyBump { 40% { transform: scale(1.45) rotate(-10deg); } }

/* Sticker Board: three boards, Save and Share, and squishies on the board */
.bv-acts { display: flex; gap: 6px; }
.bv-slots { display: flex; flex-direction: column; gap: 8px; width: 82px; }
.bv-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; text-align: center; border-radius: 14px; border: 2px solid transparent; background: #fff; box-shadow: 0 2px 0 rgba(30,42,74,.1); line-height: 1.1; }
.bv-slot i { width: 44px; height: 44px; margin-bottom: 2px; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); }
.bv-slot b { font-size: 13px; } .bv-slot small { font-size: 11px; color: var(--muted); font-weight: 600; }
.bv-slot.on { border-color: var(--accent); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 35%, transparent); }
.bv-tabs { display: flex; justify-content: center; gap: 4px; padding: 0 10px; background: transparent; }
.bv-tabs button { padding: 7px 18px; border: 0; border-radius: 14px 14px 0 0; background: rgba(255,255,255,.55); font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); }
.bv-tabs button.on { background: #fff; color: var(--ink, #16213d); }
.bv-sq, .bv-sq img { display: block; width: 100%; height: 100%; }
.bv-sq img { object-fit: contain; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(20,30,60,.3)); }
.bv-item.is-sq.sel { border-radius: 50%; }
@media (max-width: 520px) { .bv-slots { width: 58px; } .bv-slot { padding: 6px 2px; } .bv-slot i { width: 34px; height: 34px; } .bv-slot b { font-size: 11px; } .bv-slot small { display: none; } .bv-tools { left: calc(50% - 34px); } }

/* Sticker Board tray: Stickers, Squishies and Background tabs, always along the bottom */
.bv-tray .bv-bg { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; cursor: pointer; }
.bv-tray .bv-bg i { width: 46px; height: 46px; border-radius: 14px; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(20,35,60,.25); }
.bv-tray .bv-bg span { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.bv-tray .bv-bg.on i { box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(20,35,60,.25); }
.bv-tray .bv-bg.on span { color: var(--ink, #16213d); }
.bv-tray-acts { flex: none; display: flex; gap: 6px; margin-left: auto; padding-left: 8px; }
@media (max-width: 700px) { .bv-tray.bg-tab { flex-wrap: wrap; justify-content: center; row-gap: 8px; } .bv-tray.bg-tab .bv-tray-acts { width: 100%; margin-left: 0; padding-left: 0; justify-content: center; } .bv-tray.bg-tab { gap: 4px; padding-top: 8px; } .bv-tray .bv-bg { width: 54px; } .bv-tray .bv-bg i { width: 38px; height: 38px; border-radius: 11px; } .bv-tray .bv-bg span { font-size: 10px; } }

/* Sticker Board: a corner handle to resize and turn the selected sticker, and a trash can to put things back */
.bv-handle { position: absolute; right: -13px; bottom: -13px; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(20,35,60,.35); cursor: nwse-resize; touch-action: none; z-index: 2; }
.bv-handle::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 2px solid var(--accent); border-left-color: transparent; border-top-color: transparent; transform: rotate(45deg); }
.bv-handle::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; } /* a bigger area to grab with a finger */
.bv-item.binning { opacity: .55; }
.bv-trash { position: absolute; right: 14px; bottom: 14px; z-index: 900; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #6a5a80; background: rgba(255,255,255,.75); box-shadow: 0 3px 10px rgba(20,35,60,.2); opacity: .55; transform: scale(.85); transition: transform .15s, opacity .15s, background .15s, color .15s; pointer-events: none; }
.bv-board.dragging .bv-trash { opacity: 1; transform: scale(1); }
.bv-trash.hot { background: #ff5f6d; color: #fff; transform: scale(1.18) !important; }
.bv-trash.gulp { animation: trashGulp .35s ease; }
@keyframes trashGulp { 40% { transform: scale(1.25) rotate(-8deg); } }

/* The 3D mascot on the PLAY screen (js/mascot3d.js) */
.splash-mascot3d { width: 100vw; height: clamp(120px, min(26vh, 48vw), 220px); margin: -6px 0 -10px; flex-shrink: 0; } /* the mascot's home spot under the logo (smaller on short screens) */
.mascot3d-layer { position: fixed; inset: 0; z-index: 5; pointer-events: none; } /* the mascot can roam the whole PLAY screen; taps on it are caught in code */
.m3d-wait .splash-mascot { visibility: hidden; } /* while the 3D mascot loads */
.splash-mascot[src$='.webp'] { width: 190px; }

/* Glow Night setting: three little buttons in a row */
.seg-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 15px; font-weight: 500; gap: 10px; }
.seg { display: inline-flex; background: var(--line); border-radius: 99px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 99px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }

/* Playroom stars, picture challenges and the path to the next prize */
.pr-starline { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }
.pr-starline svg, .pr-path > svg, .pr-room small svg { width: 16px; height: 16px; vertical-align: -3px; }
#prGoals { flex-direction: row; flex-wrap: wrap; pointer-events: auto; }
.pr-goal { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 5px; border: 0; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 3px 0 rgba(30,20,60,.12); cursor: pointer; font: inherit; }
.pr-goal .gp { width: 40px; height: 40px; display: grid; place-items: center; }
.pr-goal .gp > svg { width: 38px; height: 38px; }
.hand-pic { position: relative; width: 40px; height: 40px; display: block; }
.hand-pic img { position: absolute; left: 9px; top: 12px; width: 26px; transform: rotate(180deg); transform-origin: 50% 40%; }
.hand-pic svg { position: absolute; left: 2px; top: 0; width: 26px; height: 26px; }
.gring { --p: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ff6f9f calc(var(--p) * 360deg), rgba(120,130,160,.18) 0); }
.gring b { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--accent2, #2457d6); }
#prStage .pr-next { display: block; top: 10px; bottom: auto; right: 10px; left: auto; transform: none; padding: 0; background: none; box-shadow: none; }
.pr-path { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.94); box-shadow: 0 3px 0 rgba(30,20,60,.12); font-weight: 800; font-size: 14px; }
.pr-path i { width: 64px; height: 8px; border-radius: 99px; background: rgba(120,130,160,.2); overflow: hidden; } .pr-path i s { display: block; height: 100%; background: linear-gradient(90deg,#ffc83d,#ff9f43); text-decoration: none; }
.np { display: inline-grid; place-items: center; width: 34px; height: 34px; } .np svg { width: 100%; height: 100%; }
.np.locked { filter: grayscale(.7) opacity(.65); }
.np.big { width: 72px; height: 72px; margin: 0 auto 4px; }
.g-stars { display: inline-flex; gap: 1px; } .g-stars i svg { width: 14px; height: 14px; } .g-stars i:not(.on) { filter: grayscale(1) opacity(.35); }
.g-stars.big { display: flex; justify-content: center; gap: 4px; margin: 4px 0; } .g-stars.big i svg { width: 34px; height: 34px; }
.g-goals { display: block; opacity: .8; } .g-goals svg { width: 11px; height: 11px; vertical-align: -1px; }
.pr-room.pulse { animation: prPulse .9s ease 3; } @keyframes prPulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255,111,159,.45); } }
.pr-unlocked { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.6); z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 28px; border-radius: 24px; background: #fff; box-shadow: 0 10px 40px rgba(40,20,80,.3); font-size: 18px; animation: prPop .45s cubic-bezier(.3,1.6,.5,1) forwards; transition: opacity .4s; }
.pr-unlocked .np { width: 96px; height: 96px; } .pr-unlocked.out { opacity: 0; }
@keyframes prPop { to { transform: translate(-50%, -50%) scale(1); } }
.pr-done b svg { width: 18px; height: 18px; vertical-align: -3px; }

/* Test bar: only on the local test address (js/main.js) */
#testBar { position: fixed; left: 50%; top: calc(6px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 99px; background: rgba(30,20,60,.82); color: #fff; font-size: 12px; }
#testBar b { padding: 0 6px; opacity: .8; }
#testBar button { border: 0; border-radius: 99px; background: rgba(255,255,255,.14); color: #ffd84d; padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; }
#testBar button[data-t] { color: #fff; font-size: 14px; padding: 2px 9px; }
#testBar button.on { background: #ffd84d; color: #3a2a00; }

/* ---------- Squish Club: gold locks, the Club teaser, Try it, and the grown-up corner ---------- */
.club-lock, .club-crown { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.modal-card h2 .club-crown { width: 26px; height: 26px; vertical-align: -4px; }
.sq-card.club { position: relative; background: linear-gradient(180deg, #fffaf0, #fff3d6); border: 1.5px solid #f3d27a; }
.sq-card.club .club-lock { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; }
.sq-card.club small { color: #a16b00; font-weight: 700; }
.club-teaser { display: flex; align-items: center; gap: 10px; width: 100%; margin: 8px 0; padding: 10px 12px; border-radius: 18px; border: 1.5px solid #f3d27a; background: linear-gradient(135deg, #fff8e1, #ffe9b0); color: #5b3b00; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 3px 0 #e9c35a; }
.club-teaser .club-crown { width: 30px; height: 30px; }
.club-teaser div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.club-teaser b { font-size: 15px; } .club-teaser small { font-size: 12px; color: #7a5600; }
.club-teaser.member { cursor: default; box-shadow: none; }
.club-row { display: flex; gap: 2px; flex: none; }
.club-row canvas { width: 34px; height: 34px; }
.club-modal .club-lead { margin: 0 0 8px; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 46dvh; overflow-y: auto; padding: 2px; }
.club-sq { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; border: 1.5px solid #f3d27a; background: #fffaf0; font: inherit; font-size: 11px; color: #1f2a44; cursor: pointer; }
.club-sq canvas { width: 56px; height: 56px; }
.club-sq b { font-size: 11px; line-height: 1.15; }
.club-sq .club-lock { position: absolute; top: 4px; right: 4px; width: 15px; height: 15px; }
.club-sq .wish-heart { position: absolute; top: 4px; left: 4px; width: 14px; height: 14px; }
.club-sq.own { background: #ecfaf3; border-color: #bfe9d3; }
.wish-heart path { fill: none; stroke: #ff5f8f; stroke-width: 2.2; }
.wish-heart.on path { fill: #ff5f8f; }
.try-stage { position: relative; display: flex; flex-direction: column; align-items: center; background: radial-gradient(circle at 50% 40%, #fff, #f1ecff); border-radius: 22px; padding: 10px 0 8px; }
.try-stage canvas { width: 180px; height: 180px; touch-action: none; cursor: pointer; }
.try-stage canvas.squish { animation: trySquish .32s ease-out; }
@keyframes trySquish { 0% { transform: scale(1, 1); } 30% { transform: scale(1.18, .78); } 60% { transform: scale(.94, 1.08); } 100% { transform: scale(1, 1); } }
.try-left { font-weight: 700; color: #6c4cf5; }
.try-label { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; color: #a16b00; margin: 10px 0 2px; }
.wish-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #ffc2d4; background: #fff4f8; color: #c2185b; border-radius: 99px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.wish-btn .wish-heart { width: 18px; height: 18px; }
.ev-card.club { background: linear-gradient(180deg, #fffaf0, #fff3d6); border-color: #f3d27a; cursor: pointer; }
.ev-card.club .ev-price { display: flex; align-items: center; gap: 4px; color: #a16b00; font-weight: 700; }
.ev-club { border: 0; border-radius: 99px; padding: 4px 12px; font: inherit; font-weight: 700; font-size: 12px; background: #ffd25a; color: #5b3b00; cursor: pointer; }
.club-card b .club-crown { width: 20px; height: 20px; }
.gu-modal { width: min(100%, 460px); text-align: left; }
.gu-modal h2 { text-align: center; font-size: 20px; }
.gu-club { border: 1.5px solid #f3d27a; background: linear-gradient(180deg, #fffaf0, #fff6e0); border-radius: 18px; padding: 12px; }
.gu-club-head, .gu-member { display: flex; gap: 10px; align-items: flex-start; }
.gu-club-head .club-crown, .gu-member .club-crown { width: 34px; height: 34px; }
.gu-club-head div, .gu-member div { display: flex; flex-direction: column; }
.gu-club-head small, .gu-member small, .gu-sec small { color: #5d6780; font-size: 13px; }
.gu-member { background: #ecfaf3; border-radius: 16px; padding: 12px; }
.club-strip { display: flex; gap: 2px; overflow-x: auto; padding: 6px 0; }
.club-strip canvas { width: 40px; height: 40px; flex: none; }
.gu-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.gu-plan { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 12px 6px; border-radius: 16px; border: 2px solid #e3d8ff; background: #fff; font: inherit; color: #1f2a44; cursor: pointer; }
.gu-plan b { font-size: 22px; } .gu-plan span { font-weight: 700; } .gu-plan small { color: #5d6780; }
.gu-plan.best { border-color: #6c4cf5; box-shadow: 0 3px 0 #b9a8ff; }
.gu-plan:disabled { opacity: .55; cursor: default; }
.gu-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee8f5; display: flex; flex-direction: column; gap: 4px; }
.gu-pack { display: flex; align-items: center; gap: 8px; }
.gu-pack > span:nth-child(2) { flex: 1; }
.gu-own { color: #1a9b6c; font-weight: 700; font-size: 13px; }
.gu-wish { display: flex; flex-direction: column; align-items: center; font-size: 10px; flex: none; width: 70px; text-align: center; overflow-wrap: anywhere; line-height: 1.15; }
.gu-sec .row-btns { display: flex; gap: 6px; }
.gu-sec input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 12px; border: 2px solid #d6dee8; user-select: text; -webkit-user-select: text; }
.gu-note { background: #fff7e0; border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.gu-modal .fine a { color: inherit; }
.ev-note { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 8px 12px; border-radius: 14px; background: linear-gradient(135deg, #fff8e1, #ffe9b0); color: #5b3b00; font-size: 13px; text-align: left; }
.ev-note .club-crown { width: 24px; height: 24px; }
.splash-thanks { display: flex; align-items: center; gap: 8px; margin: 0 auto 12px; padding: 10px 16px; max-width: min(92vw, 420px); border-radius: 18px; background: linear-gradient(135deg, #fff8e1, #ffe9b0); color: #5b3b00; font-size: 15px; box-shadow: 0 4px 0 #e9c35a; animation: modalIn .5s cubic-bezier(.2,1.5,.4,1); }
.splash-thanks .club-crown { width: 28px; height: 28px; }
.club-heart { width: 15px; height: 15px; vertical-align: -2px; flex: none; }
.club-price { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: #c2185b; font-size: 12px; }
.club-price .ic { width: 15px; height: 15px; }
.sq-card.club .club-price { color: #c2185b; }
.try-label .club-heart, .try-label .ic { width: 18px; height: 18px; }
.earn-card { margin: 12px 0 4px; padding: 10px 14px; border-radius: 16px; background: #fff7fb; border: 1.5px solid #ffd3e3; text-align: left; }
.earn-card.ready { background: #ecfaf3; border-color: #9fe0bf; }
.earn-row { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.earn-row b { font-size: 20px; } .earn-row span { color: #5d6780; font-weight: 600; }
.earn-row .ic, .earn-row .club-heart, .earn-row .club-crown { width: 22px; height: 22px; }
.earn-bar { height: 10px; border-radius: 99px; background: #f1e6ee; margin: 6px 0; overflow: hidden; }
.earn-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff9fc3, #ff5f8f); }
.earn-card.ready .earn-bar i { background: linear-gradient(90deg, #6fdc8c, #1a9b6c); }
.earn-card small { color: #5d6780; font-size: 13px; }

/* Player cards: tap a name on the leaderboard */
.board li.tap { cursor: pointer; transition: transform .1s; }
.board li.tap:active { transform: scale(.97); }
.board li.tap::after { content: '\203A'; color: var(--muted); font-size: 20px; margin-left: 2px; }
.board .club-mini svg { width: 14px; height: 14px; vertical-align: -2px; }
.board-tip { margin: -2px 0 8px; color: var(--muted); font-size: 12px; }
.me-card .row-btns { display: flex; gap: 6px; }
.modal-card.profile-card { width: min(100%, 440px); text-align: left; }
.pf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pf-fav { width: 92px; height: 92px; flex: none; background: radial-gradient(circle, #fff4fb 0%, #ffe3f1 70%); border-radius: 24px; }
.pf-name { display: block; font-size: 21px; line-height: 1.15; }
.pf-head small { display: block; color: #6b7590; font-size: 13px; margin-top: 2px; }
.pf-club { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, #ffe27a, #ffb84d); color: #6b3d00; font-weight: 700; font-size: 12px; box-shadow: 0 2px 8px rgba(255,170,40,.35); }
.pf-club svg { width: 14px; height: 14px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 8px; }
.pf-stats > div { background: #f4f1fb; border-radius: 14px; padding: 7px 4px; text-align: center; }
.pf-stats b { display: block; font-size: 17px; } .pf-stats b i { font-style: normal; font-size: 12px; color: #8a93ab; }
.pf-stats small { color: #6b7590; font-size: 11px; }
.pf-rarest { margin: 4px 0 6px; font-size: 14px; }
.pf-rarity { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: capitalize; color: #fff; background: #7aa7ff; }
.pf-rarity.r-rare { background: #4dabf7; } .pf-rarity.r-epic { background: #b26bff; } .pf-rarity.r-legendary { background: linear-gradient(135deg, #ffb84d, #ff6fae); }
.pf-stickers { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-stickers .st-ic { width: 40px; height: 40px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.pf-sq { background: #f7f5fc; border-radius: 14px; padding: 4px 2px 6px; text-align: center; }
.pf-sq canvas { width: 64px; height: 64px; display: block; margin: 0 auto; }
.pf-sq small { display: block; font-size: 10.5px; line-height: 1.15; min-height: 2.3em; }
.pf-sq .stars { font-size: 10px; }
.pf-sq.shine { background: linear-gradient(160deg, #fff7d6, #ffe6f3); box-shadow: inset 0 0 0 2px #ffd36b; }
.pf-private, .pf-me { color: #6b7590; font-size: 14px; }
.pf-cheers button { background: #f4f1fb; }
.pf-cheers button.sent { box-shadow: inset 0 0 0 3px #7ee0a6; }

/* Play on another device */
.modal.over-splash { z-index: 90; }
.have-code { margin-top: 12px; background: rgba(255,255,255,.75); color: #1f2a44; border-radius: 999px; padding: 9px 16px; font-size: 14px; box-shadow: 0 3px 10px rgba(20,40,80,.12); }
.have-code b { color: #e2558f; }
.link-card { text-align: center; }
.link-code { font-size: 46px; font-weight: 700; letter-spacing: 4px; color: #1f2a44; background: #fff4fb; border: 3px dashed #ff9cc6; border-radius: 20px; padding: 8px 12px; margin: 4px auto 10px; display: inline-block; font-variant-numeric: tabular-nums; }
.link-steps { text-align: left; margin: 0 auto 8px; padding-left: 22px; max-width: 300px; font-size: 15px; line-height: 1.5; }
.link-qr small { display: block; color: #6b7590; font-size: 13px; margin-bottom: 4px; }
.link-qr #linkQrBox svg { width: 150px; height: 150px; display: block; margin: 0 auto; }
.link-input { font-size: 38px; font-weight: 700; letter-spacing: 6px; text-align: center; width: 100%; max-width: 260px; border: 3px solid #c7b8ff; border-radius: 18px; padding: 8px; color: #1f2a44; font-variant-numeric: tabular-nums; }
.link-input:focus { outline: none; border-color: #ff7fb0; }
.link-err { color: #d6336c; font-weight: 600; font-size: 14px; }
.link-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.link-pick > div { background: #f4f1fb; border-radius: 16px; padding: 10px 6px; }
.link-pick b { display: block; font-size: 30px; } .link-pick small { display: block; color: #6b7590; font-size: 12px; } .link-pick span { font-size: 12px; color: #6b7590; }
.link-pick > div:first-child { background: #fff4fb; box-shadow: inset 0 0 0 2px #ff9cc6; }
/* Who's playing? (switch players) and My devices */
.pl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; text-align: left; }
.pl-row { display: flex; align-items: center; gap: 10px; background: #f4f1fb; border-radius: 16px; padding: 6px 8px; cursor: pointer; }
.pl-row.me { background: #fff4fb; box-shadow: inset 0 0 0 2px #ff9cc6; cursor: default; }
.pl-row canvas { width: 48px; height: 48px; flex: none; }
.pl-who { flex: 1; min-width: 0; } .pl-who b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-who small { color: #6b7590; font-size: 12px; } .pl-who i { color: #e2558f; font-style: normal; font-weight: 600; }
.pl-who .club-mini svg { width: 14px; height: 14px; vertical-align: -2px; }
.pl-x { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #fff; color: #8a93ab; font-size: 22px; line-height: 1; box-shadow: 0 1px 4px rgba(20,40,80,.15); }
.pl-x:hover, .pl-x:focus-visible { color: #d6336c; }
.pl-btns { justify-content: center; margin-bottom: 8px; }
.pl-add { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dev-list { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-bottom: 8px; }
.dev-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f4f1fb; border-radius: 14px; padding: 8px 12px; }
.dev-row small { display: block; color: #6b7590; font-size: 12px; }
.link-card .warn { color: #d6336c; }
/* Squish PIN pad: keys shuffle every time and never light up when pressed */
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 4px 0 10px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #c7b8ff; }
.pin-dots i.on { background: #7a5cff; border-color: #7a5cff; }
.pin-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 320px; margin: 0 auto 6px; }
.pin-key { background: #f4f1fb; border-radius: 16px; padding: 4px 2px 6px; display: flex; flex-direction: column; align-items: center; -webkit-tap-highlight-color: transparent; user-select: none; touch-action: manipulation; }
.pin-key, .pin-key:active, .pin-key:focus, .pin-key:hover { transform: none !important; filter: none !important; outline: none; box-shadow: none; transition: none; }
.pin-key canvas { width: 40px; height: 40px; pointer-events: none; }
.pin-key b { font-size: 20px; color: #1f2a44; line-height: 1; }
.pin-back { font-size: 24px; justify-content: center; color: #6b7590; }
.pl-hint { display: block; width: 100%; margin: 0 0 8px; padding: 9px; border-radius: 14px; background: #fff7d6; color: #6b3d00; font-size: 14px; box-shadow: inset 0 0 0 2px #ffd36b; }
.linkish { background: none; padding: 0; color: #e2558f; font-weight: 600; font-size: inherit; text-decoration: underline; }
.link-email { font-size: 18px; width: 100%; max-width: 320px; border: 3px solid #c7b8ff; border-radius: 14px; padding: 10px 12px; color: #1f2a44; }
/* Name and Friends */
.nf-crownbtn svg, .club-mini svg { width: 14px; height: 14px; vertical-align: -2px; }
.nf-card h2 svg { width: 22px; height: 22px; vertical-align: -3px; }
.nf-lead { font-size: 17px; font-weight: 600; }
.nf-list { list-style: none; padding: 0; margin: 0 0 10px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.nf-list li { background: #f4f1fb; border-radius: 14px; padding: 8px 12px; } .nf-list b { display: block; } .nf-list span { color: #6b7590; font-size: 13px; }
.nf-price b { font-size: 22px; color: #1f2a44; } .nf-price span { display: block; font-size: 13px; color: #6b7590; }
.nf-warn { background: #fff7d6; border-radius: 14px; padding: 8px 10px; font-size: 14px; }
.nf-input { text-align: center; font-weight: 600; }
.nf-locked { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: #fff7d6; border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; box-shadow: inset 0 0 0 2px #ffd36b; color: #1f2a44; }
.nf-locked svg { width: 34px; height: 34px; flex: none; } .nf-locked b { display: block; } .nf-locked small { color: #6b5a2a; font-size: 12px; }
.nf-friends li { padding-right: 6px; } .nf-friends .nm { flex: 1; } .nf-x { width: 28px; height: 28px; font-size: 18px; }
.nf-btns { margin: 4px 0 12px; }
.nf-link { word-break: break-all; font-weight: 600; }
.gu-nf .gu-owned { color: #2b8a3e; font-weight: 600; margin: 6px 0 0; } .gu-nf b svg { width: 16px; height: 16px; vertical-align: -2px; }
.me-card { flex-wrap: wrap; gap: 8px; } .me-card .row-btns { flex-wrap: wrap; }
