/* ── MOBI — rotate-to-reconnect curve puzzle styles ── */

#canvas-wrap {
  background: #000;
  align-items: stretch;
  overflow-y: auto;
  padding: 0;
}

.mb-hide { display: none !important; }

.mb-screen {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}

/* ── Start screen ── */
#mb-start {
  justify-content: center;
  padding: 40px 24px 48px;
}

.mb-start-inner {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.mb-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
}

.mb-logo svg {
  height: 48px;
  width: auto;
}

.mb-logo svg path {
  fill: #39FF14;
}

.mb-logo-win {
  margin: 0 0 24px;
}

.mb-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: rgba(57, 255, 20, 0.6);
  line-height: 1.6;
  margin: 0 0 36px;
}

.mb-start-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Game screen ── */
#mb-game {
  justify-content: flex-start;
  padding: 0 0 16px;
}

.mb-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 18px 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(57, 255, 20, 0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#mb-board-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  width: 100%;
}

#mb-board {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Board completion animation ── */
@keyframes mb-complete-pulse {
  0%,  100% { filter: none; }
  50%        { filter: drop-shadow(0 0 8px #39FF14) drop-shadow(0 0 18px rgba(57,255,20,0.55)); }
}

#mb-board.mb-complete {
  animation: mb-complete-pulse 0.5s ease-in-out 3;
}

/* ── Tile base ── */
.mobi-tile {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobi-tile img {
  display: block;
}

/* ── Win screen ── */
#mb-win {
  justify-content: center;
  padding: 40px 24px 48px;
}

.mb-win-inner {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.mb-win-headline {
  font-family: 'DM Serif Display', serif;
  font-size: 2.5rem;
  color: #39FF14;
  margin: 0 0 10px;
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

.mb-win-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: rgba(57, 255, 20, 0.6);
  margin: 0 0 36px;
  line-height: 1.6;
}

.mb-end-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

/* ── Buttons ── */
.mb-btn-primary {
  display: block;
  width: 100%;
  background: #39FF14;
  color: #000;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 15px 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 0 #1a7a0a, 0 6px 18px rgba(57,255,20,0.28);
  transition: transform 0.07s, box-shadow 0.07s, background 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mb-btn-primary:hover  { background: #5fff35; }
.mb-btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1a7a0a, 0 2px 8px rgba(57,255,20,0.2);
}

.mb-btn-ghost {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(57, 255, 20, 0.28);
  color: rgba(57, 255, 20, 0.55);
  padding: 14px 0;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: border-color 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.mb-btn-ghost:hover  { border-color: rgba(57,255,20,0.6); color: rgba(57,255,20,0.9); }
.mb-btn-ghost:active { background: rgba(57,255,20,0.05); }
