/* PUZZINO — no webfonts; system stack keeps load instant */

/* Full PUZZINO_PASTEL swatch (see js/constants.js); subset used by rules below */
:root {
  /* Used by JS (snake D-pad) for notched phones; keep in sync with padding on mobile HUD. */
  --puzzino-safe-bottom: env(safe-area-inset-bottom, 0px);
  --puzzino-safe-top: env(safe-area-inset-top, 0px);
  --pastel-powder-blue: #a7d7eb;
  --pastel-aqua-mist: #b7faff;
  --pastel-seafoam: #b9f2da;
  --pastel-mint-foam: #bdfbe2;
  --pastel-pistachio: #c7f7ce;
  --pastel-ice-mint: #c7fdfb;
  --pastel-cloudless: #caf1fe;
  --pastel-sea-glass: #caf6e5;
  --pastel-pale-pool: #cef3f5;
  --pastel-pewter: #d0d6de;
  --pastel-periwinkle: #d5d5fc;
  --pastel-sage: #dcf1e4;
  --pastel-dawn: #e3e9f3;
  --pastel-lime: #e9fbb6;
  --pastel-veil: #edf1ff;
  --pastel-rose-milk: #f0bad6;
  --pastel-orchid: #f4c5f3;
  --pastel-lilac-cream: #f7daff;
  --pastel-bubblegum: #ffc3d2;
  --pastel-petal: #ffd2d5;
  --pastel-shell: #ffe0dd;
  --pastel-peach: #ffe5cc;
  --pastel-fairy: #ffe6fb;
  --pastel-lemon: #fff2b4;
  --pastel-white: #ffffff;

  /*
   * “Bubbly” HUD buttons (onboarding / HUD, not arcade overlays): thick lower rim + glint.
   * Teal rim / shadow tokens match sky & mobile blue controls (not pink cabinet accents).
   */
  --puzzino-ui-pill-rim-teal: #3f6d7e;
  --puzzino-ui-pill-rim-green: #3f7a62;
  --puzzino-ui-pill-drop: rgba(22, 52, 62, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  /* Blanket disable double-tap-to-zoom on every element; panning + pinch still work. */
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Reduces double-tap “smart zoom” on Android Chrome; pair with viewport user-scalable=no for iOS. */
  touch-action: manipulation;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--pastel-powder-blue);
}

#game-root {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Canvas blur during onboarding so the world previews behind glass UI */
#canvas-wrap {
  position: absolute;
  inset: 0;
  transition: filter 0.5s ease, transform 0.5s ease;
  /*
   * Critical for mobile: default touch-action:auto lets Chrome/Safari treat double-taps as
   * “smart zoom” on the full-screen GL surface. none = browser must not handle zoom/scroll here.
   */
  touch-action: none;
  -ms-touch-action: none;
}

#canvas-wrap.is-blurred {
  filter: blur(14px) saturate(1.05);
  transform: scale(1.02);
}

#canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -ms-touch-action: none;
}

/* Full-viewport 2D mirrors (Snake / ATM / Minesweeper) — same double-tap zoom issue as WebGL. */
.puzzino-snake-overlay,
.puzzino-atm-overlay,
.puzzino-minesweeper-overlay {
  touch-action: none;
  -ms-touch-action: none;
}

/* Full-screen overlay stack */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Arcade home screen: dark vignette over the world so onboarding matches cabinet mood. */
  background: radial-gradient(ellipse at center, rgba(14, 18, 28, 0.72) 0%, rgba(2, 4, 10, 0.9) 70%);
  z-index: 4;
  pointer-events: none;
}

/* Returning-session reconnect: keep blur/card but remove the dark black backdrop. */
#overlay.is-connecting {
  background: transparent;
}

#overlay.is-active {
  pointer-events: auto;
}

#overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#overlay .overlay-inner {
  width: min(92vw, 520px);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2.5rem 2rem;
  padding-top: calc(2.5rem + var(--puzzino-safe-top));
  padding-bottom: calc(2rem + var(--puzzino-safe-bottom));
  border-radius: 22px;
  border: 2px solid #39ff7a;
  background: linear-gradient(165deg, rgba(14, 18, 28, 0.95) 0%, rgba(5, 8, 14, 0.97) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 0 42px rgba(57, 255, 122, 0.24),
    0 0 88px rgba(57, 255, 122, 0.12),
    inset 0 0 18px rgba(57, 255, 122, 0.08);
}

/*
 * Name + character steps use pastel bubble cards (#screen-name / #screen-fruit), so the neon
 * outer shell becomes transparent and only the vignette (#overlay) frames the world.
 */
/*
 * Also support pure-CSS detection via :has() so the pastel-card step works
 * even if stale JS doesn't toggle .is-name-screen (hard refresh/cache scenarios).
 */
#overlay .overlay-inner.is-name-screen,
#overlay .overlay-inner:has(#screen-name.is-visible),
#overlay .overlay-inner:has(#screen-fruit.is-visible) {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  overflow: visible;
}

#overlay h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.8rem, 5.2vw, 2.7rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #39ff7a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  text-align: center;
  text-shadow: 0 0 16px rgba(57, 255, 122, 0.45);
}

#overlay label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d1d980;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  margin-bottom: 0.5rem;
}

#overlay input[type="text"] {
  width: 100%;
  padding: 1rem 1.1rem;
  /* 16px+ avoids iOS zoom-on-focus in landscape/small viewports */
  font-size: max(1rem, 1.12rem);
  font-weight: 800;
  border: 2px solid #39ff7a;
  border-radius: 10px;
  background: rgba(5, 8, 14, 0.92);
  color: #d8ffe8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  letter-spacing: 0.04em;
  outline: none;
}

#overlay input[type="text"]:focus {
  border-color: #ffd600;
  box-shadow:
    0 0 0 2px rgba(255, 214, 0, 0.5),
    0 0 14px rgba(255, 214, 0, 0.25);
}

/*
 * “Who are you?” + “Pick your character” cards mirror the round candy controls from the benchmark:
 * soft pastel shell, circular accents, and thick-rim pill input/action (tiles use the same rim language).
 */
#screen-name,
#screen-fruit,
#screen-connecting {
  position: relative;
  margin-inline: auto;
  /* Fill the overlay column so the character grid can use the full card width (avoids left-hugging). */
  width: 100%;
  max-width: min(92vw, 520px);
  box-sizing: border-box;
  padding: 1.25rem clamp(0.65rem, 3.5vw, 1rem) 1.4rem;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--pastel-cloudless) 65%, var(--pastel-veil) 35%) 0%,
    color-mix(in srgb, var(--pastel-pale-pool) 72%, white 28%) 100%
  );
  box-shadow:
    0 6px 0 #5f7f95,
    0 14px 28px rgba(54, 87, 114, 0.3);
}

