/* ================================================================
   PhilTech · Таблица Менделеева
   Офлайн-стили: только локальные шрифтовые стеки, без внешних URL.
   ================================================================ */

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

:root {
  --bg: #ECF1F7;
  --bg-alt: #DDE5EF;
  --surface: #FFFFFF;
  --ink: #0A1224;
  --teal: #43B5A0;
  --purple: #491D88;
  --pink: #FA448C;
  --cyan: #5CE1E6;
  --amber: #F59E0B;
  --white: #FFFFFF;
  --border: 2.5px solid var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-md: 8px 8px 0 var(--ink);
  --shadow-lg: 12px 12px 0 var(--ink);
  --mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;
  --disp: 'Archivo Black', 'Arial Black', 'Segoe UI Black', Impact, sans-serif;
  --sans: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, 'Trebuchet MS', Arial, sans-serif;
}

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: #CDD4DE;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #CDD4DE;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: clamp(8px, 2.4vw, 40px);
}

a { color: inherit; text-decoration: none; }

button,
input { font-family: inherit; }

button { color: inherit; }

::selection { background: var(--cyan); color: var(--ink); }

.page-3d {
  width: 100%;
  max-width: 1600px;
  min-width: 0;
  background-color: var(--bg);
  border: 2px solid rgba(10, 18, 36, 0.14);
  box-shadow: 0 30px 80px rgba(10, 18, 36, 0.14), 0 6px 20px rgba(10, 18, 36, 0.06);
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
}

/* ===== ШАПКА ===== */
.site-header {
  background: rgba(236, 241, 247, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 40px;
  font-family: var(--disp);
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--cyan);
  display: grid;
  place-items: center;
  font-family: var(--disp);
  font-size: 18px;
  border: var(--border);
  box-shadow: var(--shadow-sm);
}

.logo-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-short { display: none; }

.header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--teal);
  color: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.header-cta:hover {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}

.header-cta:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

/* ===== ЗАГОЛОВОК ===== */
.page-head {
  padding: clamp(22px, 3.6vw, 40px) clamp(16px, 3vw, 24px) clamp(16px, 2.4vw, 22px);
  border-bottom: var(--border);
}

.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cyan);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.sec-label::before { content: '■'; color: var(--teal); }

.page-title {
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}

.page-title em {
  font-style: normal;
  background: var(--teal);
  color: var(--ink);
  padding: 0 0.1em;
  display: inline-block;
  transform: rotate(-1deg);
}

.page-sub {
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(10, 18, 36, 0.72);
}

/* ===== ЛЕГЕНДА / ФИЛЬТР ===== */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: clamp(14px, 2.4vw, 24px);
  border-bottom: var(--border);
  background: var(--bg-alt);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: left;
  background: #fff;
  color: var(--ink);
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  appearance: none;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.legend-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.legend-item.is-active {
  background: var(--ink);
  color: var(--cyan);
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.legend-item:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.legend-color {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
}

.legend-item.is-active .legend-color { border-color: var(--cyan); }

/* ===== МОБИЛЬНЫЙ ПОИСК ===== */
.mobile-tools {
  padding: 14px 14px 12px;
  border-bottom: var(--border);
  background: var(--bg);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 8px 0 12px;
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }

.search-ico {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-1px);
  color: rgba(10, 18, 36, 0.55);
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 8px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
}

.search-input::placeholder { color: rgba(10, 18, 36, 0.45); opacity: 1; }

.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.search-clear {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
  cursor: pointer;
}

.search-clear:hover { background: var(--purple); }
.search-clear:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.search-stat {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: rgba(10, 18, 36, 0.6);
}

/* ===== ДЕСКТОПНАЯ ТАБЛИЦА ===== */
.table-wrap {
  padding: clamp(16px, 2.6vw, 30px) clamp(10px, 2vw, 24px);
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.pt-groups {
  display: grid;
  grid-template-columns: repeat(18, minmax(60px, 1fr));
  gap: 4px;
  min-width: 1150px;
  padding: 0 1px;
  margin-bottom: 6px;
}

.pt-groups span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: rgba(10, 18, 36, 0.45);
}

