/* ============================================
   御膳小厨 — Responsive Stylesheet
   Breakpoints: 640px / 1024px / 1400px
   ============================================ */

/* ----- Tablet Portrait (< 1024px) ----- */
@media (max-width: 1023px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .story-honors {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }

  .honor-card {
    flex: 1 1 140px;
    min-width: 130px;
  }

  .dishes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-map {
    order: -1;
    text-align: center;
  }

  .game-container {
    max-width: 480px;
    height: 520px;
  }
}

/* ----- Mobile (< 640px) ----- */
@media (max-width: 639px) {
  /* Navigation */
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    background: rgba(26, 20, 16, 0.97);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav.scrolled .nav-links {
    background: rgba(253, 251, 247, 0.97);
  }

  .nav-link {
    font-size: 1.3rem;
    color: #fff !important;
  }

  .nav.scrolled .nav-link {
    color: var(--color-text) !important;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Story */
  .story-honors {
    flex-direction: column;
  }

  /* Dishes */
  .dishes-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .dish-card {
    max-width: 100%;
  }

  /* Game */
  .game-container {
    height: 480px;
    border-radius: 0;
    max-width: 100%;
  }

  .game-wok {
    bottom: 30px;
  }

  .wok-body {
    width: 150px;
    height: 58px;
  }

  .wok-handle {
    width: 16px;
    height: 32px;
    top: 12px;
  }

  .wok-handle-left {
    left: -22px;
  }

  .wok-handle-right {
    right: -22px;
  }

  .ingredient {
    font-size: 1.6rem;
  }

  .countdown-number {
    font-size: 5rem;
  }

  /* Hero */
  .hero-title {
    letter-spacing: 0.06em;
  }

  /* Footer */
  .footer-grid {
    gap: var(--spacing-md);
  }
}

/* ----- Large Desktop (> 1400px) ----- */
@media (min-width: 1400px) {
  .container {
    max-width: 1300px;
  }

  .dishes-grid {
    gap: var(--spacing-lg);
  }

  .game-container {
    max-width: 560px;
    height: 640px;
  }
}

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