/* Character grid can get tall; keep scroll inside the card so the vignette still frames the scene. */
#screen-fruit {
  max-height: min(88vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Decorative bubbles keep the same circular visual language as the button set. */
#screen-name::before,
#screen-name::after,
#screen-fruit::before,
#screen-fruit::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

#screen-name::before,
#screen-fruit::before {
  width: 40px;
  height: 40px;
  top: -12px;
  left: 14px;
  background: linear-gradient(180deg, var(--pastel-orchid), var(--pastel-rose-milk));
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 3px 0 #8f6282;
}

#screen-name::after,
#screen-fruit::after {
  width: 30px;
  height: 30px;
  right: 18px;
  top: 14px;
  background: linear-gradient(180deg, var(--pastel-lemon), var(--pastel-peach));
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 3px 0 #9a7f4d;
}

#screen-name h1,
#screen-fruit h1,
#screen-connecting h1 {
  margin-bottom: 0.55rem;
  color: #3d5b72;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.02em;
}

/* Shorter heading + dense grid: scale down so the first row of tiles isn’t pushed off-screen on small phones. */
#screen-fruit h1 {
  padding-inline: 0.25rem;
  font-size: clamp(1.35rem, 4.2vw, 2.05rem);
  line-height: 1.15;
}

#screen-name label {
  margin-bottom: 0.55rem;
  color: #4c6d84;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Loading card for returning sessions — keeps the same visual language as onboarding cards. */
#screen-connecting {
  text-align: center;
  padding-top: 2.1rem;
  padding-bottom: 2.1rem;
}

#screen-connecting .screen-connecting-text {
  margin: 0.4rem auto 0;
  max-width: 26ch;
  color: #4c6d84;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Keep username field as a big rounded "pill" with a visible lower rim. */
#screen-name input[type="text"] {
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, var(--pastel-veil) 0%, var(--pastel-dawn) 100%);
  color: #415a70;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.02em;
  box-shadow:
    0 4px 0 #6b8398,
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#screen-name input[type="text"]::placeholder {
  color: #7594aa;
}

#screen-name input[type="text"]:focus {
  border-color: var(--pastel-white);
  box-shadow:
    0 0 0 3px rgba(199, 247, 206, 0.65),
    0 4px 0 #6b8398,
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#screen-name .btn-row {
  margin-top: 1.1rem !important;
}

/* Inline error shown when the username is already taken. */
.username-error {
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 80, 80, 0.18);
  border: 1.5px solid rgba(255, 80, 80, 0.55);
  color: #ff6b6b;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
  /* Animate in when unhidden */
  animation: username-error-in 0.18s ease-out;
}

@keyframes username-error-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Input takes on an error border when the error is visible. */
#screen-name input[type="text"].has-error {
  border-color: rgba(255, 100, 100, 0.75);
  box-shadow:
    0 0 0 3px rgba(255, 80, 80, 0.22),
    0 4px 0 #6b8398,
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* Pastel CTA — same mint pill as the username step (not the neon arcade default below). */
#screen-name button.big.puzzino-bubble-btn,
#screen-fruit button.big.puzzino-bubble-btn {
  min-width: min(84vw, 250px);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(
    180deg,
    var(--pastel-mint-foam) 0%,
    var(--pastel-seafoam) 48%,
    color-mix(in srgb, var(--pastel-seafoam) 68%, #1e4032 32%) 100%
  );
  color: var(--pastel-white);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-shadow:
    0 1px 0 rgba(18, 52, 40, 0.35),
    0 2px 4px rgba(18, 45, 35, 0.4);
  box-shadow:
    0 5px 0 var(--puzzino-ui-pill-rim-green),
    0 9px 20px rgba(123, 193, 166, 0.48);
}

#screen-name button.big.puzzino-bubble-btn::before,
#screen-fruit button.big.puzzino-bubble-btn::before {
  display: block;
}

#screen-name button.big.puzzino-bubble-btn:hover:not(:disabled),
#screen-fruit button.big.puzzino-bubble-btn:hover:not(:disabled) {
  color: var(--pastel-white);
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 6px 0 var(--puzzino-ui-pill-rim-green),
    0 12px 24px rgba(123, 193, 166, 0.5);
}

#screen-name button.big.puzzino-bubble-btn:active:not(:disabled),
#screen-fruit button.big.puzzino-bubble-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 var(--puzzino-ui-pill-rim-green),
    0 5px 12px rgba(123, 193, 166, 0.45);
}

.fruit-grid {
  display: grid;
  /* minmax(0,1fr) keeps fractional tracks from overflowing when labels wrap on narrow widths */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.45rem, 2vw, 0.65rem);
  margin: 0.85rem 0 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 479px) {
  .fruit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.4rem, 2.5vw, 0.55rem);
  }
}

/* Room for a fourth column without shrinking previews too much (roughly “phablet”+ width). */
@media (min-width: 620px) {
  .fruit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fruit-card {
  position: relative;
  cursor: pointer;
  min-width: 0;
  padding: 0.5rem 0.35rem 0.5rem;
  border-radius: 10px;
  border: 2px solid rgba(57, 255, 122, 0.45);
  background: linear-gradient(160deg, rgba(10, 14, 22, 0.96), rgba(6, 10, 18, 0.96));
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.fruit-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.fruit-card.is-selected {
  border-color: #ffd600;
  box-shadow:
    0 0 0 2px rgba(255, 214, 0, 0.4),
    0 0 18px rgba(255, 214, 0, 0.24);
}

.fruit-preview-canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border-radius: 8px;
}

.fruit-card .name {
  margin-top: 0.25rem;
  font-weight: 900;
  font-size: clamp(0.65rem, 2.8vw, 0.78rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d8ffe8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  line-height: 1.15;
  word-break: break-word;
  hyphens: auto;
}

/* Pastel character tiles inside the onboarding bubble (matches username pill / heading typography). */
#screen-fruit .fruit-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, var(--pastel-veil) 0%, var(--pastel-dawn) 100%);
  box-shadow:
    0 4px 0 #6b8398,
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#screen-fruit .fruit-card:hover {
  filter: brightness(1.03);
}

#screen-fruit .fruit-card.is-selected {
  border-color: var(--pastel-white);
  box-shadow:
    0 0 0 3px rgba(199, 247, 206, 0.65),
    0 4px 0 #6b8398,
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#screen-fruit .fruit-card .name {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 0.3rem;
  min-height: 2.35em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #415a70;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.03em;
}

