/* Paws Multiverse home page */
:root { --ink: #1d3557; --card: #ffffff; --teal: #2ec4b6; --muted: #6b7a90; --pink: #ff5d8f; --gold: #ffd166; --line: #e3eaf0; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Fredoka', 'Trebuchet MS', sans-serif; color: var(--ink);
  background: linear-gradient(160deg, #7b5cff 0%, #5b6ff0 45%, #2b8fe0 100%) fixed;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  overflow-x: hidden; -webkit-user-select: none; user-select: none;
}
button { font: inherit; }
.muted { color: var(--muted); font-weight: 400; }

/* ---- the sky: stars, planets, a shooting star ---- */
#sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#stars i { position: absolute; border-radius: 50%; background: #fff; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; transform: scale(.6); } }
.planet { position: absolute; border-radius: 50%; opacity: .55; animation: drift 26s ease-in-out infinite alternate; }
.planet i { position: absolute; left: -35%; right: -35%; top: 42%; height: 16%; border-radius: 50%; border: 3px solid rgba(255,255,255,.55); transform: rotate(-18deg); }
.p1 { width: 90px; height: 90px; left: 4%; top: 18%; background: radial-gradient(circle at 35% 35%, #ffd6e8, #ff5d8f); }
.p2 { width: 60px; height: 60px; right: 7%; top: 9%; background: radial-gradient(circle at 35% 35%, #fff3c4, #f4a100); animation-duration: 31s; }
.p3 { width: 40px; height: 40px; right: 16%; top: 62%; background: radial-gradient(circle at 35% 35%, #c8f7ef, #2ec4b6); animation-duration: 22s; }
.p4 { width: 120px; height: 120px; left: -30px; bottom: 6%; background: radial-gradient(circle at 35% 35%, #e3d7ff, #8f6bff); animation-duration: 37s; }
@keyframes drift { from { translate: 0 0; rotate: 0deg; } to { translate: 30px -40px; rotate: 25deg; } }
.shooting { position: absolute; top: 12%; left: -10%; width: 120px; height: 2px; background: linear-gradient(90deg, transparent, #fff); border-radius: 2px; opacity: 0; animation: shoot 11s linear infinite 3s; }
@keyframes shoot { 0%, 88% { opacity: 0; translate: 0 0; } 90% { opacity: 1; } 100% { opacity: 0; translate: 120vw 30vh; } }
@media (prefers-reduced-motion: reduce) { .planet, .shooting, #stars i, .title span, .art img, .art::before, .treat, .game, .me-pic, .me-btn, .ribbon { animation: none !important; } .floaty { display: none; } }

/* ---- top ---- */
header.top, main, section, footer, .ticker, #update { position: relative; z-index: 1; }
header.top { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; width: 100%; max-width: 980px; }
header.top img { width: 68px; height: 68px; border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: bob 3.2s ease-in-out infinite; }
.titles { flex: 1; min-width: 0; }
.title { margin: 0; color: #fff; font-size: clamp(32px, 6vw, 56px); font-weight: 700; letter-spacing: .5px; text-shadow: 0 4px 0 rgba(29,53,87,.35); line-height: 1; white-space: nowrap; }
.title span { display: inline-block; animation: wave 4s ease-in-out infinite; }
.title span:nth-child(odd) { color: #fff6d8; }
.title span:nth-child(1) { animation-delay: 0s; } .title span:nth-child(2) { animation-delay: .08s; } .title span:nth-child(3) { animation-delay: .16s; } .title span:nth-child(4) { animation-delay: .24s; }
.title span:nth-child(5) { animation-delay: .4s; } .title span:nth-child(6) { animation-delay: .48s; } .title span:nth-child(7) { animation-delay: .56s; } .title span:nth-child(8) { animation-delay: .64s; }
.title span:nth-child(9) { animation-delay: .72s; } .title span:nth-child(10) { animation-delay: .8s; } .title span:nth-child(11) { animation-delay: .88s; } .title span:nth-child(12) { animation-delay: .96s; }
.title span:nth-child(13) { animation-delay: 1.04s; } .title span:nth-child(14) { animation-delay: 1.12s; }
@keyframes wave { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -7px; } }
#tagline { margin: 6px 0 0; color: #e8ecff; font-size: 18px; transition: opacity .4s; min-height: 1.3em; }
.top-btns { display: flex; gap: 8px; }
.round { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 22px; cursor: pointer; box-shadow: 0 6px 16px rgba(20,20,80,.25); }
.badge[hidden] { display: none; }
/* the treat box wiggles when a new one has come; your avatar (top right) bobs, and nudges you to make one */
.round.treat.ready { background: #fff6dc; animation: wiggle 1.8s ease-in-out infinite; }
.me-btn { width: 58px; height: 58px; padding: 0; border: 3px solid #fff; background: radial-gradient(circle at 50% 35%, #fff6d8, #ffc2a0); }
.me-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.me-btn.new { animation: nudge 1.4s ease-in-out infinite; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--pink); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { scale: 1.15; } }

/* ---- panels ---- */
.panel { width: 100%; max-width: 980px; background: rgba(255,255,255,.95); border-radius: 26px; box-shadow: 0 12px 30px rgba(20,20,80,.3); padding: 16px 20px; margin-bottom: 22px; }
.panel h2 { margin: 0; font-size: 24px; } .panel h3 { margin: 0 0 8px; font-size: 19px; }
.btn { font-weight: 700; font-size: 17px; border: 0; border-radius: 14px; padding: 9px 18px; cursor: pointer; background: var(--teal); color: #fff; }
.btn.alt { background: #e3eaf0; color: var(--ink); } .btn.pink { background: var(--pink); } .btn.gold { background: var(--gold); color: var(--ink); }
.btn.small { font-size: 14px; padding: 6px 12px; border-radius: 11px; }
.btn:disabled { opacity: .5; cursor: default; }
a.btn { text-decoration: none; display: inline-block; }
.leave-row { text-align: right; margin: 10px 0 0; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 4px; }

/* ---- the Me window: you (your avatar, Customize, Shop, friend code, the latest wave from a friend), then tabs ---- */
.sheet { position: fixed; inset: 0; background: rgba(20,20,60,.5); display: none; align-items: center; justify-content: center; padding: 12px; z-index: 18; }
.sheet.open { display: flex; }
.sheet-box { background: #fff; border-radius: 26px; width: min(820px, 100%); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 20px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); position: relative; animation: sheet-in .3s cubic-bezier(.2,1.4,.4,1); }
@keyframes sheet-in { from { scale: .92; opacity: 0; translate: 0 20px; } }
.sheet-box .x { position: absolute; top: 12px; right: 14px; border: 0; background: #f1f4f7; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 2; }
.sheet-tabs { display: flex; gap: 8px; margin: 16px 0 14px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.sheet-tabs button { font-weight: 700; font-size: 17px; border: 0; background: none; padding: 8px 14px; border-radius: 14px 14px 0 0; cursor: pointer; color: var(--muted); margin-bottom: -2px; border-bottom: 3px solid transparent; }
.sheet-tabs button.on { color: var(--ink); border-bottom-color: var(--pink); }
.sheet-page { display: none; } .sheet-page.on { display: block; }
.sheet-page h3 { margin: 0 0 8px; font-size: 19px; } .sheet-page h2 { margin: 0; font-size: 22px; }
.sheet-page .news { margin-top: 18px; border-top: 2px dashed var(--line); padding-top: 14px; }
#ranks { margin-top: 18px; border-top: 2px dashed var(--line); padding-top: 14px; }
.gu-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 15px; color: var(--muted); border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px; margin-bottom: 12px; }
.gu-row b { color: var(--ink); font-size: 17px; } .gu-row > div:first-child { flex: 1; min-width: 220px; }
.gu-row input.vol { width: 190px; max-width: 100%; height: 32px; accent-color: #6a3fd1; cursor: pointer; } /* (the music and sound-effects volumes) */
.me { padding-right: 44px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.me-pic { flex: none; width: 92px; height: 92px; border-radius: 50%; border: 4px solid #fff; padding: 0; cursor: pointer; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff6d8, #ffc2a0); box-shadow: 0 6px 16px rgba(20,20,80,.25); animation: bob 3.2s ease-in-out infinite; }
.me-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-pic img.hop { animation: hop .6s cubic-bezier(.3,1.6,.5,1); } @keyframes hop { 40% { translate: 0 -14px; rotate: -8deg; } }
.me .who { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; } .me .who b { font-size: 21px; } .me .who span { color: var(--muted); font-size: 14px; }
.me .who .wave { color: var(--ink); background: #fff6dc; border-radius: 10px; padding: 3px 9px; align-self: flex-start; font-size: 13px; margin-top: 3px; animation: pop-in .5s cubic-bezier(.2,1.5,.4,1) both; }
.me .who .wave[hidden] { display: none; }
@keyframes pop-in { from { scale: .6; opacity: 0; } }
.bar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.me.new #b-avatar { animation: nudge 1.4s ease-in-out infinite; } @keyframes nudge { 50% { scale: 1.07; } }

.streak { display: inline-block; background: #fff0e0; color: #c25e00; border-radius: 10px; padding: 2px 8px; font-size: 13px; font-weight: 700; margin-top: 4px; }
.waiting { margin-top: 6px; font-size: 15px; color: #1a9e8f; font-weight: 600; }
@keyframes wiggle { 0%, 70%, 100% { rotate: 0deg; } 75% { rotate: -12deg; } 80% { rotate: 10deg; } 85% { rotate: -8deg; } 90% { rotate: 6deg; } }

/* ---- news ---- */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.25; }
.feed img, .mini { width: 38px; height: 38px; border-radius: 50%; background: #fff3dc; flex: none; object-fit: cover; }
.feed .when { color: var(--muted); font-size: 12px; display: block; }
.empty { color: var(--muted); font-size: 15px; }

/* ---- the town gate: the Pawville door, then a row of game tiles ---- */
main { width: 100%; max-width: 980px; margin-bottom: 14px; perspective: 900px; }
.game { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
a.game:active { scale: .98; }
a.game.launch { scale: 1.04; filter: brightness(1.1); transition: scale .3s, filter .3s; }
#warp { position: fixed; inset: 0; z-index: 50; pointer-events: none; clip-path: circle(0 at var(--x, 50%) var(--y, 50%)); opacity: 0; }
#warp.go { opacity: 1; clip-path: circle(150% at var(--x, 50%) var(--y, 50%)); transition: clip-path .42s cubic-bezier(.6,0,.9,.4); }
@keyframes bob { 50% { translate: 0 -6px; rotate: 1.5deg; } }
@keyframes card-in { from { opacity: 0; translate: 0 30px; scale: .94; } }
.floaty { position: absolute; bottom: -30px; pointer-events: none; opacity: 0; animation: float-up 6s linear infinite; z-index: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
@keyframes float-up { 0% { translate: 0 0; opacity: 0; rotate: -10deg; } 15% { opacity: .9; } 50% { translate: 12px -110px; rotate: 10deg; } 85% { opacity: .8; } 100% { translate: -6px -220px; opacity: 0; rotate: -6deg; } }
.ribbon { position: absolute; top: 18px; right: -36px; z-index: 3; rotate: 40deg; background: linear-gradient(#ffd166, #ff9f43); color: #5a2d00; font-weight: 700; font-size: 15px; letter-spacing: 1px;
  padding: 4px 44px; box-shadow: 0 3px 8px rgba(0,0,0,.25); animation: ribbon 2.4s ease-in-out infinite; }
@keyframes ribbon { 50% { filter: brightness(1.15); scale: 1.06; } }
@keyframes shine { 0%, 70% { left: -90px; } 85%, 100% { left: 110%; } }

/* the Pawville door: a real picture of the town, with its name and the big pink button on it */
.game.hero { display: block; position: relative; border-radius: 30px; overflow: hidden; box-shadow: 0 16px 40px rgba(20,20,80,.4); border: 4px solid rgba(255,255,255,.9);
  height: clamp(240px, calc(100vh - 470px), 520px); transition: transform .15s ease, box-shadow .15s ease; animation: card-in .7s cubic-bezier(.2,1.4,.4,1) backwards; }
a.game.hero:hover, a.game.hero:focus-visible { box-shadow: 0 22px 48px rgba(20,20,80,.5); outline: none; }
.hero .art { position: absolute; inset: 0; background: linear-gradient(#ffb08a, #6a7cd8); overflow: hidden; }
.hero .art img.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-in-out infinite alternate; transition: scale .25s; }
.hero .art::before { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; left: -90px; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.4), transparent); transform: skewX(-18deg); animation: shine 7s ease-in-out infinite; pointer-events: none; z-index: 1; }
.hero .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(15,10,50,.75)); z-index: 1; }
@keyframes kenburns { from { scale: 1.02; translate: 0 0; } to { scale: 1.12; translate: -2% 1%; } }
/* the weather in town right now (home.js townSky) */
.town-wx { position: absolute; top: 14px; left: 16px; z-index: 3; padding: 6px 14px; border-radius: 999px; background: rgba(15,10,50,.62); color: #fff; font-size: 16px; font-weight: 700; }
.town-wx.big { background: rgba(150,30,50,.85); } .town-wx[hidden] { display: none; }
body.spooky .town-wx { left: 72px; } /* (clear of the pumpkin perched on the door's corner) */
.gate-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 26px 22px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 20px; color: #fff; }
.gate-text h2 { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1; text-shadow: 0 4px 0 rgba(20,10,60,.5); flex-basis: 100%; }
.gate-text p { margin: 0; font-size: 18px; font-weight: 600; text-shadow: 0 2px 4px rgba(0,0,0,.6); flex: 1; min-width: 220px; }
.hero .play { flex: none; font-weight: 700; font-size: 26px; color: #fff; padding: 12px 34px; border-radius: 18px; background: linear-gradient(#ff8fb8, #ff5d8f); box-shadow: 0 5px 0 #c93a6a, 0 8px 20px rgba(0,0,0,.3); animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { scale: 1.07; } }

/* every game as one tile: its icon and name (and gifts waiting, a prize to spin, friends who play) */
.quick-head { margin: 18px 0 10px; color: #fff; font-size: 19px; text-shadow: 0 2px 0 rgba(29,53,87,.3); }
.quick { --n: 11; --gap: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.quick > .tile { flex: 0 0 calc((100% - (var(--n) - 1) * var(--gap)) / var(--n)); min-width: 0; }
/* eleven games (Big Wave Island joined 2026-10-27): one row on a laptop and an iPad held sideways, 6 + 5 on an iPad
   held upright or a phone held sideways, 4 + 4 + 3 on a phone held upright */
@media (max-width: 1100px) { .quick { --n: 6; } }
@media (max-width: 520px) { .quick { --n: 4; } }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.25); border-radius: 22px; padding: 10px 6px 8px; transition: background .15s, translate .15s;
  animation: card-in .6s cubic-bezier(.2,1.4,.4,1) backwards; }
.tile:nth-child(2) { animation-delay: .05s; } .tile:nth-child(3) { animation-delay: .1s; } .tile:nth-child(4) { animation-delay: .15s; } .tile:nth-child(5) { animation-delay: .2s; } .tile:nth-child(6) { animation-delay: .25s; } .tile:nth-child(7) { animation-delay: .3s; } .tile:nth-child(8) { animation-delay: .35s; } .tile:nth-child(9) { animation-delay: .4s; } .tile:nth-child(10) { animation-delay: .45s; } .tile:nth-child(11) { animation-delay: .5s; }
@media (hover: hover) { a.tile:hover { background: rgba(255,255,255,.28); translate: 0 -4px; } a.tile:hover .art img { scale: 1.08; rotate: -3deg; } }
.tile .art { position: relative; width: 100%; max-width: 86px; aspect-ratio: 1; border-radius: 22px; }
.tile .art img { width: 100%; height: 100%; border-radius: 22px; box-shadow: 0 6px 14px rgba(0,0,0,.25); display: block; transition: scale .2s, rotate .2s; }
.tile b { color: #fff; font-size: 15px; line-height: 1.15; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.tile .new { position: absolute; top: -6px; right: -8px; background: linear-gradient(#ffd166, #ff9f43); color: #5a2d00; font-weight: 700; font-size: 12px; padding: 2px 7px; border-radius: 9px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
/* NEW only in a game's first two weeks (home.js freshBadges); the dot on the Pawville door: town news you haven't read
   there yet, like Pawville's own red dot on 📰 (home.js townNewsDot) */
.tile .new[hidden], .ribbon[hidden], .news-dot[hidden] { display: none; }
.hero .play { position: relative; }
.news-dot { position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; border-radius: 50%; background: #ff3d5a; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.tchips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; min-height: 0; }
.tchips:empty { display: none; }
.tchips span { background: rgba(255,255,255,.92); border-radius: 9px; padding: 1px 7px; font-size: 13px; font-weight: 700; }
.tchips span.gift { background: var(--gold); }
.splash .art { background: linear-gradient(#8fd8ff, #2b8fe0); } .smoothie .art { background: linear-gradient(#ffd6e8, #ff8fb8); } .raid .art { background: linear-gradient(#ffc2b0, #e63946); } .quiz .art { background: linear-gradient(#c9b8ff, #3b2a8f); } .derby .art { background: linear-gradient(#ffe08a, #ff7a3d); }
.wrongpaw .art { background: linear-gradient(#7fa88a, #1b2a20); } .brgr .art { background: linear-gradient(#ffb0a0, #c62f2f); } .lava .art { background: linear-gradient(#ffb02a, #5b1a3a); } .surf .art { background: linear-gradient(#5ec8ff, #0b5f8f); } .volley .art { background: linear-gradient(#8fdcff, #f2c46f); } .studio .art { background: linear-gradient(#d9c2ff, #4a2f7a); }

/* friend news, one line at a time (tap it for the rest, in the Me window) */
.ticker { width: 100%; max-width: 980px; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; text-align: left; font: inherit; font-size: 16px; color: var(--ink);
  background: rgba(255,255,255,.92); border-radius: 18px; padding: 8px 14px; margin-bottom: 18px; box-shadow: 0 8px 20px rgba(20,20,80,.25); transition: opacity .35s, translate .35s; }
.ticker[hidden] { display: none; }
.ticker.out { opacity: 0; translate: 0 6px; }
.ticker img { width: 34px; height: 34px; border-radius: 50%; background: #fff3dc; flex: none; object-fit: cover; }
.ticker span:first-of-type { flex: 1; } .ticker .when { color: var(--muted); font-size: 13px; flex: none; }

/* ---- friends ---- */
.sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.status { font-size: 13px; color: var(--muted); }
.status.on::before { content: '● '; color: #2ec4b6; } .status.off::before { content: '● '; color: #c9d2e0; }
.me-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #f5f8fb; border-radius: 16px; padding: 10px 14px; margin-bottom: 12px; }
.me-line .code { font-size: 22px; font-weight: 700; letter-spacing: 1px; color: #7b5cff; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.add-row input, .field { font: inherit; font-size: 18px; border: 2px solid var(--line); border-radius: 12px; padding: 7px 12px; text-transform: uppercase; width: 180px; }
.field { text-transform: none; width: 100%; }
.msg { font-size: 14px; min-height: 1.2em; margin: -4px 0 8px; } .msg.bad { color: #e63946; } .msg.good { color: #1a9e8f; }
.flist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
/* friend requests (in Paws Friends and the mailbox) */
.requests { border: 2px solid var(--teal); background: #f0fbf9; border-radius: 16px; padding: 10px 12px; margin: 8px 0 12px; }
.requests > b { display: block; font-size: 17px; } .requests .muted { margin: 2px 0 6px; font-size: 14px; }
.req { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.req .mini { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff6d8, #ffd6a5); }
.req .nm { flex: 1; min-width: 120px; font-weight: 600; } .req .nm small { display: block; font-weight: 400; color: var(--muted, #6b7a90); font-size: 13px; }
.asked { font-size: 14px; margin: 4px 0 10px; }
.fcard { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; text-align: center; transition: translate .15s; }
@media (hover: hover) { .fcard:hover { translate: 0 -3px; border-color: var(--teal); } }
.fcard img { width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff6d8, #ffd6a5); }
.fcard b { font-size: 15px; } .fcard .seen { font-size: 12px; color: var(--muted); } .fcard .seen.now { color: #1a9e8f; font-weight: 700; }
.fcard .icons { font-size: 13px; color: var(--muted); }
.join-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.join-card .big { font-size: 54px; }
.join-card p { margin: 4px 0 10px; color: var(--muted); max-width: 520px; }

/* ---- rankings and trophies ---- */
.tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; } /* (snug, so all ten game tabs fit one row on an iPad: 745 of 776 px, measured with Fredoka in headless Chrome) */
.tabs button { border: 2px solid var(--line); background: #fff; border-radius: 11px; padding: 4px 6px; font-size: 13px; cursor: pointer; font-weight: 600; }
.tabs button.on { border-color: var(--teal); background: #e6f8f6; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 12px; }
.rank li.me { background: #fff0f5; }
.rank .pos { width: 28px; text-align: center; font-weight: 700; font-size: 18px; }
.rank .nm { flex: 1; font-weight: 600; } .rank .sc { color: var(--muted); font-size: 14px; text-align: right; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.trophy { text-align: center; border-radius: 14px; padding: 6px 2px; background: #fffaf0; cursor: pointer; position: relative; }
.trophy .e { font-size: 30px; display: block; } .trophy span { font-size: 11px; line-height: 1.1; display: block; }
.trophy.picked { outline: 3px solid #ffd166; } .trophy-how { font-size: 14px; margin: 0 -2px 8px; padding: 6px 4px; min-height: 1.3em; position: sticky; top: -20px; z-index: 1; background: #fff; } /* (stays in view while the shelf scrolls: on an upright phone it was below the screen) */
.trophy.locked { background: #f1f4f7; } .trophy.locked .e { filter: grayscale(1); opacity: .35; } .trophy.locked span { color: #9aa6b5; }

/* ---- backup ---- */
.cloud { margin-top: 4px; font-size: 13px; color: #1a9e8f; }
.bk-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-btns button, .bk-btns .alt-btn { font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 12px; padding: 9px 16px; cursor: pointer; background: var(--teal); color: #fff; }
.bk-btns .alt-btn { background: #e3eaf0; color: var(--ink); }
#update { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); translate: -50% 0; width: max-content; max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 10px 14px 10px 18px; border-radius: 16px; z-index: 30; box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; gap: 12px; align-items: center; white-space: nowrap; }
#update[hidden] { display: none; }
#update button { font: inherit; font-weight: 700; border: 0; background: var(--gold); color: var(--ink); border-radius: 10px; padding: 6px 12px; cursor: pointer; }
footer { margin-top: 4px; color: #e8ecff; font-size: 14px; text-align: center; }
footer a { color: #fff; display: inline-block; padding: 12px 2px; } /* (tall enough to tap) */
.version { margin-top: 6px; font-size: 11px; opacity: 0.7; letter-spacing: 0.3px; }

/* ---- windows ---- */
.modal { position: fixed; inset: 0; background: rgba(20,20,60,.5); display: none; align-items: center; justify-content: center; padding: 12px; z-index: 20; }
.modal.open { display: flex; }
.modal .box { background: #fff; border-radius: 24px; width: min(560px, 100%); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 20px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); position: relative; }
.modal .box h2 { margin: 0 0 6px; }
.modal .x { position: absolute; top: 10px; right: 12px; border: 0; background: #f1f4f7; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 2; } /* (over the treat box's big 💵, which used to catch the taps) */
.fhead { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.fhead img { width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff6d8, #ffd6a5); }
.fhead b { font-size: 24px; display: block; }
.rename { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .rename .link { padding: 0; color: #5b6ff0; }
.rename .field { width: 180px; font-size: 16px; padding: 5px 10px; } .rename .note { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.gstat { display: flex; gap: 10px; align-items: center; border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; margin: 6px 0; flex-wrap: wrap; }
.gstat .ic { font-size: 26px; } .gstat .t { flex: 1; min-width: 160px; } .gstat .t b { display: block; } .gstat .t span { font-size: 14px; color: var(--muted); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.grid-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.grid-pick button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 6px; cursor: pointer; font-size: 15px; font-weight: 600; }
@media (hover: hover) { .grid-pick button:hover { border-color: var(--teal); } }
.grid-pick button small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.mail { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.mail li { display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 8px; background: #f7f9fb; }
.mail li.new { background: #fff6dc; }
.mail .t { flex: 1; font-size: 15px; } .mail .when { display: block; font-size: 12px; color: var(--muted); }
.nickrow { display: flex; flex-wrap: wrap; gap: 6px; max-height: 118px; overflow-y: auto; padding: 4px 2px; margin-bottom: 8px; border-bottom: 2px dashed var(--line); }
.nickrow button { flex: none; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 5px 10px; cursor: pointer; font-weight: 600; font-size: 15px; }
.nickrow button.on { border-color: var(--pink); background: #fff0f5; }
.nick-preview { font-size: 30px; font-weight: 700; color: #7b5cff; text-align: center; margin: 8px 0; }
.nick-preview.no { color: #8a94a6; } /* (a nickname that isn't allowed: "Pick another one") */
.note { font-size: 13px; color: var(--muted); background: #f5f8fb; border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.note a { display: inline-block; padding: 7px 0; margin: -7px 0; } /* (a finger-sized tap, 30 px tall, without moving the words around it) */
.words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; -webkit-user-select: text; user-select: text; } /* (a grown-up can select and copy them) */
.words span { background: #f3ecff; color: #5b3fd1; font-weight: 700; font-size: 20px; padding: 6px 12px; border-radius: 12px; }
.reveal { text-align: center; } .reveal .big { font-size: 84px; display: block; animation: pop-in .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop-in { from { scale: 0; rotate: -30deg; } to { scale: 1; rotate: 0deg; } }
.shaking { animation: shake .5s ease-in-out 2; } @keyframes shake { 25% { rotate: -14deg; } 75% { rotate: 14deg; } }

input { -webkit-user-select: text; user-select: text; }
/* (a phone on its side: the top of the Me window smaller, so its tabs and friends fit on the first screen) */
@media (max-height: 520px) and (min-width: 521px) {
  .sheet-box { padding: 14px 18px; } .me { gap: 10px; } .me-pic { width: 60px; height: 60px; border-width: 3px; }
  .me .who b { font-size: 18px; } .bar-btns .btn { font-size: 15px; padding: 7px 14px; }
  .sheet-tabs { margin: 10px 0 10px; } .sheet-tabs button { font-size: 16px; padding: 6px 12px; }
  /* (and the windows' main buttons on the first screen: Join! under the nickname rows, every key of the admin PIN pad) */
  .modal .box { padding: 14px 18px; }
  .nickrow { max-height: 66px; } .nick-preview { font-size: 22px; margin: 2px 0; }
  .modal .pin-dots { margin: 8px 0 4px; } .modal .pin-pad { grid-template-columns: repeat(3, 64px); gap: 6px; margin: 6px 0; } .modal .pin-pad button { height: 46px; font-size: 22px; } /* (.modal: the pad's own rules come later in this file) */
}
@media (max-width: 520px) {
  header.top { gap: 10px; } header.top img { width: 48px; height: 48px; border-radius: 13px; } .title { font-size: clamp(16px, 4.7vw, 27px); white-space: nowrap; letter-spacing: 0; } /* (one line: it broke as "Paws Multi / verse" between letters) */ #tagline { font-size: 15px; }
  .round { width: 40px; height: 40px; font-size: 18px; } .top-btns { gap: 6px; }
  .me-btn { width: 46px; height: 46px; } .top-btns { flex-direction: row; }
  .gate-text { padding: 0 16px 16px; } .gate-text p { font-size: 15px; } .hero .play { font-size: 21px; padding: 10px 24px; }
  .tile b { font-size: 11.5px; } .tile { padding: 7px 3px 6px; border-radius: 16px; gap: 4px; } .quick { --gap: 6px; } .tile .art, .tile .art img { border-radius: 16px; }
  .panel { padding: 14px 16px; } .me-pic { width: 76px; height: 76px; } .sheet-box { padding: 16px 14px; } .sheet-tabs button { font-size: 15px; padding: 8px 8px; }
}

/* ---- admin mode: the PIN pad, and the admin panel (beta games) ---- */
#logo { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 14px 0 6px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--ink); }
.pin-dots i.on { background: var(--ink); }
.pin-dots.shake { animation: pin-shake .4s; }
@keyframes pin-shake { 20%, 60% { translate: -10px 0; } 40%, 80% { translate: 10px 0; } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 74px); gap: 10px; justify-content: center; margin: 10px 0; }
.pin-pad button { height: 64px; font: inherit; font-size: 26px; font-weight: 700; border: 2px solid var(--line); background: #fff; border-radius: 18px; cursor: pointer; color: var(--ink); }
.pin-pad button:active { background: #e6f8f6; border-color: var(--teal); }
.pin-pad button:disabled { opacity: .4; }
.pin-pad .blank { visibility: hidden; }
#pin-msg { text-align: center; margin: 0; }
.admin { border: 3px solid #e63946; }
.admin .status.on::before { color: #e63946; }
.admin p { margin: 0 0 10px; color: var(--muted); }
.admin h3 { margin-top: 6px; }
.beta-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 12px; }
.beta { display: flex; gap: 12px; align-items: center; border: 2px solid var(--line); border-radius: 18px; padding: 10px 12px; text-decoration: none; color: inherit; background: #fff; }
@media (hover: hover) { .beta:hover { border-color: var(--teal); } }
.beta .e { font-size: 38px; line-height: 1; } .beta b { display: block; font-size: 17px; } .beta span { color: var(--muted); font-size: 13px; }
.beta-list .empty { grid-column: 1 / -1; }

/* ---- Spooky Season (home/spooky.js): a Halloween night, a big orange moon, bats, ghosts, jack-o'-lanterns ---- */
body.spooky { background: linear-gradient(170deg, #1a0f3a 0%, #3b1d6e 45%, #8a3d7a 80%, #e0773a 100%) fixed; }
body.spooky .planet { opacity: .25; }
body.spooky .title span:nth-child(odd) { color: #ffb347; } body.spooky .title span:nth-child(even) { color: #e6c8ff; }
body.spooky .title { text-shadow: 0 4px 0 rgba(20,0,40,.5), 0 0 22px rgba(255,140,40,.45); }
.sp-moon { position: absolute; right: 9%; top: 6%; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fff3c4, #ffc35a 55%, #f08a24); box-shadow: 0 0 60px 18px rgba(255,170,60,.45), 0 0 140px 40px rgba(255,120,40,.2); animation: moon 9s ease-in-out infinite alternate; }
.sp-moon i { position: absolute; border-radius: 50%; background: rgba(200,110,30,.35); }
.sp-moon i:nth-child(1) { width: 30px; height: 30px; left: 30%; top: 26%; } .sp-moon i:nth-child(2) { width: 18px; height: 18px; left: 60%; top: 56%; } .sp-moon i:nth-child(3) { width: 12px; height: 12px; left: 36%; top: 66%; }
@keyframes moon { to { box-shadow: 0 0 80px 26px rgba(255,170,60,.55), 0 0 170px 60px rgba(255,120,40,.25); } }
.sp-web { position: fixed; top: 0; width: 150px; height: 150px; z-index: 0; pointer-events: none; opacity: .8; }
.sp-web.left { left: 0; } .sp-web.right { right: 0; transform: scaleX(-1); }
.sp-web svg { width: 100%; height: 100%; overflow: visible; } .sp-web text { animation: dangle 4s ease-in-out infinite; }
@keyframes dangle { 50% { translate: 0 14px; } }
.sp-fog { position: fixed; left: 0; right: 0; bottom: 0; height: 160px; pointer-events: none; z-index: 0; overflow: hidden; }
.sp-fog i { position: absolute; bottom: -40px; width: 140%; height: 160px; background: radial-gradient(ellipse at center, rgba(230,220,255,.28), transparent 70%); animation: fog 26s ease-in-out infinite alternate; }
.sp-fog i:nth-child(2) { left: -40%; animation-duration: 34s; animation-direction: alternate-reverse; opacity: .7; }
@keyframes fog { from { translate: -10% 0; } to { translate: 20% -10px; } }
.sp-lanterns { position: relative; z-index: 2; display: flex; gap: 10px; justify-content: center; align-items: center; margin: -8px 0 12px; width: 100%; max-width: 980px; }
.sp-pumpkin { background: none; border: 0; padding: 0; font-size: 34px; cursor: pointer; animation: flicker 3s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(255,150,40,.7)); }
.sp-pumpkin:nth-child(even) { translate: 0 6px; }
.sp-pumpkin { position: relative; }
.sp-pumpkin.lit { animation: pk-bounce .9s ease-out; animation-delay: 0s !important; filter: drop-shadow(0 0 22px rgba(255,200,60,1)) brightness(1.3); }
/* (delay 0, over each pumpkin's own random one for the flicker, home/spooky.js: that sent the tap's 0.7 s wobble up to 3 s
   into the past, already over, so a tap mostly did nothing, Hazel's play-test 2026-10-24) */
/* (tapped: squash, a big hop with a wiggle, a bounce on landing; and a little "hee hee!" floating up) */
@keyframes pk-bounce { 0% { translate: 0 0; scale: 1 1; } 12% { translate: 0 4px; scale: 1.25 .75; } 35% { translate: 0 -34px; scale: .9 1.15; rotate: -14deg; } 55% { translate: 0 -30px; rotate: 12deg; }
  72% { translate: 0 0; scale: 1.2 .8; rotate: 0deg; } 84% { translate: 0 -9px; scale: .95 1.05; } 100% { translate: 0 0; scale: 1 1; } }
.sp-hee { position: absolute; left: 50%; bottom: 100%; translate: -50% 0; white-space: nowrap; pointer-events: none; font: 700 17px Fredoka, sans-serif; color: #ffcf8a; background: rgba(40,10,70,.88); border: 2px solid rgba(255,160,60,.6); border-radius: 12px; padding: 1px 9px; z-index: 3; /* (a bubble: over the orange title, bare words were hard to read) */
  animation: hee 1.3s ease-out forwards; }
@keyframes hee { 0% { opacity: 0; translate: -50% 6px; scale: .6; } 20% { opacity: 1; scale: 1.1; } 80% { opacity: 1; } 100% { opacity: 0; translate: -50% -34px; scale: 1; } }
@keyframes flicker { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255,150,40,.6)); } 45% { filter: drop-shadow(0 0 14px rgba(255,170,60,.95)); } 50% { filter: drop-shadow(0 0 4px rgba(255,140,40,.4)); } }
.sp-count { position: relative; z-index: 2; margin: 0 8px; white-space: nowrap; background: rgba(20,0,40,.55); color: #ffcf8a; font-weight: 700; font-size: 17px; padding: 6px 16px; border-radius: 14px; border: 2px solid rgba(255,160,60,.5); }
.sp-perch { position: absolute; top: 8px; left: 10px; font-size: 30px; z-index: 3; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); animation: bob 3s ease-in-out infinite; pointer-events: none; }
.hero .sp-perch { top: 12px; bottom: auto; left: 16px; font-size: 40px; }
.sp-spider { position: absolute; right: 14%; top: 0; z-index: 3; font-size: 26px; display: flex; flex-direction: column; align-items: center; animation: spider 6s ease-in-out infinite; pointer-events: none; }
.sp-spider i { display: block; width: 1.5px; height: 60px; background: rgba(255,255,255,.75); }
@keyframes spider { 0%, 100% { translate: 0 -40px; } 50% { translate: 0 20px; } }
.sp-bat { position: fixed; left: -60px; z-index: 16; font-size: 30px; pointer-events: none; animation: bat-fly 9s linear forwards; }
.sp-bat.rtl { left: auto; right: -60px; animation-name: bat-fly-rtl; }
@keyframes bat-fly { 0% { translate: 0 0; scale: 1 1; } 10% { scale: 1 .6; } 20% { scale: 1 1; } 30% { scale: 1 .6; } 40% { scale: 1 1; } 50% { translate: 55vw -30px; scale: 1 .6; } 60% { scale: 1 1; } 70% { scale: 1 .6; } 80% { scale: 1 1; } 100% { translate: 112vw 20px; scale: 1 .6; } }
@keyframes bat-fly-rtl { 0% { translate: 0 0; } 25% { scale: 1 .6; } 50% { translate: -55vw 30px; scale: 1 1; } 75% { scale: 1 .6; } 100% { translate: -112vw -10px; scale: 1 1; } }
.sp-witch { position: fixed; z-index: 0; right: -80px; top: 10%; font-size: 40px; pointer-events: none; animation: witch 9s linear forwards; }
.sp-witch b { font-weight: 400; margin-left: -20px; display: inline-block; rotate: -30deg; }
@keyframes witch { 0% { translate: 0 0; rotate: -6deg; } 50% { translate: -55vw 30px; rotate: 4deg; } 100% { translate: -115vw -20px; rotate: -6deg; } }
.sp-ghost { position: fixed; bottom: -70px; z-index: 15; font-size: 44px; background: none; border: 0; padding: 0; cursor: pointer; opacity: .85; animation: ghost-up 18s ease-in-out forwards; }
.sp-ghost.boo { font-size: 26px; font-weight: 700; color: #fff; text-shadow: 0 0 10px #b04aff, 0 3px 0 #3b1d6e; animation: boo .7s ease-out forwards !important; }
@keyframes ghost-up { 0% { translate: 0 0; } 25% { translate: 30px -28vh; } 50% { translate: -20px -56vh; } 75% { translate: 25px -84vh; } 100% { translate: 0 -118vh; } }
@keyframes boo { to { scale: 2; opacity: 0; } }
.sp-candy { position: fixed; z-index: 60; font-size: 22px; pointer-events: none; animation: candy 1.3s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes candy { 60% { translate: var(--dx) var(--dy); } 100% { translate: var(--dx) calc(var(--dy) + 160px); opacity: 0; rotate: 200deg; } }
@media (max-width: 600px) { .sp-moon { width: 90px; height: 90px; } .sp-lanterns .sp-pumpkin { font-size: 26px; min-width: 30px; } .sp-lanterns { gap: 4px; } .sp-web { width: 90px; height: 90px; }
  .sp-count { font-size: 15px; margin: 0 4px; padding: 5px 10px; } .sp-lanterns > :is(:nth-child(1), :nth-child(2), :nth-child(8), :nth-child(9), :nth-child(10)) { display: none; } } /* (phones: two pumpkins each side of the countdown, which is the 5th of the row: home/spooky.js. It was 2 and 3, the last one at the edge) */
@media (prefers-reduced-motion: reduce) { .sp-moon, .sp-pumpkin, .sp-hee, .sp-perch, .sp-spider, .sp-fog i, .sp-web text, .hero .play, .hero .art img.shot, .tile { animation: none !important; } }
/* (the bats and ghosts fly under the windows, and keep out of the way while one is open, so they never cover a button) */
body:has(.modal.open) :is(.sp-ghost, .sp-bat, .sp-witch), body:has(#av-modal.open) :is(.sp-ghost, .sp-bat, .sp-witch), body:has(.sheet.open) :is(.sp-ghost, .sp-bat, .sp-witch) { display: none; }
/* a seasonal event on now (Dylan's Halloween event): points and the next prize */
.event-meter { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 10px 14px; border-radius: 20px; text-decoration: none; color: #2b1a12;
  background: linear-gradient(135deg, #fff1df, #f2e6ff); box-shadow: inset 0 0 0 3px #ff8a1a, 0 6px 18px rgba(29, 53, 87, .18); }
.event-meter[hidden] { display: none; }
.event-meter .em-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.event-meter b { font-size: 18px; }
.event-meter .em-bar { height: 12px; border-radius: 99px; background: #ead8c4; overflow: hidden; }
.event-meter .em-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff8a1a, #9b5de5); }
.event-meter .em-sub { font-size: 14px; color: #6a4a2a; }
.event-meter .em-go { font-weight: 700; color: #fff; background: #ff8a1a; border-radius: 99px; padding: 8px 14px; white-space: nowrap; }
@media (max-width: 480px) { .event-meter .em-go { display: none; } }
