/* Compact board — swipe-to-explore + bottom tabs */
@media (max-width: 1100px) {
  .tools,
  .socials,
  #xcursor,
  .spidey-top {
    display: none !important;
  }

  .mobile-nav {
    display: flex;
  }

  .mobile-hint {
    display: block;
  }

  body.story-lock .mobile-hint {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 900px) {
  header {
    padding: 14px 16px;
  }

  .brand {
    font-size: 20px;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .callout:hover {
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) !important;
  }

  .deck:hover .card,
  .deck:hover .l1,
  .deck:hover .l2,
  .deck:hover .l3 {
    transform: none;
  }

  .item.sticker,
  .item.sticker * {
    cursor: grab;
  }

  .hero h1 {
    white-space: normal;
  }

  /* Mobile-first board layout */
  .item[data-id="hero"] { --cx: 50%; --cy: 38%; }
  .item[data-id="deck1"] { --cx: 18%; --cy: 54%; --rot: -5deg; }
  .item[data-id="deck2"] { --cx: 82%; --cy: 50%; --rot: 4deg; }
  .item[data-id="deck3"] { --cx: 20%; --cy: 72%; --rot: 3deg; }
  .item[data-id="green"] { --cx: 32%; --cy: 88%; --rot: -1deg; }
  .item[data-id="pink"] { --cx: 74%; --cy: 86%; --rot: 1deg; }
  .item[data-id="uides"] { --cx: 76%; --cy: 14%; --rot: -2deg; }
  .item[data-id="dsys"] { --cx: 20%; --cy: 16%; --rot: 2deg; }
  .item[data-id="code"] { --cx: 84%; --cy: 70%; --rot: -2deg; }
  .item[data-id="crossed"] { --cx: 14%; --cy: 40%; --rot: -3deg; }
  .item[data-id="heart"] { --cx: 86%; --cy: 36%; --rot: 2deg; }
  .item[data-id="ninja"] { --cx: 50%; --cy: 60%; --rot: 3deg; }
  .item[data-id="reading"] { --cx: 88%; --cy: 90%; --rot: 1deg; }
  .item[data-id="spiderlogo"] { display: none; }
  .item[data-id="mission"] { --cx: 52%; --cy: 66%; --rot: 1deg; }
}

/* Bottom navigation — full-width tabs like reference */
.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  justify-content: space-around;
  align-items: stretch;
  gap: 0;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border: none;
  border-top: 1px solid rgba(33, 31, 28, .1);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 28px rgba(33, 31, 28, .07);
}

.mobile-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--text-tertiary);
  font: 500 11px 'Archivo', sans-serif;
  letter-spacing: .01em;
  border-radius: 10px;
  cursor: pointer;
  transition: color .2s ease;
}

.mobile-nav button svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-nav button.is-active {
  color: var(--ink);
}

.mobile-nav button:active {
  color: var(--ink);
  opacity: .75;
}

.mobile-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 65;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .92);
  border: var(--border-subtle);
  font: 600 11px 'Archivo', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: opacity .35s ease;
}

.mobile-hint.is-hidden {
  opacity: 0;
}