#screen-fruit .fruit-preview-canvas {
  flex-shrink: 0;
  border-radius: 12px;
}

.btn-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

/*
 * Bubbly 3D pill (top glint + thick lower rim) — onboarding, HUD skin, mobile bar, net banner.
 * Arcade/minigame layers keep .arcade-touch-btn / .snake-touch-dpad__btn unchanged.
 */
.puzzino-bubble-btn {
  position: relative;
  margin: 0;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 900;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  cursor: pointer;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  touch-action: manipulation;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.puzzino-bubble-btn::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 10%;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 88%);
  pointer-events: none;
}

.puzzino-bubble-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 6px 0 var(--bubble-rim, #555),
    0 12px 22px rgba(167, 215, 235, 0.5);
}

.puzzino-bubble-btn:active:not(:disabled) {
  filter: brightness(0.98);
  transform: translateY(3px);
  box-shadow:
    0 2px 0 var(--bubble-rim, #555),
    0 5px 14px rgba(167, 215, 235, 0.4);
}

.puzzino-bubble-btn:focus-visible {
  outline: 3px solid var(--pastel-periwinkle);
  outline-offset: 3px;
}

.puzzino-bubble-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
  box-shadow:
    0 3px 0 var(--bubble-rim, #555),
    0 6px 14px rgba(167, 215, 235, 0.25);
}

/* Teal — Change skin + bankroll chip (ice → powder blue); .puzzino-bubble-surface--teal shares this face. */
.puzzino-bubble-btn--teal,
.puzzino-bubble-surface--teal {
  --bubble-rim: var(--puzzino-ui-pill-rim-teal);
  color: var(--pastel-white);
  text-shadow:
    0 1px 0 var(--puzzino-ui-pill-drop),
    0 2px 4px rgba(22, 48, 58, 0.4);
  background: linear-gradient(
    180deg,
    var(--pastel-ice-mint) 0%,
    var(--pastel-powder-blue) 48%,
    color-mix(in srgb, var(--pastel-powder-blue) 68%, #274050 32%) 100%
  );
  box-shadow:
    0 5px 0 var(--bubble-rim),
    0 8px 18px rgba(167, 215, 235, 0.45);
}

.puzzino-bubble-btn--sky {
  --bubble-rim: #4a7d8f;
  color: var(--pastel-white);
  text-shadow:
    0 1px 0 rgba(20, 50, 62, 0.32),
    0 2px 4px rgba(20, 45, 58, 0.38);
  background: linear-gradient(
    180deg,
    var(--pastel-cloudless) 0%,
    var(--pastel-pale-pool) 48%,
    color-mix(in srgb, var(--pastel-pale-pool) 65%, #2a5060 35%) 100%
  );
  box-shadow:
    0 5px 0 var(--bubble-rim),
    0 8px 18px rgba(167, 215, 235, 0.45);
}

/* Green CTA — onboarding continue / fruit confirm + mobile jump. */
.puzzino-bubble-btn--cta,
.puzzino-bubble-btn--green {
  --bubble-rim: var(--puzzino-ui-pill-rim-green);
  color: var(--pastel-white);
  text-shadow:
    0 1px 0 rgba(18, 52, 40, 0.35),
    0 2px 4px rgba(18, 45, 35, 0.4);
  background: linear-gradient(
    180deg,
    var(--pastel-mint-foam) 0%,
    var(--pastel-seafoam) 48%,
    color-mix(in srgb, var(--pastel-seafoam) 68%, #1e4032 32%) 100%
  );
  box-shadow:
    0 5px 0 var(--bubble-rim),
    0 8px 18px rgba(167, 215, 235, 0.45);
}

/* Gold pill on red error banner — high contrast, still “toy” thick rim. */
.puzzino-bubble-btn--banner {
  --bubble-rim: #7a6828;
  color: #2a2610;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(
    180deg,
    var(--pastel-lemon) 0%,
    var(--pastel-lime) 45%,
    color-mix(in srgb, var(--pastel-lime) 72%, #5c4f20 28%) 100%
  );
  box-shadow:
    0 5px 0 var(--bubble-rim),
    0 8px 18px rgba(0, 0, 0, 0.2);
}

.puzzino-bubble-btn--banner:hover:not(:disabled) {
  box-shadow:
    0 6px 0 var(--bubble-rim),
    0 12px 22px rgba(0, 0, 0, 0.22);
}

.puzzino-bubble-btn--banner:active:not(:disabled) {
  box-shadow:
    0 2px 0 var(--bubble-rim),
    0 5px 14px rgba(0, 0, 0, 0.18);
}

/*
 * Non-button HUD chips (bankroll, controls hint): same glint + rim language as .puzzino-bubble-btn
 * without press/hover affordances — content stays above the ::before glint in paint order.
 */
.puzzino-bubble-surface {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
}

.puzzino-bubble-surface::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 8%;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0) 85%);
  pointer-events: none;
}

/* Lobby / multiplayer status — veil → periwinkle (matches old glass chip, now solid + rim) */
.puzzino-bubble-surface--lobby {
  --bubble-rim-surface: #555386;
  color: #252440;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
  background: linear-gradient(
    180deg,
    var(--pastel-veil) 0%,
    var(--pastel-periwinkle) 48%,
    color-mix(in srgb, var(--pastel-periwinkle) 66%, #35325e 34%) 100%
  );
  box-shadow:
    0 5px 0 var(--bubble-rim-surface),
    0 8px 20px rgba(167, 215, 235, 0.4);
}

/*
 * Controls cheatsheet + round “?” — sky ramp (mobile secondary family).
 * No ::before glint: the white gloss sat on top of the panel and read like stray transparency over the copy.
 */
.puzzino-bubble-surface--hint {
  --bubble-rim-surface: #4a7d8f;
  background: linear-gradient(
    180deg,
    var(--pastel-cloudless) 0%,
    var(--pastel-pale-pool) 48%,
    color-mix(in srgb, var(--pastel-pale-pool) 65%, #2a5060 35%) 100%
  );
  box-shadow:
    0 5px 0 var(--bubble-rim-surface),
    0 10px 26px rgba(167, 215, 235, 0.4);
  color: #1e3a4a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.puzzino-bubble-surface--hint::before {
  content: none;
}

#hud .controls-hint.is-collapsed.puzzino-bubble-surface--hint {
  color: var(--pastel-white);
  text-shadow:
    0 1px 0 rgba(20, 50, 62, 0.32),
    0 2px 4px rgba(20, 45, 58, 0.38);
}

/* Onboarding primary actions: large caps, green face */
#overlay button.big.puzzino-bubble-btn {
  min-width: 200px;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* Override pastel pill just inside onboarding so home screen buttons match arcade overlays. */
  border: 2px solid #39ff7a;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a2d2c 0%, #0f1b1a 55%, #090f10 100%);
  color: #39ff7a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  box-shadow:
    0 0 14px rgba(57, 255, 122, 0.2),
    inset 0 0 12px rgba(57, 255, 122, 0.08);
  text-shadow: 0 0 12px rgba(57, 255, 122, 0.35);
}

#overlay button.big.puzzino-bubble-btn:hover:not(:disabled) {
  border-color: #ffd600;
  color: #ffd600;
  box-shadow:
    0 0 20px rgba(255, 214, 0, 0.22),
    inset 0 0 12px rgba(255, 214, 0, 0.08);
}

