:root { --ink: #1c2434; --cream: #fff6e3; --red: #d83a34; --gold: #FFC93C; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #6ec3f0; color: var(--ink);
  font-family: Fredoka, "Trebuchet MS", system-ui, sans-serif; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none; touch-action: manipulation; }
canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }

.corner { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: flex; gap: 10px; z-index: 5; }
.round { width: 52px; height: 52px; border-radius: 50%; border: 4px solid var(--ink); background: var(--cream);
  font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 4px 0 var(--ink); padding: 0; }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.round { display: grid; place-items: center; }
.round .ri { width: 28px; height: 28px; fill: var(--ink); stroke: var(--ink); }
.round .ri .wv { fill: none; }
.round .ri .slash { display: none; stroke: var(--red); }
.round.muted .ri .wv { display: none; }
.round.muted .ri .slash { display: block; }

.card-wrap { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; z-index: 4; pointer-events: none; }
.card-wrap[hidden] { display: none; }
.card { pointer-events: auto; background: var(--cream); border: 5px solid var(--ink); border-radius: 28px;
  box-shadow: 0 8px 0 var(--ink); padding: 22px 26px 24px; max-width: 460px; width: 100%; text-align: center;
  animation: pop-in .35s cubic-bezier(.2,1.6,.4,1); }
.card.small { max-width: 340px; }
@keyframes pop-in { from { transform: scale(.6) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }

.logo { margin: 0; font-size: clamp(44px, 12vw, 68px); line-height: .95; letter-spacing: 1px; color: var(--red);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); transform: rotate(-3deg); }
.logo span { display: block; color: var(--gold); font-size: .62em; }
.tag { font-size: 18px; font-weight: 500; margin: 16px 0 16px; }
.diff { display: inline-flex; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 3px; gap: 2px; margin: 0 0 4px; }
.diff button { font: 600 17px Fredoka, sans-serif; color: var(--ink); background: none; border: 0; border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.diff button.on { background: var(--gold); box-shadow: inset 0 -3px 0 rgba(28,36,52,.25); }
.diff button:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; }
.diffdesc { font-size: 14px; margin: 0 0 14px; opacity: .75; min-height: 1em; }
.how { font-size: 15px; margin: 14px 0 0; opacity: .8; }
.best { font-size: 18px; font-weight: 700; margin: 8px 0 0; min-height: 1em; }

.big { font: 700 26px Fredoka, sans-serif; color: #fff; background: var(--red); border: 4px solid var(--ink); border-radius: 999px;
  padding: 12px 34px; cursor: pointer; box-shadow: 0 6px 0 var(--ink); }
.big:hover { filter: brightness(1.06); }
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.big:focus-visible, .round:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }

