/* ============================================================
   style-common.css — общие стили + мобильная оптимизация
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'PT Serif', 'Georgia', 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f5f1e8;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  button, .btn, .btn-auth, .btn-hero, .btn-form {
    min-height: 48px;
    font-size: 16px !important;
    padding: 14px 20px !important;
    touch-action: manipulation;
  }
  input, textarea, select {
    font-size: 16px !important;
    min-height: 48px;
  }
  nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a { white-space: nowrap; padding: 12px 16px !important; font-size: 14px !important; }
  section { padding: 40px 16px !important; }
  h1 { font-size: 22px !important; }
  h2 { font-size: 26px !important; }
  h3 { font-size: 22px !important; }
  .prizes-grid, .organizers-grid, .steps-grid, .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .modal-official { max-width: 100% !important; max-height: 95vh; overflow-y: auto; }
  .hero-decor, .flags-official, .top-bar-right { display: none !important; }
  .hero { padding: 40px 16px !important; }
  .hero-inner { grid-template-columns: 1fr !important; gap: 30px !important; }
  .stats-inner { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
  .stat-box { border-right: none !important; }
  .back-to-top { bottom: 20px !important; right: 20px !important; width: 48px !important; height: 48px !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  section { padding: 60px 30px !important; }
}

@media (max-width: 380px) {
  body { font-size: 14px; }
  h2 { font-size: 22px !important; }
  .btn-hero { padding: 12px 16px !important; }
}

@media (hover: none) {
  .prize-box:hover, .org-card:hover, .step-card:hover { transform: none !important; }
  button:active, .btn:active {
    transform: scale(0.97) !important;
    opacity: 0.9;
  }
}

img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
.protected {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #e8e0d0; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #002d5c, #004a99);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: #004a99; }