#overlay button.big.puzzino-bubble-btn:active:not(:disabled) {
  transform: translateY(1px);
}

#overlay button.big.puzzino-bubble-btn::before {
  display: none;
}

#overlay button.big:disabled {
  cursor: not-allowed;
}

.screen {
  display: none;
}

.screen.is-visible {
  display: block;
}

/* HUD — glass pills */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* Multiplayer lobby id + headcount (server-driven) */
#hud .hud-lobby-pill.puzzino-bubble-surface {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  pointer-events: auto;
  max-width: min(88vw, 220px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

#hud .hud-lobby-pill.puzzino-bubble-surface:focus-visible {
  outline: 3px solid var(--pastel-white);
  outline-offset: 2px;
}

/* Lobby selector modal: small DOM-only layer (no canvas work), keeps startup instant. */
.puzzino-lobby-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 125;
}

/* Flex centers the dialog; backdrop is absolute so it does not steal a flex slot. */
.puzzino-lobby-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.puzzino-lobby-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.6);
}

.puzzino-lobby-modal__panel.puzzino-bubble-surface {
  position: relative;
  z-index: 1;
  width: min(92vw, 350px);
  max-height: min(85vh, 520px);
  overflow: auto;
  border-radius: 18px;
  padding: 0.9rem;
  border-color: rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, var(--pastel-veil) 0%, var(--pastel-dawn) 100%);
  box-shadow:
    0 8px 0 #4b4a72,
    0 18px 34px rgba(20, 25, 42, 0.35);
}

/* No ::before glint — the bubble gloss read as a stray transparent band over the title. */
.puzzino-lobby-modal__panel.puzzino-bubble-surface::before {
  content: none;
}

.puzzino-lobby-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.puzzino-lobby-modal__head h2 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #232244;
}

.puzzino-lobby-modal__close.puzzino-bubble-btn {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
}

.puzzino-lobby-modal__hint {
  margin: 0.55rem 0 0.7rem;
  color: #3a395e;
  font-size: 0.75rem;
  line-height: 1.3;
}

.puzzino-lobby-modal__list {
  display: grid;
  gap: 0.45rem;
}

.puzzino-lobby-modal__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  border: 2px solid rgba(75, 74, 114, 0.2);
  background: rgba(255, 255, 255, 0.48);
}

.puzzino-lobby-modal__item.is-current {
  border-color: rgba(63, 122, 98, 0.5);
  background: rgba(185, 242, 218, 0.58);
}

.puzzino-lobby-modal__name {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #26254a;
}

.puzzino-lobby-modal__meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #3e3d62;
}

.puzzino-lobby-modal__join.puzzino-bubble-btn {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.75rem;
}

/* Inactivity kick from server — centered dialog above dimmed backdrop (above lobby picker). */
.puzzino-inactivity-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 130;
}

.puzzino-inactivity-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.puzzino-inactivity-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.72);
}

.puzzino-inactivity-modal__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 22rem);
  box-sizing: border-box;
  padding: 1.1rem 1.15rem 1.15rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #f4a84d 0%, #e87c1e 100%);
  color: var(--pastel-white);
  box-shadow:
    0 8px 0 #a8560e,
    0 18px 34px rgba(20, 25, 42, 0.45);
  text-align: center;
}

.puzzino-inactivity-modal__title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

/* Body copy: separate from title so screen readers get a clear heading + explanation. */
.puzzino-inactivity-modal__msg {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.puzzino-inactivity-modal__reload.puzzino-bubble-btn {
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1.15rem;
}

/* WS failed after retries — fixed bar, never blocks the canvas */
.puzzino-net-banner {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  background: #e8486a;
  color: var(--pastel-white);
  font-size: 0.9rem;
  font-weight: 700;
  pointer-events: auto;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
}

.puzzino-net-banner.is-visible {
  display: flex;
}

.puzzino-net-banner__btn.puzzino-bubble-btn {
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1.15rem;
}

/* Fall respawn penalty — fades out over 1.5s */
#hud .hud-coin-penalty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 1.75rem;
  color: var(--pastel-bubblegum);
  text-shadow: 0 2px 12px rgba(255, 195, 210, 0.75);
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

/* Coins + skin control: flex row so the skin button sits to the right of the bankroll pill */
#hud .hud-top-cluster {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100vw - 120px);
  pointer-events: none;
}

#hud .hud-top-cluster .hud-pill,
#hud .hud-top-cluster .hud-skin-btn {
  pointer-events: auto;
}

/*
 * Bankroll + Change skin: one teal treatment and one line height so the cluster reads as a matched pair.
 */
#hud .hud-top-cluster .hud-pill.puzzino-bubble-surface--teal,
#hud .hud-skin-btn.puzzino-bubble-btn--teal {
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  box-sizing: border-box;
}

#hud .hud-pill.puzzino-bubble-surface--teal {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.72rem;
  line-height: 1.15;
}

#hud .hud-skin-btn.puzzino-bubble-btn--teal {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

/* Coin art scaled to the 0.72rem label (gold stack still pops on teal) */
#hud .hud-coins-icon {
  display: block;
  width: 1.35em;
  height: 1.35em;
  flex-shrink: 0;
  object-fit: contain;
}

/* Desktop: bottom-left. Touch UI: js/mobile.js moves this node next to “Change skin”; cluster rules override position. */
#hud .controls-hint.puzzino-bubble-surface {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: min(92vw, 340px);
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 22px;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.35;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform-origin: left bottom;
  transform: translateY(0) scale(1);
}

