/* ============================================
   XPLOSION — базовые стили (сброс + типография)
   + фиксы для мобильных (анти-зум, антискролл)
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: -apple-system, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: var(--bg-image);
  background-attachment: fixed;
  transition: background-color .3s, color .3s;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
}

/* Ссылки */
a {
  color: var(--gold-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Формы */
button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, .1);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

select option {
  background: var(--panel-2);
  color: var(--text);
}

label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-2);
  font-weight: 700;
}

/* Скроллбар */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Утилита */
.hidden {
  display: none !important;
}

/* ============================================
   МОБИЛЬНЫЕ ФИКСЫ
   ============================================ */
@media (max-width: 780px) {

  /* Анти-зум при вводе (iOS Safari зумит если < 16px) */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Жёсткий антискролл в сторону */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
  }

  /* Никакой элемент не может быть шире экрана */
  * {
    max-width: 100vw;
  }

  /* Исключения для тех, кому нужно скроллить внутри себя */
  table,
  .att-table,
  .schedule-row {
    max-width: none;
  }

  .att-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Общие размеры на телефоне */
  body {
    font-size: 13px;
  }
}