.periodic-table {
  display: grid;
  grid-template-columns: repeat(18, minmax(60px, 1fr));
  grid-template-rows: repeat(10, minmax(60px, 1fr));
  gap: 4px;
  min-width: 1150px;
}

.el-cell {
  appearance: none;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 56px;
  background: #fff;
  color: var(--ink);
  border: var(--border);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px;
  text-align: center;
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.12s ease, opacity 0.2s ease;
}

.el-cell:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
  z-index: 10;
}

.el-cell:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  z-index: 11;
}

.el-cell.empty {
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
  cursor: default;
}

.el-cell.is-highlighted {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--ink);
  z-index: 5;
}

.el-cell.is-dimmed {
  opacity: 0.25;
  pointer-events: none;
  filter: grayscale(0.7);
}

.el-cell .num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: inherit;
  opacity: 0.8;
  text-align: left;
}

.el-cell .sym {
  font-family: var(--disp);
  font-size: 22px;
  line-height: 1;
  text-align: center;
  margin-top: 2px;
  color: inherit;
}

.el-cell .name {
  width: 100%;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: auto;
  font-weight: 700;
  color: inherit;
}

.el-cell .mass {
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1;
  text-align: center;
  color: inherit;
  opacity: 0.7;
  margin-top: 2px;
}

.el-cell.el-series {
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  cursor: default;
}