/*
 * Small intro motion draws the eye to controls before auto-minimizing.
 * The class is toggled by js/hud.js and removed when the panel collapses.
 */
#hud .controls-hint.is-intro-animated:not(.is-collapsed) {
  animation: puzzino-controls-hint-bob 0.9s ease-in-out infinite alternate;
}

/* Movement cheat-sheet: rows align letter keys + arrow-alias keys with labels */
#hud .controls-hint .key-hint-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.42rem;
}

#hud .controls-hint .key-hint-row:last-child {
  margin-bottom: 0;
}

#hud .controls-hint .kbd-group {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.32rem;
  flex-shrink: 0;
}

/* Chiclet keyboard cap: light top, darker “skirt”, inset highlight — reads like a real key */
#hud .controls-hint .kbd-cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.95rem;
  height: 1.85rem;
  padding: 0 0.42rem;
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
  color: #1e293b;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 42%, #cbd5e1 100%);
  border: 1px solid #64748b;
  border-radius: 5px 5px 7px 7px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 0 #475569,
    0 4px 5px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
}

/* Arrow / mouse rows use slightly larger emoji so the cap matches letter height */
#hud .controls-hint .kbd-cap--glyph {
  min-width: 1.95rem;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0 0.28rem;
}

/* Wide spacebar-style cap */
#hud .controls-hint .kbd-cap--space {
  min-width: 4.1rem;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#hud .controls-hint .key-hint-label {
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  line-height: 1.2;
}

#hud .controls-hint.is-collapsed {
  width: 44px;
  height: 44px;
  max-width: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.35rem;
  cursor: pointer;
  animation: none;
}

#hud .controls-hint .hint-lines {
  transition: opacity 0.2s ease;
}

#hud .controls-hint .hint-countdown {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

#hud .controls-hint.is-collapsed .hint-lines {
  display: none;
}

#hud .controls-hint.is-collapsed .hint-countdown {
  display: none;
}

#hud .controls-hint.is-collapsed .hint-toggle {
  display: block;
}

#hud .controls-hint .hint-toggle {
  display: none;
  font-weight: 900;
}

#hud .controls-hint:not(.is-collapsed) .hint-toggle {
  display: none;
}

/* Only when docked inside .hud-top-cluster (mobile). */
#hud .hud-top-cluster .controls-hint {
  position: relative;
  left: auto;
  bottom: auto;
  flex-shrink: 0;
  pointer-events: auto;
}

#hud .hud-top-cluster .controls-hint:not(.is-collapsed) {
  flex-basis: 100%;
  width: min(92vw, 360px);
  max-width: min(92vw, 360px);
  align-self: flex-start;
  margin-top: 0.25rem;
}

@keyframes puzzino-controls-hint-bob {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-3px) scale(1.015);
  }
}

/* Floating “Press F” above the snake cabinet — positioned from JS each frame */
.puzzino-machine-hint {
  position: fixed;
  z-index: 40;
  transform: translateX(-50%);
  background: var(--pastel-lemon);
  color: #000;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  pointer-events: none;
  display: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  animation: puzzino-machine-hint-pulse 1.2s ease-in-out infinite;
}

.puzzino-machine-hint kbd {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.65);
}

@keyframes puzzino-machine-hint-pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.03);
    opacity: 0.92;
  }
}

/* Nearest hall prop id (from PUZZINO_INTERIOR.register) — under machine F-hints (z-index 40). */
.puzzino-furniture-name {
  position: fixed;
  z-index: 38;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 14px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1a2e;
  background: rgba(220, 241, 228, 0.92);
  border: 1px solid rgba(26, 26, 46, 0.12);
  pointer-events: none;
  display: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: min(88vw, 280px);
  text-align: center;
  line-height: 1.25;
}

/* ---- Receptionist speech bubble (left/top set each frame by main.js projection) ---- */
.puzzino-welcome-toast {
  position: fixed;
  /* translateX centres on anchor; translateY lifts bubble above anchor point */
  transform: translateX(-50%) translateY(-100%);
  margin-top: -14px;
  z-index: 50;
  pointer-events: none;

  padding: 10px 20px;
  border-radius: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.82);
  background: rgba(185, 242, 218, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(60, 160, 110, 0.28);

  font-size: clamp(0.82rem, 2vw, 1.05rem);
  font-weight: 700;
  color: #1a3a28;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.01em;

  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Downward triangle pointer toward the NPC head */
.puzzino-welcome-toast::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: rgba(185, 242, 218, 0.93);
  border-bottom: none;
}

.puzzino-welcome-toast.is-visible {
  opacity: 1;
}

/* Spawn-front onboarding nudge: one-time toast pointing new players toward the entrance. */
.puzzino-front-guide-toast {
  position: fixed;
  left: 50%;
  top: max(16px, calc(8px + env(safe-area-inset-top)));
  transform: translateX(-50%);
  z-index: 52;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 242, 180, 0.95);
  color: #3d2f10;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(0.76rem, 2vw, 0.95rem);
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

.puzzino-front-guide-toast.is-visible {
  opacity: 1;
}

/* Low-coin guidance toast paired with the world-space ATM arrow beacon. */
.puzzino-low-coin-hint {
  position: fixed;
  left: 50%;
  bottom: max(22px, calc(12px + env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 52;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: rgba(185, 242, 218, 0.95);
  color: #173d2e;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

.puzzino-low-coin-hint.is-visible {
  opacity: 1;
}

/* ---- Mobile: portrait gate, virtual stick, orbit strip, arcade bars ---- */

/* Camera orbit — left band (joystick is on the right). JS toggles pointer-events when walking. */
.mobile-orbit-strip {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(38vw, 220px);
  z-index: 2;
  pointer-events: none;
  touch-action: none;
}

body:not(.mobile-ui) .hint-touch {
  display: none;
}

body.mobile-ui .hint-desktop {
  display: none;
}

/* Portrait gate: deep teal from powder/aqua so it stays readable but on-brand (not generic gray-purple). */
.rotate-prompt {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.5rem + var(--puzzino-safe-top)) 1.25rem calc(1.5rem + var(--puzzino-safe-bottom));
  background: linear-gradient(
    165deg,
    rgba(62, 105, 128, 0.96) 0%,
    rgba(42, 78, 98, 0.97) 45%,
    rgba(36, 62, 82, 0.98) 100%
  );
  color: var(--pastel-white);
  text-align: center;
  pointer-events: auto;
  box-sizing: border-box;
}

.rotate-prompt__inner {
  max-width: 22rem;
}

.rotate-prompt__icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.rotate-prompt__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--pastel-aqua-mist);
  text-shadow: 0 2px 0 rgba(30, 55, 72, 0.35);
}

