/* ==========================================================================
   Sumbreak Play — Responsive & Accessibility Stylesheet
   ========================================================================== */

/* Compact screens (Mobile < 480px) */
@media (max-width: 480px) {
  :root {
    --space-md: 12px;
    --space-lg: 18px;
    --space-xl: 24px;
    --space-2xl: 36px;
  }

  .sumbreak-board-container {
    max-width: 100%;
    padding: 6px;
    border-radius: 16px;
    border-width: 3px;
  }

  .board-start-overlay {
    gap: 10px;
    padding: 14px;
    border-radius: 13px;
  }

  .start-overlay-title {
    font-size: 1.65rem;
  }

  .start-preview-tile {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 7px;
  }

  .start-play-btn {
    padding: 10px 32px;
    font-size: 1.05rem;
  }

  .sumbreak-cell {
    border-radius: 10px;
  }

  .sumbreak-tile {
    border-radius: 10px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.09), 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  .game-controls-bar {
    gap: 8px;
    flex-wrap: wrap;
  }

  .progress-saves-text {
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-left: 0;
    margin-top: 4px;
    font-size: 0.82rem;
  }

  .puzzle-nav-row {
    gap: 10px;
    font-size: 0.88rem;
  }

  .countdown-pill {
    padding: 6px 18px;
    font-size: 0.88rem;
  }

  .wend-cal-month-title {
    font-size: 1.5rem;
  }

  .wend-cal-cell {
    height: 42px;
  }

  .wend-cal-day {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .wend-date-pill {
    padding: 6px 12px;
    font-size: 0.84rem;
  }

  .practice-top-bar {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }

  .practice-puzzle-name {
    font-size: 1.7rem;
  }

  .practice-bottom-nav {
    gap: 10px;
  }

  .practice-nav-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .unlimited-controls-card {
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
  }

  .size-selector-pills {
    justify-content: center;
    width: 100%;
  }

  #btn-new-puzzle {
    width: 100%;
    justify-content: center;
  }

  .control-btn {
    padding: 8px 14px;
    font-size: 0.88rem;
    gap: 6px;
  }

  .control-btn svg {
    width: 16px;
    height: 16px;
  }

  .game-puzzle-id {
    font-size: 1.15rem;
  }

  .game-status-bar {
    padding: 8px 12px;
    margin-bottom: var(--space-sm);
  }
}

/* Very small screens (< 360px) */
@media (max-width: 360px) {
  .control-btn span {
    display: none;
  }
  .control-btn {
    padding: 10px 14px;
  }
  .control-btn svg {
    width: 18px;
    height: 18px;
    margin: 0;
  }
}

/* Landscape Mode for Mobile Phones */
@media (max-height: 520px) and (orientation: landscape) {
  .game-area-wrapper {
    max-width: 420px;
  }
  .sumbreak-board-container {
    max-width: 280px;
  }
  .site-header {
    height: 48px;
  }
}

/* Print Styles */
@media print {
  .site-header, .site-footer, .game-controls-bar, .theme-toggle, .mobile-menu-btn {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .sumbreak-board-container {
    border-color: #000000 !important;
    box-shadow: none !important;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .sumbreak-tile.merge-pop {
    animation: none !important;
  }
  .hint-source-glow, .hint-target-glow {
    animation: none !important;
  }
}