.el-cell.el-series .series-range {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.el-cell.el-series .series-name {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Цвета категорий */
.cat-alkali { background: var(--pink); color: var(--ink); }
.cat-alkaline { background: var(--amber); color: var(--ink); }
.cat-transition { background: var(--purple); color: #fff; }
.cat-post-transition { background: var(--teal); color: var(--ink); }
.cat-metalloid { background: var(--cyan); color: var(--ink); }
.cat-nonmetal { background: #A2D2FF; color: var(--ink); }
.cat-halogen { background: #B8F2E6; color: var(--ink); }
.cat-noble { background: #FFC6FF; color: var(--ink); }
.cat-lanthanide { background: #FFD6A5; color: var(--ink); }
.cat-actinide { background: #CAFFBF; color: var(--ink); }

.table-hint {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: rgba(10, 18, 36, 0.55);
}

/* ===== МОБИЛЬНЫЕ КАРТОЧКИ ===== */
.cards-wrap { padding: 14px 14px 28px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 10px;
}

.el-card {
  appearance: none;
  position: relative;
  min-height: 82px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  border: var(--border);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.el-card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.el-card:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.el-card-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.75;
}

.el-card-sym {
  font-family: var(--disp);
  font-size: 24px;
  line-height: 1.05;
  color: inherit;
}

.el-card-name {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.el-card-mass {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.1;
  color: inherit;
  opacity: 0.72;
}

.cards-empty {
  padding: 26px 12px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: rgba(10, 18, 36, 0.6);
}

/* ===== ПОДСКАЗКА (DESKTOP HOVER) ===== */
.tip {
  position: fixed;
  z-index: 1100;
  max-width: min(280px, calc(100vw - 16px));
  padding: 10px 12px;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(10, 18, 36, 0.35);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  overflow-wrap: anywhere;
}

.tip-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.tip-sym {
  font-family: var(--disp);
  font-size: 20px;
  line-height: 1;
  color: var(--cyan);
}

.tip-name {
  font-size: 13px;
  font-weight: 700;
}

.tip-meta {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

/* ===== МОДАЛКА / НИЖНЯЯ ПАНЕЛЬ ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(10, 18, 36, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-overlay.is-active { display: grid; }

.modal-window {
  width: 100%;
  max-width: 640px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: var(--border);
  box-shadow: var(--shadow-lg);
  outline: none;
  animation: modalIn 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sheet-grip {
  display: none;
  width: 44px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 99px;
  background: rgba(10, 18, 36, 0.25);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: var(--border);
}

.modal-head-main { min-width: 0; }

.modal-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
  opacity: 0.8;
}

.modal-title {
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(38px, 10vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.modal-subtitle {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.modal-subtitle .muted { opacity: 0.7; }

.modal-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  background: var(--ink);
  color: #fff;
  border: var(--border);
  box-shadow: 2px 2px 0 rgba(10, 18, 36, 0.35);
  cursor: pointer;
}

.modal-close:hover { background: var(--purple); }
.modal-close:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.data-box {
  min-width: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg-alt);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.data-box.full { grid-column: 1 / -1; }

.data-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  color: rgba(10, 18, 36, 0.6);
}

.data-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.data-value span {
  font-size: 12px;
  color: rgba(10, 18, 36, 0.7);
}

.data-value.is-ox { color: var(--purple); }

.shells-block { min-width: 0; }

.shells-title {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  color: rgba(10, 18, 36, 0.6);
}

.shells-vis {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 6px 0;
}

.shell-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.shell-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
}

.shell-circle.is-outer { background: var(--cyan); }

.shell-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.modal-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  background: var(--teal);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.modal-cta:hover {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}

.modal-cta:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

/* Блокировка скролла страницы при открытой карточке */
html.modal-open,
html.modal-open body { overflow: hidden; }

/* ===== ПОДВАЛ ===== */
.page-foot {
  margin-top: auto;
  padding: 16px clamp(14px, 3vw, 24px);
  border-top: var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: rgba(10, 18, 36, 0.6);
}

.page-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-foot a:hover { color: var(--purple); }

.noscript {
  margin: 20px;
  padding: 14px;
  font-family: var(--mono);
  font-size: 13px;
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow-sm);
}

/* ===== ПЛАНШЕТ / МОБИЛЬНЫЙ РЕЖИМ ===== */
.mobile-only { display: none; }

@media (max-width: 1023px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }

  .legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 12px 38px 12px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
  }

  .legend::-webkit-scrollbar { display: none; }

  .legend-item {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 12px;
    font-size: 11px;
  }

  .page-3d { padding-bottom: 16px; }
}

@media (max-width: 640px) {
  body { padding: 0; }

  .page-3d {
    border-left: 0;
    border-right: 0;
    max-width: none;
    box-shadow: none;
  }

  .site-header { padding: 10px 12px; gap: 10px; }
  .logo { font-size: 14px; }
  .logo-mark { width: 32px; height: 32px; font-size: 16px; }

  .page-head { padding: 18px 14px 16px; }
  .page-title { font-size: clamp(32px, 9.6vw, 42px); }
  .page-sub { font-size: 13px; }

  .modal-overlay {
    place-items: end center;
    padding: 0;
  }

  .modal-window {
    max-width: none;
    max-height: 92dvh;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -6px 0 rgba(10, 18, 36, 0.18);
    animation: sheetIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  @keyframes sheetIn {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  .sheet-grip { display: block; }

  .modal-head { padding: 14px 14px 12px; }
  .modal-body { padding: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-title { font-size: 42px; }
  .modal-subtitle { font-size: 11px; }
  .modal-close { width: 44px; height: 44px; }

  .data-grid { gap: 8px; }
  .data-box { padding: 9px; }
  .data-label { font-size: 11px; }
  .data-value { font-size: 15px; }

  .page-foot { padding: 14px; font-size: 11px; }
}

@media (max-width: 430px) {
  .logo-name { display: none; }
  .logo-short { display: inline; font-size: 13px; }

  .site-header { padding: 10px 12px; }
  .header-cta { min-height: 38px; padding: 7px 12px; font-size: 11px; }

  .sec-label { margin-bottom: 14px; }

  .page-head { padding: 16px 12px 14px; }
  .page-title { font-size: clamp(30px, 9.2vw, 38px); }

  .legend { padding: 10px 38px 10px 12px; }
  .mobile-tools { padding: 12px 12px 10px; }

  .cards-wrap { padding: 12px 12px 24px; }
  .cards { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); }
  .el-card { min-height: 84px; padding: 8px; }

  .modal-title { font-size: 40px; }
  .data-grid { grid-template-columns: 1fr; }
  .data-box.full { grid-column: auto; }
  .data-value { font-size: 16px; }
}

@media (hover: none) {
  .tip { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