.rotate-prompt__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 600;
  opacity: 0.92;
}

.mobile-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  touch-action: manipulation;
  pointer-events: none;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(12px + var(--puzzino-safe-bottom));
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  /* Buttons left, stick right */
  justify-content: space-between;
  gap: 0.5rem;
  box-sizing: border-box;
}

.mobile-actions {
  pointer-events: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.45rem;
  max-width: min(92vw, 340px);
}

/* (mobile-actions--solo removed: buttons are now left-aligned via parent space-between) */

.mobile-stick-zone {
  position: relative;
  width: 128px;
  height: 128px;
  pointer-events: auto;
  touch-action: none;
  flex-shrink: 0;
}

/* Stick dish: green glass (seafoam / ice-mint) so walking reads “go” separate from blue action chrome. */
.mobile-stick-base {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: linear-gradient(
    165deg,
    rgba(185, 242, 218, 0.52) 0%,
    rgba(199, 253, 251, 0.38) 100%
  );
  border: 3px solid var(--pastel-sea-glass);
  box-shadow:
    0 8px 22px rgba(167, 215, 235, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

/* Knob: blue ramp (cloudless → pale pool) — matches sky/plaza language. */
.mobile-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  margin-top: -24px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--pastel-cloudless), var(--pastel-pale-pool));
  border: 3px solid var(--pastel-powder-blue);
  box-shadow:
    0 2px 0 rgba(120, 160, 180, 0.45),
    0 4px 14px rgba(74, 85, 104, 0.22);
  pointer-events: none;
  transform: translate(0, 0);
  will-change: transform;
}

/* Touch action row: same bubbly system; sky = I / respawn, green = jump */
.mobile-pill-btn.puzzino-bubble-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.mobile-pill-btn--primary.puzzino-bubble-btn--green {
  min-width: 72px;
}

@media (pointer: coarse) {
  .fruit-card {
    min-height: unset;
  }

  #overlay button.big.puzzino-bubble-btn {
    min-width: min(88vw, 240px);
    min-height: 48px;
  }

  #hud .hud-top-cluster .hud-pill.puzzino-bubble-surface--teal,
  #hud .hud-skin-btn.puzzino-bubble-btn--teal {
    min-height: 44px;
    padding: 0.5rem 1rem;
  }
}

.puzzino-machine-hint--tap {
  cursor: pointer;
  pointer-events: auto;
  padding: 10px 18px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Snake / Simon: Start ≈ Enter, Exit ≈ Esc; above cabinet overlays when needed. */
.arcade-touch-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 8px max(10px, env(safe-area-inset-left, 0px)) calc(10px + var(--puzzino-safe-bottom))
    max(10px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  pointer-events: none;
  font-family: inherit;
}

.arcade-touch-bar--snake {
  z-index: 65;
}

.arcade-touch-bar--atm {
  z-index: 118;
}

.arcade-touch-bar--simon {
  /* Ready overlay uses z-index 105 — bar must stay clickable. */
  z-index: 118;
}

.arcade-touch-bar--minesweeper {
  z-index: 118;
}

.arcade-touch-bar--space {
  z-index: 118;
}

.arcade-touch-bar__row {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

/* ATM on touch: compact neon panel so Refill / confirm fit without crowding thumbs. */
.arcade-touch-bar--atm .arcade-touch-btn {
  min-width: 78px;
  font-size: 0.8rem;
  border-color: rgba(34, 204, 255, 0.75);
  box-shadow: 0 0 12px rgba(34, 204, 255, 0.25), 0 8px 18px rgba(0, 0, 0, 0.25);
}

.arcade-touch-bar--atm .arcade-touch-btn--accent {
  background: linear-gradient(180deg, #b7faff, #7ee8ff);
}

.arcade-touch-btn {
  min-height: 48px;
  min-width: 92px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  color: #1e293b;
  background: rgba(237, 241, 255, 0.94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.arcade-touch-btn--accent {
  background: linear-gradient(180deg, var(--pastel-lemon), var(--pastel-peach));
}

.arcade-touch-btn:active {
  transform: scale(0.98);
}

.snake-touch-dpad {
  pointer-events: auto;
  display: none;
  grid-template-columns: 56px 56px 56px;
  grid-template-rows: 56px 56px 56px;
  gap: 6px;
  justify-content: center;
  margin: 0 auto;
  max-width: 220px;
}

.snake-touch-dpad__btn {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 3px solid rgba(57, 255, 120, 0.55);
  background: rgba(30, 35, 45, 0.88);
  color: rgba(57, 255, 120, 0.95);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.snake-touch-dpad__btn--up {
  grid-column: 2;
  grid-row: 1;
}

.snake-touch-dpad__btn--left {
  grid-column: 1;
  grid-row: 2;
}

.snake-touch-dpad__btn--right {
  grid-column: 3;
  grid-row: 2;
}

.snake-touch-dpad__btn--down {
  grid-column: 2;
  grid-row: 3;
}

/* (leaderboard is rendered directly on the arcade cabinet canvas — no DOM overlay needed) */

/* ============================================================
   PuzzinOS Social Network — early-2000s Web 2.0 social network
   style (think early Facebook / MySpace era, but casino-flavored).
   Activated when a player sits at a social terminal on the floor.
   ============================================================ */

/* Proximity hint ("F PuzzinOS") */
.puzzino-social-hint {
  position: fixed;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  background: rgba(30, 60, 130, 0.9);
  color: #ffffff;
  font: bold 13px Tahoma, Verdana, sans-serif;
  padding: 7px 16px;
  border: 1px solid #6699cc;
  border-radius: 6px;
  pointer-events: none;
  z-index: 55;
  box-shadow: 0 2px 8px rgba(0,0,50,0.4);
}
.puzzino-social-hint kbd {
  background: #f5a623;
  color: #1a1a1a;
  border-radius: 3px;
  padding: 1px 7px;
  margin-right: 6px;
  font: bold 12px Tahoma, sans-serif;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2);
}

/* ── Full-screen overlay backdrop ──────────────────────────── */
.puzzinos-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none; /* toggled by JS */
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 50, 0.88);
  font-family: Tahoma, Verdana, Arial, sans-serif;
}

/* ── Main window frame ─────────────────────────────────────── */
.puzzinos-frame {
  position: relative;
  width: min(660px, 96vw);
  height: min(540px, 90vh);
  background: #e8eaf0;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px #8899bb,
    0 8px 32px rgba(0,0,60,0.5),
    inset 0 1px 0 rgba(255,255,255,0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Top navigation bar ─────────────────────────────────────── */
.puzzinos-navbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 10px;
  min-height: 46px;
  /* Classic early-2000s blue gradient */
  background: linear-gradient(180deg, #5b85c8 0%, #3b5998 55%, #2e4e88 100%);
  border-bottom: 2px solid #1e3a70;
  flex-shrink: 0;
}

.puzzinos-logo {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  margin-right: 14px;
  white-space: nowrap;
  user-select: none;
}
.puzzinos-logo-os {
  color: #f5c842;
  font-style: italic;
}
.puzzinos-logo-tag {
  font-size: 9px;
  font-weight: normal;
  color: #aabbd4;
  letter-spacing: 0.5px;
  display: block;
  line-height: 1;
  margin-top: -2px;
}

/* Nav buttons */
.puzzinos-nav {
  display: flex;
  gap: 2px;
  flex: 1;
}
.puzzinos-navbtn {
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.22);
  border-bottom: none;
  color: #d8e4f8;
  font: bold 11px Tahoma, sans-serif;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.puzzinos-navbtn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.10) 100%);
  color: #ffffff;
}
.puzzinos-navbtn--active {
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.22) 100%);
  color: #ffffff;
  border-color: rgba(255,255,255,0.35);
}