h2 { margin: 0 0 12px; font-size: clamp(34px, 9vw, 46px); color: var(--red); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.stats { display: flex; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.stats div { flex: 1; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 6px 4px; }
.stats .n { display: block; font-size: 36px; font-weight: 700; }
.stats .l { display: block; font-size: 14px; opacity: .75; }
.newbest { margin: 6px 0; font-size: 24px; font-weight: 700; color: var(--ink); background: var(--gold); border-radius: 999px; padding: 4px 10px;
  animation: wiggle .6s ease-in-out infinite alternate; }
.newbest[hidden] { display: none; }
@keyframes wiggle { from { transform: rotate(-3deg) scale(1); } to { transform: rotate(3deg) scale(1.06); } }
.quip { font-size: 18px; margin: 8px 0 16px; min-height: 1.2em; }
/* Rocko's World Arena line on the game-over card (opt-in leaderboard; arena.js) */
.arena { margin: -6px auto 14px; max-width: 420px; font-size: 15px; font-weight: 700; background: rgba(28,36,52,.08);
  border: 2px dashed rgba(28,36,52,.35); border-radius: 14px; padding: 7px 12px; line-height: 1.35; }
.arena[hidden] { display: none; }
.arena a, .arena button { color: #1f6fd6; font: inherit; font-weight: 800; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.arena .off { color: inherit; opacity: .55; font-size: 12px; text-decoration: none; margin-left: 6px; }

@media (prefers-reduced-motion: reduce) { .card, .newbest { animation: none; } }

/* ===================================================================== the Worlds gallery */
.worlds-btn { display: block; margin: 12px auto 0; font: 700 18px Fredoka, sans-serif; color: var(--ink); background: var(--gold);
  border: 3px solid var(--ink); border-radius: 999px; padding: 7px 20px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.worlds-btn:hover { filter: brightness(1.05); transform: rotate(-2deg); }
.worlds-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.worlds-btn:focus-visible { outline: 4px solid var(--red); outline-offset: 3px; }

#gallery { position: fixed; inset: 0; z-index: 10; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at 20% 10%, rgba(255,201,60,.18), transparent 40%), radial-gradient(circle at 85% 30%, rgba(255,122,182,.16), transparent 45%),
    radial-gradient(rgba(255,255,255,.5) 1.2px, transparent 1.6px) 0 0 / 38px 38px, #1c2434;
  padding: 0 16px 40px; }
#gallery[hidden], #lightbox[hidden] { display: none; }
.gal-top { position: sticky; top: 0; z-index: 2; text-align: center; padding: max(14px, env(safe-area-inset-top)) 64px 12px;
  background: linear-gradient(#1c2434 70%, rgba(28,36,52,0)); }
.gal-top h2 { margin: 0; color: var(--gold); -webkit-text-stroke: 2px var(--ink); font-size: clamp(30px, 7vw, 50px); line-height: 1; transform: rotate(-2deg); text-shadow: 0 4px 0 var(--red); }
.gal-top h2 span { display: block; font-size: .5em; color: #fff; text-shadow: none; -webkit-text-stroke: 0; }
.gal-top p { margin: 8px 0 0; color: #fff; opacity: .85; font-size: 16px; }
#galClose { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 4px; }
.gal-grid { max-width: 1180px; margin: 0 auto; }
.gal-h { color: #fff; font-size: 26px; margin: 26px 4px 12px; }
.gal-h small { font-size: 15px; background: var(--red); border: 2px solid #fff; border-radius: 999px; padding: 1px 9px; vertical-align: middle; }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
@media (max-width: 460px) { .tickets { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.ticket { position: relative; padding: 7px 7px 0; background: var(--cream); border: 4px solid var(--ink); border-radius: 16px; cursor: pointer;
  box-shadow: 0 6px 0 var(--ink); transform: rotate(var(--tilt, 0deg)); transition: transform .15s cubic-bezier(.2,1.6,.4,1); font: inherit; color: var(--ink); text-align: center; }
.ticket:hover, .ticket:focus-visible { transform: rotate(0) scale(1.05) translateY(-4px); z-index: 1; }
.ticket:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.t-shot { aspect-ratio: 1.75; border-radius: 9px; overflow: hidden; border: 3px solid var(--ink); background: #7EC8FF; }
.t-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-name { display: block; position: relative; margin: 8px -7px 0; padding: 8px 10px 10px; border-top: 3px dashed rgba(28,36,52,.35); font-weight: 700; font-size: 16px; line-height: 1.15; }
/* the ticket's punched notches */
.t-name::before, .t-name::after { content: ""; position: absolute; top: -12px; width: 20px; height: 20px; border-radius: 50%; background: #1c2434; border: 4px solid var(--ink); }
.t-name::before { left: -14px; } .t-name::after { right: -14px; }

/* a world still waiting for its painting */
.ph { position: relative; width: 100%; height: 100%; overflow: hidden; }
.ph-e { position: absolute; font-size: 30px; animation: ph-bob 3s ease-in-out infinite; }
.ph-e:nth-child(1) { left: 12%; top: 16%; } .ph-e:nth-child(2) { left: 58%; top: 8%; } .ph-e:nth-child(3) { left: 38%; top: 40%; }
.ph-e:nth-child(4) { left: 78%; top: 38%; } .ph-e:nth-child(5) { left: 22%; top: 50%; }
.ph.ph-big .ph-e { font-size: clamp(40px, 8vw, 92px); }
@keyframes ph-bob { 50% { transform: translateY(-8px) rotate(8deg); } }
.ph-soon { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%) rotate(-2deg); white-space: nowrap; font-size: 11px; font-weight: 700;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px; }
.ph.ph-big .ph-soon { font-size: clamp(13px, 2vw, 18px); padding: 4px 14px; border-width: 3px; }

/* ===================================================================== the lightbox */
#lightbox { position: fixed; inset: 0; z-index: 12; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #3a2f78, #120f2e 70%); }
.lb-rays { position: absolute; left: 50%; top: 45%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax;
  background: repeating-conic-gradient(rgba(255,201,60,.16) 0 9deg, rgba(255,201,60,0) 9deg 18deg); animation: rays 40s linear infinite; }
@keyframes rays { to { transform: rotate(360deg); } }
.lb-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 12px; }
.lb-sign { position: relative; z-index: 3; text-align: center; background: var(--red); color: #fff; border: 5px solid var(--gold); outline: 4px solid var(--ink);
  border-radius: 18px; padding: 6px 26px 8px; box-shadow: 0 8px 0 var(--ink), 0 0 40px rgba(255,201,60,.45); transform: rotate(-1.5deg); max-width: 92vw; }
.lb-sign.pop { animation: sign-pop .45s cubic-bezier(.2,1.8,.4,1); }
@keyframes sign-pop { from { transform: rotate(-1.5deg) scale(.7); } }
.lb-sign h2 { margin: 0; font-size: clamp(24px, 5vw, 44px); color: var(--gold); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); line-height: 1.05; }
.lb-cat { display: inline-block; font-size: 14px; font-weight: 700; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; margin-bottom: 4px; }
.lb-frame { position: relative; padding: 26px; border-radius: 26px;
  background: linear-gradient(145deg, #e8453e, #b52a25); border: 5px solid var(--ink);
  box-shadow: inset 0 0 0 6px var(--gold), inset 0 0 0 10px var(--ink), 0 14px 0 var(--ink), 0 0 70px rgba(255,201,60,.35);
  width: min(calc(94vw - 24px), calc((100dvh - var(--lb-chrome, 250px)) * 1.75 + 52px)); }
.lb-pic { position: relative; aspect-ratio: 1.75; border-radius: 12px; overflow: hidden; border: 4px solid var(--ink); background: #0d0b24; touch-action: pan-y; cursor: grab; }
.lb-pic img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.lb-pic.in { animation: pic-in .5s cubic-bezier(.2,1.4,.4,1); }
.lb-pic.in-r { animation: pic-r .45s cubic-bezier(.2,1.3,.4,1); }
.lb-pic.in-l { animation: pic-l .45s cubic-bezier(.2,1.3,.4,1); }
@keyframes pic-in { from { transform: scale(.85) rotate(-2deg); opacity: 0; } }
@keyframes pic-r { from { transform: translateX(14%) rotate(2deg); opacity: 0; } }
@keyframes pic-l { from { transform: translateX(-14%) rotate(-2deg); opacity: 0; } }
.bulb { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff3b0; border: 2px solid var(--ink);
  animation: bulb .9s steps(1) infinite; z-index: 2; pointer-events: none; }
@keyframes bulb { 0% { background: #fff8d0; box-shadow: 0 0 10px 3px rgba(255,220,90,.9); } 33% { background: #c98a12; box-shadow: none; } }
.lb-rocko { position: absolute; top: -70px; left: -160px; width: 150px; z-index: 4; pointer-events: none; opacity: 0; }
.lb-rocko.zoom { animation: rocko-zoom 1.6s cubic-bezier(.4,0,.6,1); }
.lb-rocko.back { animation: rocko-back 1.6s cubic-bezier(.4,0,.6,1); }
@keyframes rocko-zoom { 0% { opacity: 1; transform: translate(0, 30px) rotate(-8deg); } 50% { transform: translate(calc(50vw + 80px), -20px) rotate(4deg); } 100% { opacity: 1; transform: translate(calc(100vw + 260px), 20px) rotate(-6deg); } }
@keyframes rocko-back { 0% { opacity: 1; transform: translate(calc(100vw + 260px), 20px) scaleX(-1); } 100% { opacity: 1; transform: translate(0, 30px) scaleX(-1); } }
.lb-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.cf { position: absolute; top: 45%; width: 10px; height: 6px; border-radius: 2px; animation: cf 1.2s cubic-bezier(.2,.8,.4,1) forwards; }
@keyframes cf { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
.lb-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 3; }
.lb-arrow { width: 58px; height: 58px; border-radius: 50%; font-size: 24px; cursor: pointer; color: var(--ink); background: var(--gold);
  border: 4px solid var(--ink); box-shadow: 0 5px 0 var(--ink); padding: 0; }
.lb-arrow:hover { transform: scale(1.08); }
.lb-arrow:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.lb-arrow:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.lb-count { font-weight: 700; font-size: 18px; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: 10px; padding: 5px 12px; min-width: 76px; text-align: center; }
.lb-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 6; }
@media (max-width: 560px) {
  .lb-frame { padding: 16px; border-radius: 18px; }
  .lb-rocko { width: 100px; top: -50px; }
  .lb-bar .big { order: 5; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-rays, .bulb, .ph-e, .lb-rocko, .lb-sign.pop, .lb-pic.in, .lb-pic.in-r, .lb-pic.in-l { animation: none !important; }
}
/* the legal line inside the title + game-over cards: Super Rocko™ · © 2026 Rocko's World · v23 */
.legal { margin: 12px 0 0; font-size: 12px; font-weight: 600; opacity: .6; }
.logo .tm { font-size: .28em; vertical-align: super; color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; margin-left: 2px; }

/* game-over / pause: ways back out */
.card-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.card-links .worlds-btn { margin: 0; font-size: 16px; padding: 6px 16px; }

/* phones held upright: a nudge to turn sideways (Ron: "plays better in landscape") */
.rotate-hint { display: none; margin: 12px auto 0; max-width: 320px; font-size: 15px; font-weight: 700; background: var(--gold);
  border: 3px solid var(--ink); border-radius: 14px; padding: 6px 12px; animation: tilt 1.6s ease-in-out infinite; }
@keyframes tilt { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-4deg); } 85% { transform: rotate(4deg); } }
@media (orientation: portrait) and (pointer: coarse) { .rotate-hint { display: block; } }
@media (prefers-reduced-motion: reduce) { .rotate-hint { animation: none; } }

/* ===================================================================== short screens (phones sideways)
   Ron: "plays better in landscape… make sure this is perfect in mobile". Cards go two-column so
   nothing is cut off; the lightbox puts its buttons beside the picture so the painting gets the height. */
@media (max-height: 540px) {
  .card-wrap { overflow-y: auto; justify-content: flex-start; padding: 10px 16px; }
  .card { margin: auto 0; padding: 12px 20px 14px; border-radius: 22px; }
  #title .card { max-width: 660px; display: grid; grid-template-columns: auto 1fr; column-gap: 22px; align-items: center; }
  #title .logo { grid-column: 1; grid-row: 1 / span 6; font-size: 46px; }
  #title .card > :not(.logo) { grid-column: 2; }
  #title #btnPlay, #title .worlds-btn, #title .diff { justify-self: center; }
  #title .tag, #title .how { display: none; }
  #title .worlds-btn { margin-top: 8px; }
  #title .best { font-size: 15px; margin-top: 6px; }
  .legal { margin-top: 6px; font-size: 11px; }
  #over .legal { grid-column: 1 / span 2; grid-row: 6; }
  #over .arena { grid-column: 1 / span 2; grid-row: 5; margin: 8px auto 0; font-size: 13px; }
  #over .card { max-width: 700px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; align-items: center; }
  #over h2 { grid-column: 1; grid-row: 1; font-size: 30px; margin: 0 0 6px; }
  #over .stats { grid-column: 1; grid-row: 2; margin: 0; }
  #over .newbest { grid-column: 1; grid-row: 3; font-size: 18px; margin: 8px 0 0; }
  #over .quip { grid-column: 1; grid-row: 4; font-size: 15px; margin: 8px 0 0; }
  #over .diff { grid-column: 2; grid-row: 1; justify-self: center; }
  #over .diffdesc { grid-column: 2; grid-row: 2; margin: 0 0 8px; align-self: start; }
  #over #btnAgain { grid-column: 2; grid-row: 3; justify-self: center; }
  #over .card-links { grid-column: 2; grid-row: 4; margin-top: 10px; }
  .stats .n { font-size: 26px; } .stats .l { font-size: 12px; }
  .big { font-size: 22px; padding: 10px 28px; }
  .diff button { font-size: 15px; padding: 6px 11px; }
  .gal-top { padding-top: max(8px, env(safe-area-inset-top)); }
  .gal-top h2 { font-size: 26px; } .gal-top p { display: none; }
  .gal-h { margin: 14px 4px 10px; font-size: 20px; }
  /* lightbox: picture as big as the height allows, the buttons in a column beside it */
  #lightbox { --lb-chrome: 64px; }
  .lb-stage { flex-direction: row; gap: 14px; padding: 30px 8px 8px; }
  .lb-frame { padding: 12px; border-radius: 18px; }
  .lb-sign { position: absolute; top: 6px; left: 50%; transform: translateX(-60%) rotate(-1.5deg); padding: 2px 16px 4px; border-width: 3px; outline-width: 3px; box-shadow: 0 4px 0 var(--ink); }
  .lb-sign.pop { animation: none; }
  .lb-sign h2 { font-size: 20px; } .lb-cat { display: none; }
  .lb-bar { flex-direction: column; gap: 10px; }
  .lb-bar .big { font-size: 17px; padding: 10px 14px; }
  .lb-arrow { width: 48px; height: 48px; font-size: 19px; }
  .lb-rocko { width: 96px; top: -30px; }
}

/* the Sound mixer, dropping down under the 🔊 button */
.mixer { position: fixed; z-index: 6; top: calc(max(12px, env(safe-area-inset-top)) + 64px); right: max(12px, env(safe-area-inset-right));
  width: min(300px, calc(100vw - 24px)); background: var(--cream); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink);
  padding: 6px 14px 12px; animation: pop-in .25s cubic-bezier(.2,1.6,.4,1); transform-origin: top right; }
.mixer[hidden] { display: none; }
.mixer::before { content: ""; position: absolute; top: -12px; right: 18px; width: 18px; height: 18px; background: var(--cream);
  border-left: 4px solid var(--ink); border-top: 4px solid var(--ink); transform: rotate(45deg); border-radius: 4px 0 0 0; }
.mix-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 3px dashed rgba(28,36,52,.18); }
.mix-row .ic { font-size: 24px; }
.mix-row b { font-size: 19px; }
.mix-tog { min-width: 64px; min-height: 40px; border-radius: 999px; border: 3px solid var(--ink); cursor: pointer; font: 700 16px Fredoka, sans-serif;
  background: #2E9E5B; color: #fff; box-shadow: 0 3px 0 var(--ink); }
.mix-tog.off { background: #C9CED6; color: var(--ink); }
.mix-tog:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.mix-row input[type=range] { grid-column: 1 / -1; width: 100%; height: 30px; accent-color: var(--red); cursor: pointer; }
.mix-row input[type=range]:disabled { opacity: .35; cursor: default; }
.mix-mute { display: block; width: 100%; margin-top: 12px; font: 700 17px Fredoka, sans-serif; color: var(--ink); background: var(--gold);
  border: 3px solid var(--ink); border-radius: 999px; padding: 8px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.mix-mute:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.mix-tog:focus-visible, .mix-mute:focus-visible, .mix-row input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ===================================================================== the lobby (Ron: "make a bigger lobby") */
.lobby { position: fixed; inset: 0; z-index: 4; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(rgba(28,36,52,.18), rgba(28,36,52,.55)); padding: max(14px, env(safe-area-inset-top)) 16px 28px; }
.lobby[hidden] { display: none; }
.lobby-in { max-width: 1120px; margin: 0 auto; }
.lobby-hero { text-align: center; padding: 18px 0 8px; }
.lobby-hero .logo { font-size: clamp(58px, 11vw, 118px); filter: drop-shadow(0 6px 0 rgba(28,36,52,.35)); animation: logo-bob 3.2s ease-in-out infinite; }
@keyframes logo-bob { 50% { transform: rotate(-3deg) translateY(-6px); } }
.lobby-hero .tag { color: #fff; font-size: clamp(16px, 2.2vw, 21px); font-weight: 600; max-width: 640px; margin: 14px auto 16px; text-shadow: 0 2px 0 var(--ink), 0 0 12px rgba(28,36,52,.8); }
.lobby-hero .diffdesc { color: #fff; opacity: 1; text-shadow: 0 1px 0 var(--ink), 0 0 8px rgba(28,36,52,.8); }
.big.huge { font-size: clamp(34px, 5vw, 48px); padding: 14px 64px; box-shadow: 0 8px 0 var(--ink); animation: fly-pulse 1.6s ease-in-out infinite; }
@keyframes fly-pulse { 50% { transform: scale(1.06) rotate(-1deg); } }
.lobby-hero .best { color: #fff; text-shadow: 0 2px 0 var(--ink); font-size: 20px; margin-top: 14px; }
.lobby-hero .rotate-hint { max-width: 340px; }
.lobby-grid { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); margin-top: 22px; }
.panel { background: var(--cream); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 12px 16px 16px; min-width: 0; }
.panel h3 { margin: 0 0 10px; font-size: 22px; }
.panel h3 small { font-size: 14px; font-weight: 600; opacity: .65; margin-left: 6px; }
.p-wotd { grid-column: span 5; transform: rotate(-1deg); }
.p-trophy { grid-column: span 3; transform: rotate(1deg); }
.p-how { grid-column: span 4; transform: rotate(-.6deg); }
.p-worlds, .p-crew { grid-column: span 12; }
.wotd-pic { display: block; width: 100%; aspect-ratio: 1.75; padding: 0; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; cursor: pointer; background: #7EC8FF; }
.wotd-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.wotd-pic:hover img { transform: scale(1.06); }
.wotd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.wotd-row b { font-size: 19px; }
.wotd-row .worlds-btn { margin: 0; }
.trophies { list-style: none; margin: 0; padding: 0; }
.trophies li { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; background: #fff; border: 3px solid var(--ink); font-weight: 600; }
.trophies li b { font-size: 22px; }
.trophies li.on { background: var(--gold); }
.how-list { margin: 0; padding-left: 20px; line-height: 1.45; font-size: 15px; }
.how-list li { margin-bottom: 3px; }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.p-head h3 { margin: 0; }
.p-head .worlds-btn { margin: 0; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; }
.strip-w { flex: 0 0 200px; scroll-snap-align: start; padding: 5px 5px 8px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; cursor: pointer;
  font: 700 14px Fredoka, sans-serif; color: var(--ink); text-align: center; transition: transform .15s; }
.strip-w:hover, .strip-w:focus-visible { transform: translateY(-4px) rotate(-1deg); }
.strip-w img, .strip-w .ph { width: 100%; aspect-ratio: 1.75; object-fit: cover; display: block; border-radius: 9px; margin-bottom: 6px; }
.strip-w span { display: block; line-height: 1.15; }
.crew { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mate { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mate img { height: 110px; width: 100%; object-fit: contain; }
.mate:hover img { animation: mate-hop .5s ease; }
@keyframes mate-hop { 40% { transform: translateY(-10px) rotate(-4deg); } }
.mate b { font-size: 17px; }
.mate span { font-size: 13.5px; line-height: 1.3; opacity: .85; }
.lobby .legal { text-align: center; color: #fff; opacity: .9; text-shadow: 0 1px 2px rgba(0,0,0,.6); margin-top: 22px; }
@media (max-width: 900px) {
  .p-wotd { grid-column: span 12; } .p-trophy, .p-how { grid-column: span 6; }
  .crew { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 560px) {
  .p-trophy, .p-how { grid-column: span 12; }
  .crew { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mate img { height: 80px; } .mate span { font-size: 12.5px; }
  .panel { transform: none; }
  .strip-w { flex-basis: 160px; }
  .big.huge { padding: 12px 44px; }
}
@media (max-height: 540px) {
  .lobby-hero { padding-top: 4px; }
  .lobby-hero .logo { font-size: 54px; }
  .lobby-hero .tag { display: none; }
  .big.huge { font-size: 30px; padding: 10px 44px; }
}
@media (prefers-reduced-motion: reduce) { .lobby-hero .logo, .big.huge, .mate:hover img { animation: none; } }

/* the ⚡ SUPER! button: pops up bottom-left (thumb's reach) when the gauge is full */
.super-btn { position: fixed; z-index: 5; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 112px; height: 112px; border-radius: 50%; border: 5px solid var(--ink); cursor: pointer; padding: 0;
  background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 45%, #f08a1c); box-shadow: 0 7px 0 var(--ink), 0 0 30px 6px rgba(255,201,60,.8);
  font: 700 44px/1 Fredoka, sans-serif; color: var(--red); -webkit-text-stroke: 2px var(--ink); animation: super-pulse .6s ease-in-out infinite alternate, pop-in .3s cubic-bezier(.2,1.6,.4,1);
  touch-action: none; -webkit-user-select: none; user-select: none; }
.super-btn span { display: block; font-size: 17px; color: #fff; -webkit-text-stroke: 1.5px var(--ink); margin-top: 2px; }
.super-btn[hidden] { display: none; }
.super-btn:active { transform: translateY(4px) scale(.96); box-shadow: 0 3px 0 var(--ink); }
@keyframes super-pulse { from { transform: scale(1) rotate(-4deg); } to { transform: scale(1.08) rotate(4deg); } }
@media (max-height: 540px) { .super-btn { width: 88px; height: 88px; font-size: 34px; } .super-btn span { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .super-btn { animation: none; } }

/* the lobby footer: all the legal stuff (Ron: "i need all the legal stuff in footer") */
.lobby-foot { margin-top: 26px; text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.lobby-foot .promise { display: inline-block; margin: 0 0 12px; font-weight: 700; font-size: 15px; background: rgba(28,36,52,.6); border: 2px solid rgba(255,255,255,.6);
  border-radius: 999px; padding: 6px 16px; text-shadow: none; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.foot-links a { color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; border-bottom: 2px solid rgba(255,201,60,.8); }
.foot-links a:hover { color: var(--gold); }
.lobby-foot .legal { margin: 0 0 4px; font-size: 13px; opacity: .95; }
.lobby-foot .tms { margin: 0; font-size: 12px; opacity: .8; }
.card .legal a { color: inherit; }

/* the lobby's power-ups panel */
.p-powers { grid-column: span 12; }
.powers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pw { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 10px; }
.pw-ic { grid-row: 1 / span 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 24px Fredoka, sans-serif;
  background: radial-gradient(circle at 35% 30%, #fff, var(--c)); border: 3px solid var(--ink); }
.pw b { font-size: 16px; line-height: 1.1; }
.pw span:last-child { font-size: 13px; opacity: .8; line-height: 1.25; }
@media (max-width: 560px) { .powers { grid-template-columns: 1fr 1fr; } .pw { grid-template-columns: 1fr; text-align: center; justify-items: center; } .pw-ic { grid-row: auto; } }

/* the crew soundboard */
.mate[data-who] { cursor: pointer; position: relative; }
.mate[data-who]::after { content: "🔊"; position: absolute; top: 6px; right: 8px; font-size: 14px; opacity: .6; }
.mate.talk img { animation: mate-hop .5s ease; }
.mate.shh::before { content: "Turn sound on in 🔊 first"; position: absolute; left: 6px; right: 6px; top: 40%; font-size: 12px; font-weight: 700;
  background: var(--gold); border: 2px solid var(--ink); border-radius: 10px; padding: 4px; z-index: 1; }

.everything-btn { display: table; margin: 16px auto 0; text-decoration: none; }

/* ===================================================================== compact lobby
   (Ron: "the home page stuff is stacked and too tall"): the hero goes side by side and the panels
   pack into a tight dashboard: ~half the height it was. */
.lobby-hero { padding: 4px 0 0; }
.lobby-hero .logo { font-size: clamp(52px, 8vw, 92px); }
.lobby-hero .tag { font-size: clamp(15px, 1.8vw, 18px); margin: 10px auto 12px; }
.big.huge { font-size: clamp(30px, 4vw, 40px); padding: 10px 54px; }
.everything-btn { margin-top: 10px; font-size: 16px; padding: 5px 16px; }
.lobby-hero .best { margin-top: 8px; font-size: 17px; }
@media (min-width: 700px) {
  .lobby-hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; column-gap: 28px; max-width: 1060px; margin: 0 auto; }
  .lobby-hero .logo { grid-column: 1; grid-row: 1 / span 3; }
  .lobby-hero .tag { grid-column: 1; grid-row: 4; margin: 6px auto 0; }
  .lobby-hero .best { grid-column: 1; grid-row: 5; }
  .lobby-hero .diff { grid-column: 2; grid-row: 1; justify-self: center; }
  .lobby-hero .diffdesc { grid-column: 2; grid-row: 2; margin-bottom: 6px; }
  .lobby-hero #btnPlay { grid-column: 2; grid-row: 3 / span 2; justify-self: center; align-self: center; }
  .lobby-hero .everything-btn { grid-column: 2; grid-row: 5; }
  .lobby-hero .rotate-hint { grid-column: 1 / -1; }
}
.lobby-grid { gap: 12px; margin-top: 14px; }
.panel { padding: 10px 14px 12px; border-radius: 18px; }
.panel h3 { font-size: 18px; margin-bottom: 8px; }
.panel h3 small { font-size: 12.5px; }
.p-wotd { grid-column: span 4; } .p-trophy { grid-column: span 3; } .p-how { grid-column: span 5; }
.p-powers { grid-column: span 12; } .p-worlds { grid-column: span 7; } .p-crew { grid-column: span 5; }
.wotd-row { margin-top: 8px; } .wotd-row b { font-size: 16px; } .wotd-row .worlds-btn { font-size: 15px; padding: 4px 12px; }
.trophies li { padding: 4px 9px; margin-bottom: 5px; font-size: 15px; } .trophies li b { font-size: 18px; }
.how-list { columns: 2; column-gap: 18px; font-size: 13.5px; line-height: 1.35; }
.how-list li { break-inside: avoid; margin-bottom: 5px; }
/* power-ups: small icon chips (the descriptions are hover tooltips + on the Everything page) */
.powers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pw { grid-template-columns: auto 1fr; padding: 5px 8px; border-width: 2px; border-radius: 12px; }
.pw-ic { width: 34px; height: 34px; font-size: 18px; border-width: 2px; grid-row: auto; }
.pw b { font-size: 14px; } .pw span:last-child { display: none; }
/* worlds strip + crew, side by side */
.p-head { margin-bottom: 8px; } .p-head .worlds-btn { font-size: 15px; padding: 4px 12px; }
.strip { gap: 10px; padding-bottom: 8px; } .strip-w { flex-basis: 150px; font-size: 13px; }
.crew { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mate { padding: 6px 4px; border-width: 2px; border-radius: 12px; gap: 2px; }
.mate img { height: 62px; } .mate b { font-size: 12.5px; line-height: 1.1; } .mate span { display: none; }
.mate[data-who]::after { font-size: 11px; top: 3px; right: 4px; }
.lobby-foot { margin-top: 16px; }
@media (max-width: 900px) {
  .p-wotd { grid-column: span 7; } .p-trophy { grid-column: span 5; }
  .p-how, .p-powers, .p-worlds, .p-crew { grid-column: span 12; }
}
@media (max-width: 560px) {
  .p-wotd, .p-trophy { grid-column: span 12; }
  .how-list { columns: 1; }
  .powers { grid-template-columns: repeat(2, 1fr); }
  .pw { grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
  .crew { grid-template-columns: repeat(5, 1fr); }
  .mate img { height: 48px; } .mate b { font-size: 11px; }
}
/* phones: tighter still */
@media (max-width: 560px), (max-height: 540px) {
  .wotd-pic { aspect-ratio: 2.5; }
  .trophies { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .trophies li { margin: 0; padding: 4px 8px; font-size: 14px; }
}
@media (max-width: 560px) {
  .lobby-hero .tag { display: none; }
  .lobby-hero .logo { margin-top: 6px; }
  .lobby-hero .rotate-hint { font-size: 13px; padding: 4px 10px; margin-top: 10px; }
  .lobby-grid { gap: 10px; }
}
@media (max-width: 560px) {
  .powers { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .pw { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 5px 2px; gap: 2px; }
  .pw-ic { width: 32px; height: 32px; font-size: 16px; }
  .pw b { font-size: 10.5px; line-height: 1.1; }
  .strip-w { flex-basis: 140px; }
}

/* Play as me: a kid's own cartoon from Rocko & Me (me.js) */
.me-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 14px; }
.me-head { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 20px Fredoka, sans-serif; color: #fff; text-shadow: 0 1px 0 var(--ink), 0 0 8px rgba(28,36,52,.8); }
.me-head img { height: 64px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.me-modes { flex-wrap: wrap; justify-content: center; border-radius: 22px; max-width: 100%; }
.me-off { font-size: 14px; }

/* ===================================================================== the art-first lobby ("Corners", mockup 4)
   (Ron: "i love the background image… build #4"): no scrolling; the banner fills the screen, slowly drifting
   + zooming and crossfading between the two banners; logo top-left, labeled round icons down the right
   (they open pop-up overlays; Worlds opens the gallery), difficulty bottom-left, FLY! bottom-right, and one
   small legal line along the bottom. */
.lobby2 { position: fixed; inset: 0; z-index: 4; overflow: hidden; background: #1c2434; }
.lobby2[hidden] { display: none; }
.l-art { position: absolute; inset: -4%; background: center / cover no-repeat; animation: l-drift 26s ease-in-out infinite alternate; }
.l-art.a { background-image: url("img/banners/banner-wipeout.webp"); }
.l-art.b { background-image: url("img/banners/banner-chaos.webp"); opacity: 0; animation: l-drift 26s ease-in-out infinite alternate, l-swap 24s ease-in-out infinite; }
@keyframes l-drift { from { transform: scale(1.02) translate(-1.5%, 1%); } to { transform: scale(1.12) translate(1.5%, -1%); } }
@keyframes l-swap { 0%, 42% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
.l-vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(28,36,52,.5)); }
.l-logo { position: absolute; left: max(20px, env(safe-area-inset-left)); top: max(14px, env(safe-area-inset-top)); font-size: clamp(42px, 6vw, 72px); text-align: left; margin: 0; }
.l-icons { position: absolute; right: max(14px, env(safe-area-inset-right)); top: calc(50% + 24px); transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.l-ic { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 78px; }
.l-ic .i { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 25px;
  background: radial-gradient(circle at 35% 30%, #fff, var(--c)); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform .15s; }
.l-ic .t { font: 700 12.5px Fredoka, sans-serif; color: #fff; text-shadow: 0 1px 0 var(--ink), 0 0 6px rgba(28,36,52,.95); white-space: nowrap; }
.l-ic:hover .i, .l-ic:focus-visible .i { transform: scale(1.1) rotate(-6deg); }
.l-ic:focus-visible .i { outline: 3px solid var(--gold); outline-offset: 2px; }
.l-diff { position: absolute; left: max(20px, env(safe-area-inset-left)); bottom: max(34px, calc(env(safe-area-inset-bottom) + 24px)); }
.l-diff .diff { box-shadow: 0 4px 0 var(--ink); }
.l-diff .diffdesc { margin: 7px 0 0 6px; color: #fff; opacity: 1; font-weight: 700; text-shadow: 0 1px 0 var(--ink), 0 0 6px rgba(28,36,52,.95); }
.l-fly { position: absolute; right: max(24px, env(safe-area-inset-right)); bottom: max(34px, calc(env(safe-area-inset-bottom) + 24px)); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.l-fly .best { margin: 0; color: #fff; font-size: 17px; text-shadow: 0 2px 0 var(--ink), 0 0 8px rgba(28,36,52,.9); }
.l-fly .big.huge { font-size: clamp(32px, 4vw, 46px); padding: 12px 60px; }
.l-foot { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(6px, env(safe-area-inset-bottom)); font-size: 11.5px; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.9); white-space: nowrap; opacity: .9; }
.l-foot a { color: var(--gold); font-weight: 700; text-decoration: none; }
.lobby2 .rotate-hint { position: absolute; left: 50%; transform: translateX(-50%); top: max(92px, calc(env(safe-area-inset-top) + 80px)); margin: 0; width: max-content; max-width: 70vw; }
.lobby2 .build-ver { margin-left: .2em; }

/* the pop-up overlays */
.sheets { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28,36,52,.55); }
.sheets[hidden] { display: none; }
.sheet-panel { position: relative; width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 16px 20px 20px; animation: pop-in .3s cubic-bezier(.2,1.6,.4,1); }
.sheet { display: none; } .sheet.on { display: block; }
.sheet h3 { margin: 0 56px 14px 0; font-size: clamp(24px, 4vw, 32px); color: var(--red); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.sheet h3 small { display: block; font-size: 14px; color: var(--ink); -webkit-text-stroke: 0; opacity: .7; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; font-size: 20px; }
.sheets .wotd-pic { aspect-ratio: 1.75; } .sheets .wotd-row b { font-size: 22px; }
.sheets .powers { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sheets .pw { grid-template-columns: auto 1fr; grid-template-rows: auto auto; text-align: left; justify-items: start; padding: 8px 10px; border-width: 3px; }
.sheets .pw-ic { grid-row: 1 / span 2; width: 44px; height: 44px; font-size: 22px; }
.sheets .pw b { font-size: 16px; } .sheets .pw span:last-child { display: block; font-size: 13px; }
.sheets .crew { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.sheets .mate { padding: 10px; border-width: 3px; } .sheets .mate img { height: 100px; } .sheets .mate b { font-size: 16px; }
.sheets .mate span { display: block; font-size: 12.5px; }
.sheets .trophies { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .sheets .trophies li { margin: 0; padding: 12px; font-size: 18px; } .sheets .trophies li b { font-size: 30px; }
.sheets .how-list { columns: 1; font-size: 17px; line-height: 1.5; }
.sheets .everything-btn { display: table; margin: 14px auto 0; }

/* phones held upright: FLY! + difficulty across the bottom, icons down the right */
@media (max-width: 560px) {
  .l-logo { font-size: 46px; }
  .l-icons { gap: 6px; top: 46%; } .l-ic { width: 64px; } .l-ic .i { width: 46px; height: 46px; font-size: 21px; } .l-ic .t { font-size: 11px; }
  .l-fly { left: 0; right: 0; align-items: center; bottom: max(44px, calc(env(safe-area-inset-bottom) + 34px)); }
  .l-diff { left: 0; right: 0; text-align: center; bottom: max(150px, calc(env(safe-area-inset-bottom) + 140px)); }
  .l-diff .diffdesc { margin-left: 0; }
  .l-foot { white-space: normal; width: 94%; text-align: center; font-size: 10.5px; }
  .lobby2 .rotate-hint { top: 128px; left: max(20px, env(safe-area-inset-left)); transform: none; max-width: calc(100% - 120px); font-size: 12.5px; text-align: left; }
  .sheets .trophies { grid-template-columns: 1fr 1fr; } .sheets .crew { grid-template-columns: repeat(2, 1fr); }
}
/* phones held sideways (short screens): the icons go two-across, the legal line moves to the top */
@media (max-height: 540px) {
  .l-logo { font-size: 40px; }
  .l-icons { display: grid; grid-template-columns: repeat(2, 64px); gap: 4px 6px; top: 50%; }
  .l-ic { width: 64px; } .l-ic .i { width: 42px; height: 42px; font-size: 20px; } .l-ic .t { font-size: 10.5px; }
  .l-fly { bottom: max(16px, env(safe-area-inset-bottom)); } .l-fly .big.huge { font-size: 30px; padding: 8px 40px; } .l-fly .best { font-size: 14px; }
  .l-diff { bottom: max(16px, env(safe-area-inset-bottom)); } .l-diff .diffdesc { display: none; }
  .l-foot { top: max(8px, env(safe-area-inset-top)); bottom: auto; max-width: calc(100% - 330px); white-space: normal; text-align: center; font-size: 10px; }
  .sheet-panel { max-height: calc(100dvh - 20px); padding: 10px 14px 14px; }
  .sheets .wotd-pic { aspect-ratio: 2.6; } .sheets .mate img { height: 70px; }
}
@media (prefers-reduced-motion: reduce) { .l-art { animation: none; } .l-art.b { display: none; } }
/* Play as me (me.js) in the art-first lobby: its chooser sits bottom-centre, clear of the icon column */
.lobby2 .me-pick { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); width: max-content; max-width: min(560px, 46vw); margin: 0; }
.lobby2 .me-modes button { font-size: 14px; padding: 6px 10px; }
@media (max-width: 560px) { .lobby2 .me-pick { left: 12px; right: 84px; transform: none; width: auto; max-width: none; bottom: 232px; } .lobby2 .me-modes button { font-size: 12.5px; padding: 5px 8px; } .lobby2 .me-head img { height: 44px; } }
@media (max-height: 540px) { .lobby2 .me-pick { bottom: 12px; max-width: 40vw; gap: 4px; } .lobby2 .me-head { font-size: 15px; } .lobby2 .me-head img { height: 34px; } .lobby2 .me-modes button { font-size: 11.5px; padding: 4px 7px; } .lobby2 .me-off { display: none; } }
/* the lobby buttons as big STICKER BADGES in a 3×2 block under the logo (Ron picked idea B over the
   semicircle): solid colored tiles, ink border, the name always showing, a little tilt each */
.l-icons { position: absolute; left: max(20px, env(safe-area-inset-left)); top: max(150px, calc(env(safe-area-inset-top) + 136px)); right: auto;
  transform: none; display: grid; grid-template-columns: repeat(3, 98px); gap: 14px; background: none; border: 0; padding: 0; box-shadow: none; }
.l-ic { width: auto; height: 94px; display: grid; justify-items: center; align-content: center; gap: 3px; border-radius: 22px;
  background: var(--c); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink), inset 0 0 0 4px rgba(255,255,255,.85); transition: transform .15s; }
.l-ic:nth-child(odd) { transform: rotate(-4deg); } .l-ic:nth-child(even) { transform: rotate(3deg); }
.l-ic:hover, .l-ic:focus-visible { transform: scale(1.1) rotate(-6deg); }
.l-ic:active { transform: scale(.96); }
.l-ic:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.l-ic .i { width: auto; height: auto; background: none; border: 0; box-shadow: none; font-size: 38px; line-height: 1; }
.l-ic:hover .i, .l-ic:focus-visible .i { transform: none; }
.l-ic .t { font: 700 14px Fredoka, sans-serif; color: var(--ink); text-shadow: none; background: none; border: 0; padding: 0; margin: 0; white-space: nowrap; }
.l-ic:hover .t { color: var(--ink); }
@media (max-width: 560px) {
  .l-icons { top: max(118px, calc(env(safe-area-inset-top) + 104px)); grid-template-columns: repeat(3, 84px); gap: 12px; }
  .l-ic { height: 78px; border-width: 3px; border-radius: 18px; box-shadow: 0 5px 0 var(--ink), inset 0 0 0 3px rgba(255,255,255,.85); }
  .l-ic .i { font-size: 30px; } .l-ic .t { font-size: 12px; }
}
@media (max-height: 540px) {
  .l-icons { top: max(98px, calc(env(safe-area-inset-top) + 88px)); grid-template-columns: repeat(3, 74px); gap: 9px 10px; }
  .l-ic { height: 64px; border-width: 3px; border-radius: 16px; box-shadow: 0 4px 0 var(--ink), inset 0 0 0 3px rgba(255,255,255,.85); gap: 1px; }
  .l-ic .i { font-size: 25px; } .l-ic .t { font-size: 11px; }
}

/* the hint is centred without transform (its wiggle animation owns transform);
   on sideways phones the legal line goes back to the bottom middle, between difficulty and FLY! */
@media (max-width: 560px) { .lobby2 .rotate-hint { left: 0; right: 0; margin: 0 auto; transform: none; width: max-content; max-width: 90vw; } }
@media (max-height: 540px) { .l-foot { top: auto; bottom: max(6px, env(safe-area-inset-bottom)); max-width: min(300px, calc(100% - 560px)); font-size: 9.5px; } }
@media (max-width: 560px) { .lobby2 .rotate-hint { bottom: 250px; } }
/* Ron: "the bottom row is impossible to see": the legal / links line and the difficulty hint get solid navy backing, bigger text */
.l-foot { background: rgba(28,36,52,.92); border: 2px solid rgba(255,255,255,.75); border-radius: 999px; padding: 5px 14px; font-size: 13px; text-shadow: none; box-shadow: 0 3px 10px rgba(0,0,0,.45); }
.l-foot a { color: var(--gold); }
.lobby2 .diffdesc { display: inline-block; background: rgba(28,36,52,.9); color: #fff; border-radius: 999px; padding: 3px 12px; text-shadow: none; }
@media (max-width: 560px) { .l-foot { font-size: 11.5px; border-radius: 14px; } }
@media (max-height: 540px) { .l-foot { font-size: 10.5px; border-radius: 12px; padding: 4px 10px; } }
@media (max-width: 560px) { .lobby2 .rotate-hint { top: auto; height: auto; } .lobby2 .l-fly { bottom: 56px; } .lobby2 .l-diff { bottom: 160px; } }
@media (max-width: 560px) { .lobby2 .me-pick { bottom: 258px; } .lobby2:has(.me-pick) .rotate-hint { display: none; } }
/* the 7th sticker (Ron: "everything in the game needs to be a tile, not a link at the bottom"): a wide rainbow one across the block */
.l-ic.l-wide { grid-column: 1 / -1; height: 58px; grid-auto-flow: column; gap: 10px; text-decoration: none; transform: rotate(-1.5deg);
  background: linear-gradient(100deg, #FF7AB6, #FFC93C 35%, #9BE36A 65%, #7EC8FF); }
.l-ic.l-wide .i { font-size: 30px; } .l-ic.l-wide .t { font-size: 17px; }
.l-ic.l-wide:hover, .l-ic.l-wide:focus-visible { transform: scale(1.05) rotate(-2.5deg); }
@media (max-width: 560px) { .l-ic.l-wide { height: 50px; } .l-ic.l-wide .i { font-size: 24px; } .l-ic.l-wide .t { font-size: 15px; } }
@media (max-height: 540px) { .l-ic.l-wide { height: 40px; } .l-ic.l-wide .i { font-size: 20px; } .l-ic.l-wide .t { font-size: 13px; } }
.l-ic.l-wide { justify-content: center; }
@media (max-height: 540px) { .lobby2 .l-diff .diffdesc { display: none; } }
/* Ron's painted DALL·E icons in the sticker tiles (img/ui/icon-*.webp, from add-art.py) */
.l-ic .i img { display: block; width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(28,36,52,.35)); transition: transform .15s; }
.l-ic:hover .i img { transform: scale(1.12) rotate(-8deg); }
.l-ic.l-wide .i img { width: 46px; height: 46px; }
@media (max-width: 560px) { .l-ic .i img { width: 50px; height: 50px; } .l-ic.l-wide .i img { width: 38px; height: 38px; } }
@media (max-height: 540px) { .l-ic .i img { width: 40px; height: 40px; } .l-ic.l-wide .i img { width: 30px; height: 30px; } }
/* the "Rocko & Me Enabled" badge (styles in parent-gate.css): under the sticker tiles on the left;
   on sideways phones a compact one top-right beside 🔊; hidden while Play as me is on (they're already using it) */
.l-rme { grid-column: 1 / -1; margin-top: 2px; }
.rme-sub { display: block; }
.lobby2:has(.me-pick) .l-rme { display: none; }
@media (max-height: 540px) { .l-rme { position: fixed; margin: 0; top: max(10px, env(safe-area-inset-top)); left: auto; right: calc(max(14px, env(safe-area-inset-right)) + 64px); width: auto; padding: 4px 10px 4px 5px; border-width: 2px; }
  .l-rme .rme-sub { display: none; } .l-rme .rme-ic { width: 38px; height: 38px; } .l-rme b { font-size: 14px; } }
.pw-ic img { width: 86%; height: 86%; object-fit: contain; }

/* ---- Rocko sign-in pill (rocko-auth.js) — Super Rocko skin ------------------
   The pill's shape/behavior are constant; we only recolor via --rw-* vars and
   place the mount point. Comic red + gold; Plus stays universal gold. */
#rocko-account{
  /* Top-right, just left of the sound button (.corner .round = 52px) — clear of the SUPER ROCKO logo. */
  position:absolute; left:auto; z-index:6;
  top: max(12px, env(safe-area-inset-top));
  right: calc(max(12px, env(safe-area-inset-right)) + 62px);
  --rw-font:'Lilita One',Nunito,sans-serif;
  --rw-size:15px;
  --rw-bg:linear-gradient(#e24b3f,#c0271c);
  --rw-fg:#fff3d6;
  --rw-border:#ffd23d;
  --rw-deep:#7c1109;
  --rw-rim:rgba(255,210,61,.6);
  --rw-accent:#ffd23d;
  --rw-menu-bg:#7c1109;
  --rw-menu-fg:#fff3d6;
}
@media (max-width:600px){ #rocko-account{ --rw-size:13px; --rw-coin:30px; } }
/* "Play as your own cartoon" chooser (me.js, the "ram" sheet): grown-ups' account cartoons + the kids' Rocko & Me path */
.ram-box { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 12px 14px 14px; margin: 0 0 12px; box-shadow: 0 4px 0 var(--ink); }
.ram-box h4 { margin: 0 0 6px; font: 700 20px Fredoka, sans-serif; color: var(--ink); }
.ram-kids { background: #FFF3CC; }
.ram-note { margin: 0 0 10px; font-size: 15px; }
.ram-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ram-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-bottom: 8px; }
.ram-pick { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 8px 6px 6px; border-radius: 16px; background: #EAF5FF;
  border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font: 700 15px Fredoka, sans-serif; color: var(--ink); text-align: center; transition: transform .15s; }
.ram-pick:hover, .ram-pick:focus-visible { transform: translateY(-3px) rotate(-2deg); }
.ram-pick:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ram-pick img { width: 84px; height: 84px; object-fit: contain; border-radius: 50%; background: radial-gradient(circle, #fff, #FFE7A3); }
.ram-pick.on { background: var(--gold); }
.ram-pick.busy { opacity: .6; cursor: progress; }
.ram-pick.oops::after { content: "Couldn't load, try again"; font-size: 11px; color: var(--red); }
.ram-more { font: 700 14px Fredoka, sans-serif; color: var(--ink); }