/* User pill (logged-in user in top-right) */
.puzzinos-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.puzzinos-user-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 2px 8px 2px 3px;
  font-size: 11px;
  color: #eef2ff;
}
.puzzinos-user-pill-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: bold 10px Tahoma, sans-serif;
  color: #fff;
  flex-shrink: 0;
}
.puzzinos-user-pill-name {
  font: 11px Tahoma, sans-serif;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Close button */
.puzzinos-close {
  background: linear-gradient(180deg, #e05555 0%, #c02020 100%);
  border: 1px solid #991515;
  color: #fff;
  font: bold 12px Tahoma, sans-serif;
  width: 24px;
  height: 24px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  transition: background 0.12s;
}
.puzzinos-close:hover {
  background: linear-gradient(180deg, #ff6666 0%, #dd2020 100%);
}

/* ── Sub-header bar (breadcrumb / status) ───────────────────── */
.puzzinos-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  background: linear-gradient(180deg, #c8d8f0 0%, #b8cce8 100%);
  border-bottom: 1px solid #9ab0d0;
  font-size: 11px;
  color: #2a4070;
  flex-shrink: 0;
}
.puzzinos-online-badge {
  font-size: 10px;
  color: #267326;
  font-weight: bold;
}

/* ── Panels ─────────────────────────────────────────────────── */
.puzzinos-panel {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f0f2f5;
  /* 2000s-style thin scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #9ab0d0 #dce4f0;
}
.puzzinos-panel::-webkit-scrollbar { width: 7px; }
.puzzinos-panel::-webkit-scrollbar-track { background: #dce4f0; }
.puzzinos-panel::-webkit-scrollbar-thumb { background: #9ab0d0; border-radius: 4px; }

/* Feed and thread containers */
.puzzinos-feed,
.puzzinos-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Loading / empty / error states */
.puzzinos-loading,
.puzzinos-empty,
.puzzinos-error {
  text-align: center;
  padding: 24px 0;
  font-size: 12px;
  color: #6678a0;
}
.puzzinos-error { color: #c0392b; }

/* Spinning loader */
.puzzinos-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #b8cce8;
  border-top-color: #3b5998;
  border-radius: 50%;
  animation: puzzinos-spin 0.7s linear infinite;
  margin-bottom: 6px;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes puzzinos-spin {
  to { transform: rotate(360deg); }
}

/* ── Avatar circle ──────────────────────────────────────────── */
.puzzinos-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: bold 15px Tahoma, sans-serif;
  color: #ffffff;
  flex-shrink: 0;
  /* Glossy highlight — Web 2.0 badge effect */
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.15),
    0 1px 3px rgba(0,0,0,0.25);
}

/* ── Post card ──────────────────────────────────────────────── */
.puzzinos-post {
  background: #ffffff;
  border: 1px solid #c8d4e8;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0,0,40,0.08);
  transition: box-shadow 0.15s;
}
.puzzinos-post:hover {
  box-shadow: 0 2px 8px rgba(0,0,40,0.14);
}
.puzzinos-post--expanded {
  border-color: #3b5998;
  box-shadow: 0 0 0 2px rgba(59,89,152,0.2), 0 2px 8px rgba(0,0,40,0.14);
}

.puzzinos-post-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.puzzinos-post-content {
  flex: 1;
  min-width: 0;
}

.puzzinos-post-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.puzzinos-post-author {
  color: #3b5998;
  font-size: 13px;
  font-weight: bold;
}
.puzzinos-post-meta {
  color: #8899aa;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.puzzinos-post-coins {
  margin-left: 5px;
  color: #d4830a;
  font-weight: bold;
}
.puzzinos-post-body {
  color: #2a2a3a;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
  margin-bottom: 8px;
}

/* Post action row */
.puzzinos-post-actions {
  display: flex;
  gap: 6px;
  border-top: 1px solid #e8eef8;
  padding-top: 7px;
  margin-top: 2px;
}

/* ── AI badge ───────────────────────────────────────────────── */
.puzzinos-ai-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f5a623, #e08a10);
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  letter-spacing: 0.3px;
}

/* ── Shared action button (like / reply) ────────────────────── */
.puzzinos-action-btn {
  background: linear-gradient(180deg, #f4f6fa 0%, #e4e8f4 100%);
  border: 1px solid #b8c8e0;
  color: #4a5a80;
  font: bold 10px Tahoma, sans-serif;
  padding: 3px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 2px rgba(0,0,30,0.1);
}
.puzzinos-action-btn:hover {
  background: linear-gradient(180deg, #dce6f8 0%, #c8d8f0 100%);
  border-color: #7a9ad0;
  color: #2a3a60;
}
.puzzinos-action-icon {
  font-style: normal;
}

/* Like button — active/liked state */
.puzzinos-like--active {
  color: #c0392b !important;
  border-color: #d0a0a8 !important;
  background: linear-gradient(180deg, #fdeef0 0%, #f8d8dc 100%) !important;
}

/* ── Shared base button (compose, back, load more) ──────────── */
.puzzinos-btn {
  font: bold 11px Tahoma, sans-serif;
  cursor: pointer;
  border-radius: 4px;
  padding: 4px 12px;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
  border: 1px solid #b0c0dc;
  background: linear-gradient(180deg, #f4f6fa 0%, #e0e8f4 100%);
  color: #4a5a80;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.puzzinos-btn:hover {
  background: linear-gradient(180deg, #e0e8f8 0%, #c8d8f0 100%);
  border-color: #7a9ad0;
}
.puzzinos-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Primary CTA button (submit post, post reply) */
.puzzinos-btn--submit {
  background: linear-gradient(180deg, #4e7cd0 0%, #3b5998 100%);
  border-color: #2a4480;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 4px rgba(0,0,60,0.18);
}
.puzzinos-btn--submit:hover {
  background: linear-gradient(180deg, #6090e0 0%, #4a6ab0 100%);
  border-color: #3a54a0;
}

/* Back button */
.puzzinos-btn--back {
  background: linear-gradient(180deg, #f8f0d8 0%, #eedd99 100%);
  border-color: #ccaa44;
  color: #6a5500;
  margin-bottom: 8px;
  font-size: 11px;
}
.puzzinos-btn--back:hover {
  background: linear-gradient(180deg, #fff4cc 0%, #f5e070 100%);
}

/* Load-more button */
.puzzinos-btn--loadmore {
  margin: 6px auto;
  display: block;
  padding: 6px 24px;
  font-size: 11px;
}

/* ── Comments section ───────────────────────────────────────── */
.puzzinos-comments-section { margin-top: 10px; }
.puzzinos-comments-title {
  color: #3b5998;
  font-size: 11px;
  font-weight: bold;
  border-bottom: 1px solid #c8d4e8;
  padding-bottom: 5px;
  margin-bottom: 8px;
}

/* Comment card */
.puzzinos-comment {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 10px;
  background: #f4f6fc;
  border: 1px solid #dde4f4;
  border-radius: 6px;
  margin-bottom: 5px;
}
.puzzinos-comment .puzzinos-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.puzzinos-comment-content { flex: 1; min-width: 0; }
.puzzinos-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.puzzinos-comment-author {
  color: #3b5998;
  font-size: 11px;
  font-weight: bold;
}
.puzzinos-comment-time {
  color: #8899aa;
  font-size: 9px;
}
.puzzinos-comment-body {
  color: #2a2a3a;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-word;
  margin-bottom: 4px;
}

/* ── Reply box ──────────────────────────────────────────────── */
.puzzinos-reply-box {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #c8d4e8;
  border-radius: 6px;
  padding: 8px;
}
.puzzinos-reply-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.puzzinos-reply-textarea {
  min-height: 52px !important;
}

/* ── Compose card ───────────────────────────────────────────── */
.puzzinos-compose-card {
  background: #ffffff;
  border: 1px solid #c8d4e8;
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,40,0.08);
}
.puzzinos-compose-head {
  font-size: 13px;
  font-weight: bold;
  color: #3b5998;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dde4f0;
}

/* Textarea (shared across compose + reply) */
.puzzinos-textarea {
  width: 100%;
  background: #fafbfe;
  border: 1px solid #b8c8e0;
  color: #1a2030;
  font: 12px Tahoma, Verdana, sans-serif;
  padding: 8px 10px;
  resize: vertical;
  min-height: 90px;
  border-radius: 4px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.12s, box-shadow 0.12s;
  caret-color: #3b5998;
}
.puzzinos-textarea:focus {
  border-color: #6080c0;
  box-shadow: 0 0 0 3px rgba(59,89,152,0.14);
}
.puzzinos-textarea::placeholder { color: #a0aabb; }

.puzzinos-compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 2px;
}
.puzzinos-char-count {
  color: #8899aa;
  font-size: 11px;
}

.puzzinos-status {
  font-size: 11px;
  color: #6678a0;
  min-height: 18px;
  margin-top: 4px;
}
.puzzinos-status--ok { color: #267326; font-weight: bold; }
.puzzinos-status--err { color: #c0392b; font-weight: bold; }

/* ── Footer bar ─────────────────────────────────────────────── */
.puzzinos-footer {
  display: flex;
  justify-content: space-between;
  padding: 3px 12px;
  /* Same light-blue as subbar for visual bookending */
  background: linear-gradient(180deg, #b8cce8 0%, #a8bcdc 100%);
  border-top: 1px solid #90acd0;
  color: #3a5070;
  font-size: 9px;
  flex-shrink: 0;
}

/* ── Home portal layout (3-column early social network front page) ───────── */
.puzzinos-home-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.55fr 1.05fr;
  gap: 10px;
}
.puzzinos-home-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.puzzinos-widget {
  background: #ffffff;
  border: 1px solid #c8d4e8;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,40,0.08);
  padding: 10px;
}
.puzzinos-widget-title {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: bold;
  color: #3b5998;
  border-bottom: 1px solid #dde4f0;
  padding-bottom: 5px;
}
.puzzinos-home-profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.puzzinos-home-name {
  font: bold 12px Tahoma, sans-serif;
  color: #2a3a60;
}
.puzzinos-home-meta {
  font-size: 10px;
  color: #6678a0;
  line-height: 1.35;
}
.puzzinos-home-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.puzzinos-home-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #2a2a3a;
  padding: 4px 0;
  border-bottom: 1px solid #edf2fb;
}
.puzzinos-home-list li:last-child {
  border-bottom: none;
}
.puzzinos-home-badge {
  font-size: 10px;
  color: #3b5998;
  font-weight: bold;
}
.puzzinos-home-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.puzzinos-home-quick {
  font-size: 11px;
  padding: 5px 10px;
}
.puzzinos-home-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.puzzinos-home-preview-item {
  font-size: 11px;
  color: #2a2a3a;
  background: #f7f9fd;
  border: 1px solid #e1e8f6;
  border-radius: 4px;
  padding: 6px 7px;
}

/* ── Touch / mobile overrides ───────────────────────────────── */
@media (pointer: coarse) {
  .puzzinos-home-grid { grid-template-columns: 1fr; }
  .puzzinos-frame { width: 98vw; height: 92vh; }
  .puzzinos-action-btn { padding: 6px 14px; font-size: 12px; }
  .puzzinos-post-body { font-size: 13px; }
  .puzzinos-textarea { font-size: 14px !important; min-height: 70px; }
  .puzzinos-navbtn { padding: 8px 14px; font-size: 12px; }
  .puzzinos-avatar { width: 42px; height: 42px; font-size: 17px; }
}
