/* 67case PWA: мобильный сценарий первичен. Тема одна — тёмная (светлой нет,
   prefers-color-scheme не читаем). Направление 2026-08: street CS case arena —
   near-black, графит, жжёный orange, белые dry-brush акценты и плотный игровой
   shell с live-лентой. Редкости CS2 остаются читаемыми как ценность дропа. */

:root {
  color-scheme: dark;
  --bg: #040404;
  --bg-2: #0b0b0a;
  --panel: #151310;
  --panel-2: #201b15;
  --panel-3: #2c251c;
  --line: #3a332b;
  --text: #f7f3ec;
  --muted: #a8a095;
  --muted-2: #766f66;
  --accent: #ff7a00;
  --accent-2: #f3f0e8;
  --accent-dark: #9d3b00;
  --hot: #ffb21a;
  --neon: linear-gradient(135deg, #fff4df 0%, #ffb21a 22%, #ff6a00 58%, #9d2200 100%);
  --value: #8fd0ff;
  --success: #73d39a;
  --danger: #e36a6a;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 106, 0, 0.22), transparent 28rem),
    linear-gradient(115deg, rgba(255, 122, 0, 0.08) 0 11%, transparent 11% 60%, rgba(255, 255, 255, 0.035) 60% 61%, transparent 61%),
    repeating-linear-gradient(165deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, var(--bg) 0%, #0b0907 48%, #050505 100%);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(104deg, transparent 0 14%, rgba(255, 122, 0, 0.18) 14% 14.45%, transparent 14.45% 72%, rgba(255, 255, 255, 0.08) 72% 72.35%, transparent 72.35%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px);
  opacity: 0.64;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  /* safe-area: челка в standalone-PWA + хедер Telegram в fullscreen Mini App */
  padding: calc(7px + max(env(safe-area-inset-top), var(--tg-inset-top, 0px))) 14px 7px;
  background:
    linear-gradient(180deg, rgba(50, 37, 18, 0.82), rgba(18, 16, 13, 0.94)),
    linear-gradient(104deg, rgba(255, 122, 0, 0.15) 0 18%, transparent 18% 76%, rgba(255, 255, 255, 0.05) 76%),
    rgba(8, 8, 7, 0.96);
  border-bottom: 1px solid rgba(255, 122, 0, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 5px 11px;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  grid-row: 1 / 3;
  flex: 0 0 auto;
  width: 96px;
  min-width: 96px;
  font-weight: 800;
  /* Имя пишется слитно: широкий трекинг разбивал его на «67 case». */
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 23px;
  line-height: 1;
  padding: 0;
}

.brand img {
  display: block;
  width: 96px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(255, 106, 0, 0.32));
}

/* Имя — один flex-item: иначе `gap` топбара разрывает его на «67 case». */
.brand .wordmark {
  white-space: nowrap;
  filter: drop-shadow(0 0 14px rgba(216, 189, 122, 0.18));
}

/* «67» — градиентом, «case» — обычным текстом: цифры остаются знаком бренда. */
.brand .brand-67 {
  background: var(--neon);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(216, 189, 122, 0.24);
}

.tabs {
  display: flex;
  grid-column: 2;
  gap: 5px;
  flex: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.tabs a.active {
  color: var(--text);
  background: rgba(255, 122, 0, 0.14);
  border-color: rgba(255, 122, 0, 0.24);
  font-weight: 800;
}

.tabs a.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--neon);
}

.tabs a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.top-social {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 28px;
}

.top-social[hidden] {
  display: none;
}

.social-icon,
.site-social-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: rgba(247, 243, 236, 0.74);
  background:
    linear-gradient(145deg, rgba(255, 122, 0, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(7, 7, 6, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-decoration: none;
  transition: color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.social-icon {
  width: 30px;
  height: 26px;
}

.site-social-icon {
  width: 34px;
  height: 30px;
}

.social-icon svg,
.site-social-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.social-icon:hover,
.site-social-icon:hover {
  color: var(--text);
  border-color: rgba(255, 122, 0, 0.52);
  box-shadow: 0 0 16px rgba(255, 106, 0, 0.18);
  transform: translateY(-1px);
}

.admin-entry[hidden] {
  display: none !important;
}

/* Телефон и Mini App: вкладки — фиксированная нижняя панель, все пункты
   видны сразу (горизонтальный скролл вкладок незаметен и неудобен). */
@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .topbar {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: var(--panel);
    border-top: 1px solid rgba(216, 189, 122, 0.18);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
  }
  .tabs a {
    text-align: center;
    font-size: 12px;
    padding: 8px 2px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tabs a.active {
    color: var(--text);
    background: rgba(216, 189, 122, 0.08);
    font-weight: 700;
    box-shadow: none;
  }
  .tabs a.active::after { left: 18%; right: 18%; bottom: 5px; }
  .view {
    /* Контент не прячется под фиксированным таб-баром (footer убран). */
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .topbar {
    justify-content: space-between;
    min-height: 58px;
    z-index: 30;
    /* backdrop-filter делает .topbar containing block для fixed-потомков, а
       .tabs здесь именно fixed. С блюром панель вкладок вставала не внизу
       экрана, а внутри шапки — поверх бренда и кнопок. Фон шапки почти
       непрозрачный, так что визуально блюр тут ничего не давал. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .topbar-left {
    flex: 0 0 auto;
    grid-template-columns: auto;
    grid-template-rows: auto;
    gap: 8px;
    width: auto;
    max-width: 84px;
  }
  .brand {
    grid-row: 1;
    width: 76px;
    min-width: 76px;
    font-size: 21px;
  }
  .brand img { width: 76px; }
  .top-social {
    grid-column: 2;
    max-width: min(154px, 40vw);
    min-height: 34px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top-social {
    display: none !important;
  }
  .top-social::-webkit-scrollbar { display: none; }
  .social-icon {
    width: 32px;
    height: 30px;
  }
  .topbar-actions > .language-toggle,
  .topbar-actions > .sound-control {
    display: none;
  }
  .auth-area { flex: 0 1 auto; }
  .topbar-actions {
    margin-left: 8px;
    flex: 0 1 auto;
    max-width: calc(100vw - 104px);
    overflow: hidden;
  }
  .auth-area {
    display: inline-flex;
    justify-content: flex-end;
    min-width: 0;
    max-width: 100%;
  }
  .inline-form input { flex: 1 1 100%; }
  .inline-form button { width: 100%; }
  .auth-panel { margin: 8px auto; }
}

.view {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 28px;
  overflow-x: hidden;
}

/* Колонка задаётся явно как minmax(0, 1fr): у неявного auto-трека максимум —
   max-content, и лента розыгрыша (60 ячеек по 96px, flex-shrink: 0) растягивала
   колонку до ~5800px. Ширина самой .stage при этом оставалась прежней, поэтому
   растяжку было видно не как скролл, а как уехавшие за экран шапку, витрину и
   правые колонки строк дропа. */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.stage-head {
  position: relative;
  min-width: 0;
  min-height: 142px;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 24px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 230, 0.08);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 122, 0, 0.34), transparent 17rem),
    linear-gradient(112deg, rgba(255, 122, 0, 0.24) 0 22%, transparent 22% 52%, rgba(255, 255, 255, 0.09) 52% 66%, transparent 66%),
    repeating-linear-gradient(170deg, rgba(244, 241, 230, 0.038) 0 1px, transparent 1px 19px),
    linear-gradient(180deg, #211811, #080807);
  box-shadow: inset 0 -3px 0 rgba(255, 106, 0, 0.9), 0 18px 44px rgba(0, 0, 0, 0.34);
}

.stage-head::before {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: min(42vw, 420px);
  height: 138px;
  background:
    linear-gradient(100deg, transparent 0 20%, rgba(0, 0, 0, 0.62) 20% 76%, transparent 76%),
    repeating-linear-gradient(0deg, rgba(255, 122, 0, 0.86) 0 7px, transparent 7px 18px);
  opacity: 0.62;
  transform: skewX(-18deg);
}

.stage-kicker {
  position: relative;
  z-index: 1;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stage-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 0 #000, 0 18px 36px rgba(0, 0, 0, 0.54);
}

.stage-subline {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: 0;
  color: var(--muted);
}

.case-card {
  min-height: 312px;
  display: grid;
  grid-template-rows: minmax(190px, 1fr) auto;
  gap: 12px;
  text-align: left;
}

.case-risk-board {
  display: grid;
  gap: 18px;
}

.case-risk-board h2 {
  margin: 4px 0 0;
  text-align: center;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
}

.case-risk-list {
  display: grid;
  gap: 12px;
}

.case-risk-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.case-risk-label {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.case-risk-grid {
  grid-template-columns: repeat(auto-fit, minmax(154px, 188px));
  justify-content: center;
  gap: 14px 20px;
}

.case-risk-grid .case-card {
  min-height: 238px;
  grid-template-rows: minmax(164px, auto) auto;
  padding: 6px;
  text-align: center;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.case-risk-grid .case-card::before {
  inset: 12px 2px 38px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 122, 0, 0.12), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
  opacity: 0.7;
}

.case-risk-grid .case-art {
  min-height: 164px;
  background: transparent;
}

.case-risk-grid .case-card img {
  width: min(108%, 194px);
  height: 164px;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.62));
}

.case-risk-grid .case-meta {
  justify-items: center;
}

.case-risk-grid .case-foot {
  width: 100%;
  padding: 0 4px;
}

.case-risk-grid .card-cta {
  color: var(--accent);
}

.case-art,
.inventory-art {
  display: grid;
  place-items: center;
  min-height: 126px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.12), transparent 44%),
    radial-gradient(circle at 50% 62%, rgba(143, 208, 255, 0.12), transparent 48%),
    rgba(5, 7, 10, 0.34);
}

.case-card img {
  width: min(78%, 220px);
  height: 170px;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.58));
}

.inventory-card img {
  width: min(128px, 82%);
  height: 96px;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.55));
}

.case-meta,
.inventory-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.case-name,
.item-name {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.case-foot,
.inventory-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.card-cta {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-detail-panel {
  overflow: hidden;
}

/* Клик по карточке доскроливает сюда (cases.js): отступ уводит панель из-под
   sticky-шапки, иначе её заголовок оказывается под ней. Значение — фолбэк;
   cases.js переписывает его по фактической высоте шапки (она зависит от
   safe-area в PWA и от инсета Telegram в Mini App). */
#case-detail {
  scroll-margin-top: 84px;
}

.price-badge {
  flex: 0 0 auto;
  align-self: flex-start;
  color: #08090c;
  background: linear-gradient(135deg, #fff1d6, #ffb21a 38%, #ff6a00);
  border-radius: 6px;
  padding: 7px 10px;
  font-weight: 900;
  box-shadow: 4px 0 0 rgba(157, 59, 0, 0.86);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Состав кейса — плитка: две колонки в Mini App и на телефоне, шире —
   больше, 6 на ноутбуке. */
.drops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 560px) { .drops-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 820px) { .drops-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .drops-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Цвет редкости несёт нижняя кромка и мягкое свечение внутрь, а не заливка:
   на near-black фоне полная заливка спорит с оранжевым акцентом бренда и
   съедает читаемость названия. */
.drop-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 2px;
  padding: 10px 8px 13px;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  min-width: 0;
  border: 1px solid rgba(242, 238, 228, 0.07);
  background:
    radial-gradient(circle at 50% 128%, var(--rarity-tint), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    #100e0c;
}

.drop-tile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--rarity);
}

.drop-art {
  display: grid;
  place-items: center;
  height: 64px;
  margin-bottom: 4px;
}

.drop-art img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
}

/* Тип оружия — служебная подпись над названием; название скина главное. */
.drop-type {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  min-height: 13px;
}

.drop-name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
}

/* Название длиннее плитки режем многоточием, а не переносом: разная высота
   строк ломала бы ряд, а полное имя остаётся в title. */
.drop-type,
.drop-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-panel h2,
.game-panel h3 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .stage-head {
    min-height: 126px;
    padding: 18px 14px 14px;
  }
  .stage-title { font-size: 38px; }
  .stage-subline { font-size: 14px; }
  .case-card {
    min-height: 282px;
    grid-template-rows: minmax(172px, 1fr) auto;
  }
  .case-card img {
    width: min(76%, 200px);
    height: 156px;
  }
  .case-risk-board {
    gap: 14px;
  }
  .case-risk-board h2 {
    text-align: left;
    font-size: 25px;
  }
  .case-risk-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .case-risk-label {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .case-risk-grid {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .case-risk-grid::-webkit-scrollbar { display: none; }
  .case-risk-grid .case-card {
    flex: 0 0 min(74vw, 250px);
    min-height: 232px;
    scroll-snap-align: start;
  }
  .case-risk-grid .case-card img {
    width: min(88%, 170px);
    height: 142px;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  min-width: 0;
}

.case-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .page-shell.with-rail,
  .view {
    width: 100vw;
    max-width: 100vw;
  }
  .view { padding-left: 12px; padding-right: 12px; }
  .case-grid,
  .inventory-grid {
    grid-template-columns: 1fr;
  }
  .page-shell.with-rail,
  .page-shell.with-rail .site-strip,
  .side-rail,
  .site-feed {
    max-width: 100%;
    overflow-x: hidden;
  }
  .page-shell.with-rail .site-strip {
    padding-left: 12px;
    padding-right: 12px;
  }
  .site-feed-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

.card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 122, 0, 0.12), transparent 9rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 38%),
    linear-gradient(180deg, #1b1712, #0d0c0a);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(242, 238, 228, 0.09);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(108deg, transparent 0 64%, rgba(255, 122, 0, 0.15) 64% 68%, transparent 68%),
    repeating-linear-gradient(175deg, transparent 0 15px, rgba(255, 255, 255, 0.024) 15px 16px);
  opacity: 0.5;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 122, 0, 0.3), 0 16px 32px rgba(0, 0, 0, 0.42);
}

.card:active {
  transform: translateY(0);
}

/* Выбранный кейс. Hover на тач-устройствах не срабатывает, а состав кейса
   рендерится ниже витрины, поэтому выбор нужно показать на самой карточке. */
.case-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 32px rgba(0, 0, 0, 0.42);
}

.card .price { color: var(--value); font-weight: 700; }

.panel {
  position: relative;
  min-width: 0;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(28, 23, 18, 0.97), rgba(11, 10, 9, 0.97));
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(242, 238, 228, 0.08);
  box-shadow: inset 3px 0 0 rgba(255, 106, 0, 0.62), 0 14px 36px rgba(0, 0, 0, 0.28);
}

.panel::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 0;
  width: 92px;
  height: 4px;
  background: var(--neon);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  pointer-events: none;
}

.muted { color: var(--muted); }
.error { color: var(--danger); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.entry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(244, 241, 230, 0.09);
  overflow-wrap: anywhere;
}

.entry-row > :first-child { flex: 1 1 60%; min-width: 0; }
/* .coin-amount — сам flex-item (.price лежит внутри него), без правила он
   сжимался и на узком экране переносился на отдельную строку под названием. */
.entry-row .coin-amount,
.entry-row .price,
.entry-row .muted { flex: 0 0 auto; white-space: nowrap; }

.entry-row:last-child { border-bottom: none; }

.price { color: var(--value); font-weight: 700; }

.coin-amount {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  vertical-align: -0.08em;
}

.coin-mark {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.34) 0 24%, transparent 24% 40%, rgba(127, 63, 82, 0.42) 40% 58%, transparent 58%),
    radial-gradient(circle at 34% 30%, #fff1b8 0 18%, #d8bd7a 38%, #b9784b 72%, #7f3f52 100%);
  border: 1px solid rgba(255, 229, 170, 0.34);
  box-shadow: 0 0 0 1px rgba(8, 9, 12, 0.4), 0 0 10px rgba(216, 189, 122, 0.22);
}

.coin-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(8, 9, 12, 0.38);
}

button .coin-amount .price,
.button .coin-amount .price,
.price-badge .coin-amount .price {
  color: currentColor;
}

button, .button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff1d6, #ffb21a 34%, #ff6a00);
  color: #08090c;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  max-width: calc(100% - 8px);
  overflow-wrap: anywhere;
  box-shadow: 4px 0 0 rgba(157, 59, 0, 0.86), 0 0 0 1px rgba(244, 241, 230, 0.18);
  transition: transform 120ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

button::after, .button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 62%, rgba(255, 255, 255, 0.22) 62% 68%, transparent 68%);
  opacity: 0.5;
}

button:hover, .button:hover {
  box-shadow: 4px 0 0 var(--accent-dark), 0 0 22px rgba(255, 106, 0, 0.24);
}

button:active, .button:active {
  transform: translateY(1px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(216, 189, 122, 0.5);
  outline-offset: 2px;
}

/* Опасные действия (удаление аккаунта): без неонового градиента. */
.button-danger, button.button-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  box-shadow: none;
}
.button-danger::after, button.button-danger::after { content: none; }
.button-danger:hover { box-shadow: 0 0 12px rgba(224, 86, 79, 0.4); }

.button-secondary, button.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.button-secondary::after, button.button-secondary::after { content: none; }
.button-secondary:hover { border-color: var(--accent); box-shadow: 0 0 16px rgba(216, 189, 122, 0.14); }

/* disabled перебивает градиент: иначе неактивная кнопка выглядит как активная. */
button:disabled {
  background: var(--panel-3);
  color: var(--muted);
  cursor: default;
  box-shadow: none;
}
button:disabled::after { content: none; }

textarea, input {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
}

textarea:focus, input:focus {
  outline: 2px solid rgba(216, 189, 122, 0.34);
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea { min-height: 140px; font-family: ui-monospace, monospace; font-size: 13px; }

.fair-steps li { margin-bottom: 8px; }
.fair-ok { color: var(--success); font-weight: 700; }
.fair-pending { color: var(--value); font-weight: 700; }

.check-list { list-style: none; padding: 0; overflow-wrap: anywhere; }
.check-list li::before { content: "✗ "; color: var(--danger); }
.check-list li.ok::before { content: "✓ "; color: var(--success); }

/* --- auth / профиль --- */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.admin-entry {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 112px;
  padding: 7px 9px;
  color: rgba(242, 238, 228, 0.78);
  text-decoration: none;
  background: rgba(17, 21, 28, 0.56);
  border: 1px solid rgba(216, 189, 122, 0.14);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-entry:hover {
  color: var(--text);
  border-color: rgba(216, 189, 122, 0.38);
}

.language-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  min-width: 52px;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--text);
  background: rgba(10, 9, 8, 0.78);
  border: 1px solid rgba(255, 122, 0, 0.24);
  border-radius: 6px;
  box-shadow: none;
}

.language-toggle::after { content: none; }
.language-toggle:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(255, 106, 0, 0.14); }

.language-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-code {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.sound-control { position: relative; display: inline-flex; }
.sound-toggle { min-width: 38px; padding: 7px; }

/* Три состояния иконки собраны в одном svg и переключаются классом кнопки:
   перерисовывать разметку из JS не нужно, а шапка живёт вне перерисовки вью. */
.sound-icon .sound-body { fill: currentColor; stroke: none; }
.sound-cross { display: none; }
.sound-toggle.is-muted .sound-wave { display: none; }
.sound-toggle.is-muted .sound-cross { display: inline; }
.sound-toggle.is-low .sound-wave-high { display: none; }
.sound-toggle.is-muted { color: rgba(242, 238, 228, 0.5); }

.sound-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: 184px;
  padding: 12px;
  background: rgba(12, 15, 21, 0.97);
  border: 1px solid rgba(216, 189, 122, 0.24);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.sound-popover[hidden] { display: none; }

.sound-range-label {
  font-size: 12px;
  color: rgba(242, 238, 228, 0.72);
}
.sound-mute {
  min-height: 34px;
  font-size: 12px;
  font-weight: 800;
}
/* Включённое состояние — накрытый динамик, поэтому подсветка означает
   «звук выключен», а не «кнопка активна». */
.sound-mute[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(216, 189, 122, 0.1);
}

/* Ползунок тянут пальцем в Mini App: горизонтальный жест не конфликтует с
   вертикальным свайпом, который закрывает приложение. */
.sound-range {
  width: 100%;
  height: 24px;
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.sound-range::-webkit-slider-thumb { width: 20px; height: 20px; }

.auth-area { white-space: nowrap; min-width: 0; }
.balance-chip {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(10, 9, 8, 0.92);
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  box-shadow: inset 3px 0 0 rgba(255, 106, 0, 0.7);
}
.wallet-chip {
  animation: wallet-pulse 420ms ease-out;
}
.wallet-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.wallet-amount {
  font-weight: 800;
}
.wallet-user {
  min-width: 0;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.login-chip {
  color: #08090c;
  background: linear-gradient(135deg, #fff1d6, #ffb21a 38%, #ff6a00);
  box-shadow: 4px 0 0 rgba(157, 59, 0, 0.86);
}
.auth-panel { max-width: 420px; margin: 24px auto; }
.link-button {
  background: none;
  color: var(--accent);
  padding: 10px 6px;
  box-shadow: none;
}
.link-button::after { content: none; }

.profile-shell {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
}

.profile-title {
  min-width: 0;
}

.profile-title h1 {
  margin: 4px 0 4px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.profile-title p {
  margin: 0;
}

.section-kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.balance-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: stretch;
}

.balance-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(242, 238, 228, 0.08);
}

.balance-card strong {
  color: var(--value);
  font-size: 24px;
  line-height: 1.1;
  white-space: nowrap;
}

/* Строка курса: справка под балансом, не должна конкурировать с суммой. */
.coin-rate-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.coin-rate-hint .coin-amount .price {
  font-size: 12px;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.profile-actions button {
  width: auto;
  max-width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  text-align: center;
}

.profile-priority-grid,
.profile-money-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.profile-priority-grid .settings-section,
.profile-money-grid .settings-section {
  min-width: 0;
}

.profile-steam-card {
  display: grid;
  align-content: start;
}

.profile-steam-card p {
  margin: 0 0 14px;
  line-height: 1.45;
}

.steam-profile-link {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-option,
button.payment-option {
  width: 100%;
  max-width: 100%;
  min-height: 112px;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 9px;
  padding: 14px;
  text-align: left;
  color: var(--text);
  border: 1px solid rgba(216, 189, 122, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 189, 122, 0.13), transparent 48%),
    rgba(10, 13, 19, 0.72);
  box-shadow: inset 3px 0 0 rgba(216, 189, 122, 0.62);
}

.payment-option::after,
button.payment-option::after {
  content: none;
}

.payment-option:hover,
button.payment-option:hover {
  border-color: rgba(216, 189, 122, 0.42);
  box-shadow: inset 3px 0 0 rgba(216, 189, 122, 0.78), 0 0 18px rgba(216, 189, 122, 0.12);
}

.payment-option-title {
  min-width: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.payment-option .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.38;
}

.payment-option .status-pill {
  max-width: 100%;
  white-space: normal;
}

.payment-option.is-disabled,
button.payment-option:disabled {
  color: var(--text);
  cursor: not-allowed;
  border-color: rgba(242, 238, 228, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 52%),
    rgba(10, 13, 19, 0.58);
  box-shadow: inset 3px 0 0 rgba(242, 238, 228, 0.12);
}

.payment-option.is-disabled:hover,
button.payment-option:disabled:hover {
  border-color: rgba(242, 238, 228, 0.12);
  box-shadow: inset 3px 0 0 rgba(242, 238, 228, 0.12);
}

.profile-money-section > .payment-option {
  margin-bottom: 12px;
}

#skinsback-status p {
  margin: 10px 0 0;
}

.steam-inventory-details {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(242, 238, 228, 0.08);
}

.steam-inventory-details summary {
  cursor: pointer;
  font-size: 13px;
}

.steam-inventory-details #steam-inventory {
  margin-top: 10px;
}

.withdraw-inventory-details {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(242, 238, 228, 0.08);
}

.withdraw-inventory-details summary {
  cursor: pointer;
  font-size: 13px;
}

.withdraw-inventory-details #withdraw-inventory {
  margin-top: 10px;
}

.withdraw-inventory-list {
  display: grid;
  gap: 8px;
}

.withdraw-inventory-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(242, 238, 228, 0.1);
  border-radius: 8px;
  background: rgba(8, 10, 15, 0.42);
}

.withdraw-inventory-art {
  width: 56px;
  height: 42px;
  display: grid;
  place-items: center;
}

.withdraw-inventory-art img {
  max-width: 56px;
  max-height: 42px;
  object-fit: contain;
}

.withdraw-inventory-meta {
  min-width: 0;
}

.withdraw-inventory-meta .item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.settings-main,
.settings-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.settings-section h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head > div {
  min-width: 0;
}

.settings-form {
  display: grid;
  gap: 10px;
}

.settings-form.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.settings-form.inline-form input {
  min-width: 0;
}

.settings-form.inline-form button {
  flex: 0 0 auto;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(242, 238, 228, 0.08);
  min-width: 0;
}

.settings-row > span:first-child {
  min-width: 0;
}

.status-pill {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  border: 1px solid rgba(216, 189, 122, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(216, 189, 122, 0.08);
  font-size: 13px;
}

.status-pill a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.muted-pill {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.session-security {
  display: grid;
  gap: 12px;
}

.session-security-row {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(242, 238, 228, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 54%),
    rgba(7, 9, 13, 0.42);
}

.session-security-row-current {
  border-color: rgba(216, 189, 122, 0.28);
  background:
    linear-gradient(135deg, rgba(216, 189, 122, 0.11), transparent 42%),
    rgba(7, 9, 13, 0.54);
  box-shadow: inset 3px 0 0 rgba(216, 189, 122, 0.72);
}

.session-security-row-head {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.session-security-row-head strong,
.session-security-row-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-security-row-head strong {
  font-size: 18px;
  line-height: 1.1;
}

.session-security-row-head span {
  color: var(--muted);
  border: 1px solid rgba(242, 238, 228, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 800;
}

.session-security-meta {
  display: grid;
  gap: 7px;
  margin: 0;
  font-size: 13px;
}

.session-security-meta div {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
}

.session-security-meta dt {
  color: var(--muted);
  font-weight: 700;
}

.session-security-meta dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.session-security-recent {
  display: grid;
  gap: 8px;
}

.session-security-recent > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.session-security-hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(216, 189, 122, 0.16);
  border-radius: 8px;
  background: rgba(216, 189, 122, 0.045);
  font-size: 13px;
}

.button-logout,
button.button-logout {
  flex: 0 0 auto;
  background: linear-gradient(135deg, rgba(227, 106, 106, 0.98), rgba(127, 63, 82, 0.98));
  color: #fff;
  border: 1px solid rgba(255, 185, 185, 0.28);
  box-shadow: 4px 0 0 rgba(0, 0, 0, 0.36), 0 0 20px rgba(227, 106, 106, 0.16);
}

.button-logout::after,
button.button-logout::after {
  opacity: 0.28;
}

.button-logout:hover,
button.button-logout:hover {
  border-color: rgba(255, 212, 212, 0.46);
  box-shadow: 4px 0 0 rgba(0, 0, 0, 0.38), 0 0 24px rgba(227, 106, 106, 0.24);
}

.danger-panel {
  border-color: rgba(227, 106, 106, 0.24);
  box-shadow: inset 3px 0 0 rgba(227, 106, 106, 0.58), 0 14px 36px rgba(0, 0, 0, 0.28);
}

.delete-box {
  margin-top: 12px;
}

.totp-setup-box {
  margin-top: 12px;
}

/* Плашка «подтверди email»: заметная, но не тревожная (про восстановление
   доступа; об ограничениях говорит отдельная .activation-notice). */
.verify-notice {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(216, 189, 122, 0.28);
  border-radius: 10px;
  background: rgba(216, 189, 122, 0.06);
}

.verify-notice p {
  margin: 0 0 10px;
}

@media (max-width: 760px) {
  .profile-hero {
    display: grid;
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .balance-card {
    justify-items: stretch;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .profile-priority-grid,
  .profile-money-grid,
  .payment-options {
    grid-template-columns: 1fr;
  }
  .profile-title h1 {
    font-size: 30px;
  }
  .balance-line {
    display: grid;
    gap: 2px;
  }
  .profile-actions {
    justify-content: stretch;
  }
  .profile-actions button {
    width: 100%;
  }
  .section-head,
  .settings-row {
    align-items: flex-start;
  }
  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .section-head > .status-pill {
    justify-self: start;
  }
  .settings-form.inline-form {
    display: grid;
  }
  .settings-row {
    flex-direction: column;
  }
  .button-logout,
  button.button-logout {
    width: 100%;
    max-width: 100%;
  }
}

/* --- auction/reveal strip --- */
.auction {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), transparent 12% 88%, rgba(0, 0, 0, 0.82)),
    repeating-linear-gradient(135deg, #171d26 0 18px, #0c1017 18px 36px);
  margin: 14px 0;
  border: 1px solid rgba(216, 189, 122, 0.18);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(127, 63, 82, 0.1);
  min-height: 98px;
}
.auction::before,
.auction::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 3;
  pointer-events: none;
}
.auction::before {
  left: 0;
  background: linear-gradient(90deg, rgba(7, 8, 11, 0.94), rgba(7, 8, 11, 0));
}
.auction::after {
  right: 0;
  background: linear-gradient(270deg, rgba(7, 8, 11, 0.94), rgba(7, 8, 11, 0));
}
.auction-pin {
  position: absolute;
  left: 50%;
  top: -1px;
  bottom: -1px;
  width: 7px;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, rgba(7, 8, 11, 0.88) 0 1px, #f2eee4 1px 2px, var(--accent) 2px 5px, #f2eee4 5px 6px, rgba(7, 8, 11, 0.88) 6px 7px);
  box-shadow: 0 0 18px rgba(216, 189, 122, 0.72), 0 0 38px rgba(127, 63, 82, 0.36);
  z-index: 4;
  pointer-events: none;
}
.auction-pin::before,
.auction-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 24px;
  height: 15px;
  background: linear-gradient(135deg, #f0d99a, #b9784b);
  filter: drop-shadow(0 0 10px rgba(216, 189, 122, 0.58));
  transform: translateX(-50%);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.auction-pin::before { top: 0; }
.auction-pin::after {
  bottom: 0;
  transform: translateX(-50%) rotate(180deg);
}
.strip {
  display: flex;
  position: relative;
  z-index: 1;
  transition: transform 4.2s cubic-bezier(0.12, 0.7, 0.12, 1);
  will-change: transform;
}
.cell {
  flex: 0 0 96px;
  width: 96px;
  padding: 10px 4px;
  text-align: center;
  border-right: 1px solid rgba(244, 241, 230, 0.08);
  font-size: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent);
}
.cell img { width: 72px; height: 54px; }
.mini { width: 28px; height: 21px; vertical-align: middle; }

/* Цвет редкости живёт в переменной и применяется только там, где рамка
   действительно кодирует редкость (карточка, панель выигрыша, строка фида).
   Раньше это был border-color с !important, и он красил заодно перегородки:
   у ячейки ленты border-right — разделитель, поэтому монетная карточка
   рисовала в рулетке золотую полосу справа от суммы.

   Шкала каноническая, слаг нормализует rarity.js. Tint задан отдельной
   переменной, а не color-mix(): подложке нужен тот же цвет полупрозрачным, а
   лишняя зависимость от свежего движка в PWA без сборки того не стоит. */
[class*="rarity-"] {
  --rarity: rgba(242, 238, 228, 0.09);
  --rarity-tint: rgba(242, 238, 228, 0.04);
}
.rarity-consumer { --rarity: #b0c3d9; --rarity-tint: rgba(176, 195, 217, 0.16); }
.rarity-industrial { --rarity: #5e98d9; --rarity-tint: rgba(94, 152, 217, 0.18); }
.rarity-mil-spec { --rarity: #4b69ff; --rarity-tint: rgba(75, 105, 255, 0.22); }
.rarity-restricted { --rarity: #8847ff; --rarity-tint: rgba(136, 71, 255, 0.24); }
.rarity-classified { --rarity: #d32ce6; --rarity-tint: rgba(211, 44, 230, 0.22); }
.rarity-covert { --rarity: #eb4b4b; --rarity-tint: rgba(235, 75, 75, 0.22); }
/* Exceedingly Rare — ножи и перчатки */
.rarity-gold { --rarity: #ffd700; --rarity-tint: rgba(255, 215, 0, 0.16); }
/* монетная карточка не редкость: золотой акцент бренда, не золото шкалы */
.rarity-coins { --rarity: #d9b981; --rarity-tint: rgba(217, 185, 129, 0.16); }
.card[class*="rarity-"],
.win-panel[class*="rarity-"],
.price-card[class*="rarity-"],
.withdraw-inventory-row[class*="rarity-"] { border: 1px solid var(--rarity); }
.site-feed-row[class*="rarity-"] { border-left-color: var(--rarity); }

.win-panel {
  text-align: center;
  box-shadow: inset 4px 0 0 var(--accent), 0 0 34px rgba(216, 189, 122, 0.12);
  animation: win-reveal 260ms ease-out;
}

/* Цены нескольких маркетов в строке предмета: на мобильном — столбиком. */
.market-prices { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; }
.market-price { white-space: nowrap; font-size: 13px; }

.tg-button { background: #2aabee; color: #fff; }
.steam-button {
  display: inline-block;
  background: #171a21;
  color: #fff;
  border: 1px solid #2a475e;
}
/* Плашка «аккаунт не активирован»: денежные действия закрыты до активации. */
.activation-notice {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(216, 122, 122, 0.35);
  background: rgba(216, 122, 122, 0.07);
}
.activation-notice p { margin: 6px 0 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inline-form input { flex: 1; min-width: 0; }

/* --- аукцион --- */
.countdown {
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 2px 2px 0 #000, 0 0 22px rgba(216, 189, 122, 0.28);
  text-align: center;
}
.round-card { cursor: pointer; }
/* Пояснения к правилам раунда: читаемый абзац, а не подпись мелким шрифтом. */
.note { line-height: 1.5; margin: 8px 0; }
.jackpot-lobby h2,
.jackpot-card h3,
.jackpot-focus h2 {
  margin: 0;
}
.jackpot-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
  gap: 14px;
  align-items: stretch;
}
.jackpot-card-main {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}
.jackpot-card-main h3 {
  overflow-wrap: anywhere;
}
.jackpot-card-bank {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 5px;
  padding: 12px;
  border-radius: 6px;
  background: rgba(5, 7, 10, 0.34);
  border: 1px solid rgba(216, 189, 122, 0.14);
}
.jackpot-card-bank strong {
  font-size: 21px;
}
.hot-pill {
  color: #08090c;
  border-color: transparent;
  background: linear-gradient(135deg, #f0d99a, #c29452);
}
.jackpot-round-panel {
  display: grid;
  gap: 14px;
}
.back-link {
  text-decoration: none;
}
.jackpot-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 16px;
  align-items: stretch;
}
.jackpot-focus-title {
  min-width: 0;
}
.jackpot-bank {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(216, 189, 122, 0.12), rgba(127, 63, 82, 0.08)),
    rgba(5, 7, 10, 0.42);
  border: 1px solid rgba(216, 189, 122, 0.2);
}
.jackpot-bank strong {
  font-size: 28px;
  line-height: 1.05;
}
.jackpot-bank small {
  color: var(--muted);
}
.jackpot-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(242, 238, 228, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.028);
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.metric .countdown {
  text-align: left;
  font-size: 24px;
  line-height: 1.1;
}
.participant-list {
  display: grid;
  gap: 2px;
}
.participant-row {
  padding-left: 10px;
  border-left: 3px solid rgba(216, 189, 122, 0.14);
}
.participant-row.is-me {
  border-left-color: var(--accent);
  background: rgba(216, 189, 122, 0.06);
}
/* Ячейка ленты аукциона: вместо картинки предмета — имя игрока и его шанс. */
.wheel-cell {
  flex-basis: 120px;
  width: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 76px;
  border-top: 3px solid var(--hot);
}
.wheel-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker { margin-top: 12px; }
.jackpot-picker-panel {
  border: 1px solid rgba(216, 189, 122, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(5, 7, 10, 0.34);
}
.picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.picker-head h3 {
  margin: 2px 0 0;
}
.picker-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(216, 189, 122, 0.07);
}
.picker-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.picker-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  cursor: pointer;
  border: 1px solid rgba(244, 241, 230, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.picker-item:hover,
.picker-item.is-selected {
  border-color: rgba(216, 189, 122, 0.42);
  background: rgba(216, 189, 122, 0.065);
}
/* Скрытый чекбокс состояния: общее правило `input { width: 100% }` растягивало
   его на всю строку, и абсолютный бокс вылезал за правый край .view — там
   overflow-x: hidden, так что вместо скролла получалась невидимая зона. */
.picker-check {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.picker-toggle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(216, 189, 122, 0.4);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 3px rgba(5, 7, 10, 0.96);
}
.picker-item.is-selected .picker-toggle {
  background: var(--accent);
}
.picker-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.picker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-copy .muted {
  font-size: 12px;
}
.picker-item .price { justify-self: end; white-space: nowrap; }
.picker-item img { width: 40px; height: 30px; }
.picker-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
pre {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  overflow-x: auto;
  font-size: 12px;
}

@keyframes wallet-pulse {
  0% { box-shadow: inset 3px 0 0 rgba(185, 120, 75, 0.62), 0 0 0 rgba(216, 189, 122, 0); }
  45% { box-shadow: inset 3px 0 0 rgba(185, 120, 75, 0.62), 0 0 22px rgba(216, 189, 122, 0.2); }
  100% { box-shadow: inset 3px 0 0 rgba(185, 120, 75, 0.62), 0 0 0 rgba(216, 189, 122, 0); }
}

@keyframes win-reveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- инвентарь --- */
.inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Кнопки-фильтры инвентаря: вид как status-pill, но кликабельные. */
.filter-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.filter-pill:hover {
  color: var(--text);
  border-color: rgba(216, 189, 122, 0.34);
}

.filter-pill.is-active {
  color: var(--text);
  border-color: rgba(216, 189, 122, 0.5);
  background: rgba(216, 189, 122, 0.14);
}

/* Текущие цены маркетов в карточке инвентаря. */
.market-quotes {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Обращение в поддержку: кнопка в футере и модалка */
.support-button { margin-top: 12px; }

.support-email {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}

.support-email a {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.support-email a:hover { text-decoration: underline; }

.support-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 14, 0.72);
  z-index: 90;
  padding: 16px;
}

.support-modal {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-modal textarea,
.support-modal input {
  width: 100%;
  resize: vertical;
}

.support-modal-actions { display: flex; gap: 10px; }

/* История профиля: вкладки и таблицы */
.history-section { margin-top: 18px; }

.history-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  white-space: nowrap;
}

.history-table th { color: var(--muted-text, #9aa0ab); font-weight: 500; }

@media (max-width: 640px) {
  .history-table { display: block; overflow-x: auto; }
}

.history-win { color: #8fbf8f; }
.history-loss { color: #d97b7b; }

/* Подсказка про приватность Steam-инвентаря в профиле */
.steam-privacy-note {
  margin-top: 10px;
}

.steam-privacy-note summary {
  cursor: pointer;
  font-size: 13px;
}

.steam-privacy-note p {
  margin: 8px 0 0;
  font-size: 13px;
}

.inventory-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.inventory-card {
  min-height: 238px;
  display: grid;
  grid-template-rows: minmax(108px, auto) 1fr auto;
  gap: 10px;
  text-align: left;
  cursor: default;
}

.inventory-card .sell {
  width: 100%;
  max-width: none;
}

.inventory-art {
  min-height: 108px;
}

.inventory-art img {
  width: min(116px, 84%);
  height: 82px;
}

.inventory-line {
  align-items: flex-start;
}

.inventory-line .status-pill {
  flex: 0 0 auto;
  max-width: 92px;
}

@media (max-width: 760px) {
  .jackpot-card,
  .jackpot-focus,
  .jackpot-metrics {
    grid-template-columns: 1fr;
  }
  .jackpot-card-bank,
  .jackpot-bank {
    justify-items: start;
  }
  .case-detail-head {
    display: grid;
  }
  .price-badge {
    justify-self: start;
  }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-card {
    padding: 10px;
  }
  .inventory-line {
    display: grid;
    justify-content: stretch;
  }
  .inventory-line .status-pill {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  .topbar {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand {
    width: 64px;
    min-width: 64px;
    font-size: 20px;
    position: relative;
    z-index: 40;
  }
  .brand img { width: 64px; }
  .topbar-left { gap: 6px; }
  .top-social { max-width: min(118px, 31vw); }
  .social-icon {
    width: 28px;
    height: 28px;
  }
  .social-icon svg {
    width: 15px;
    height: 15px;
  }
  .topbar-actions {
    position: relative;
    z-index: 40;
  }
  .balance-chip {
    gap: 6px;
    padding: 7px 8px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .language-toggle {
    min-width: 38px;
    padding: 7px;
  }
  .language-code {
    display: none;
  }
  .sound-popover {
    width: 168px;
    right: -4px;
  }
  .wallet-label,
  .wallet-user {
    display: none;
  }
  .wallet-amount {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .case-grid,
  .inventory-grid {
    gap: 10px;
    grid-template-columns: 1fr;
  }
  .case-card,
  .inventory-card {
    padding: 10px;
  }
  .case-card {
    min-height: 226px;
  }
  .inventory-card {
    min-height: 224px;
  }
  .metric {
    padding: 10px;
  }
}

/* --- 2FA (TOTP) --- */
.totp-qr {
  width: 180px;
  max-width: 100%;
  background: #fff; /* QR без собственного фона нечитаем на тёмной теме */
  padding: 10px;
  border-radius: 6px;
}

/* --- витрина цен (/prices) --- */
.price-card { padding: 10px 12px; }
.price-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; min-width: 0; }
.price-head img { flex: 0 0 auto; }
.price-head > div { min-width: 0; overflow-wrap: anywhere; }
.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 4px 0;
  font-size: 13px;
  border-top: 1px solid rgba(244, 241, 230, 0.08);
}
.price-provider { min-width: 92px; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* --- витрина: согласия, счётчики, соцсети (static/js/site.js) --- */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 3, 3, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.consent-panel { max-width: 440px; margin: 0; }
.consent-panel h3 { margin-top: 0; color: var(--accent); }

/* Обёртка контента: на главной — grid «контент + правая колонка live-лент»,
   на остальных страницах rail скрыт и обёртка прозрачна для layout. */
.page-shell {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.page-shell.with-rail {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 0 12px;
  align-items: start;
}

.page-shell.with-rail > .view {
  grid-column: 2;
}

.site-strip {
  width: 100%;
  padding: 18px 0 0 16px;
}

.page-shell.with-rail .site-strip {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 66px;
  max-height: calc(100vh - 78px);
  overflow-y: auto;
  scrollbar-width: thin;
}

@media (max-width: 1100px) {
  .page-shell.with-rail {
    display: flex;
    flex-direction: column;
  }
  /* На мобильном ленты уходят под контент, а не над ним. */
  .page-shell.with-rail .site-strip {
    order: 2;
    position: static;
    max-height: none;
    padding: 0 16px 16px;
  }
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-rail-meta {
  display: grid;
  gap: 8px;
}

.site-feed {
  min-width: 0;
  border: 1px solid rgba(255, 122, 0, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.08), transparent 42%),
    rgba(16, 14, 12, 0.82);
  padding: 10px;
  box-shadow: inset 3px 0 0 rgba(255, 106, 0, 0.42), 0 12px 24px rgba(0, 0, 0, 0.22);
}
.site-showcase-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 4px 0;
}
.site-feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.site-feed-head b {
  font-size: 14px;
  color: var(--text);
}
.site-feed-list {
  display: grid;
  gap: 6px;
}
.site-feed-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 7px 0 7px 8px;
  border-left: 3px solid transparent;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent);
  border-radius: 6px;
}
.site-feed-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.site-feed-copy b,
.site-feed-copy span,
.site-feed-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-feed-copy b {
  color: var(--text);
  font-size: 13px;
}
.site-feed-copy span {
  color: var(--muted);
  font-size: 13px;
}
.site-feed-copy small {
  color: var(--muted-2);
  font-size: 11px;
}
.site-feed-empty { margin: 0; font-size: 13px; }
.site-feed-row .price {
  white-space: nowrap;
  font-size: 12px;
}
.site-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.site-stat {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(255, 122, 0, 0.18);
  border-radius: 7px;
  background:
    linear-gradient(140deg, rgba(255, 122, 0, 0.08), transparent 48%),
    rgba(8, 8, 7, 0.58);
}
.site-stats b {
  min-width: 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-stats small {
  min-width: 0;
  color: var(--muted);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.site-rail-stats {
  grid-template-columns: minmax(0, 1fr);
}
.site-rail-stats .site-stat {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: baseline;
}
.site-social {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-footer {
  width: 100%;
  margin-top: 22px;
  padding: 15px 16px calc(15px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 122, 0, 0.22);
  background:
    linear-gradient(180deg, rgba(34, 24, 14, 0.86), rgba(7, 7, 6, 0.96)),
    rgba(10, 9, 8, 0.86);
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.82fr) minmax(250px, 0.86fr);
  gap: 14px 24px;
  align-items: start;
}
.site-footer-title {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
.site-footer-legal p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.site-footer-legal p + p { margin-top: 5px; }
.site-footer-note { color: var(--muted-2); }
.site-footer-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 10px;
}
.site-footer-doc-links a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer-doc-links a:hover { color: var(--text); }

/* Правовые страницы: узкая читабельная колонка, работает и в Mini App. */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 24px;
}
.legal-page h2 { margin: 0 0 6px; }
.legal-version { margin: 0 0 12px; font-size: 12px; }
.legal-notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line, rgba(155, 163, 175, 0.25));
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.legal-section { margin: 0 0 14px; }
.legal-section h3 { margin: 0 0 4px; font-size: 15px; }
.legal-section p { margin: 0; font-size: 13px; line-height: 1.45; }
.legal-links { margin-top: 18px; }
.legal-links a {
  display: inline-block;
  margin: 2px 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-links a:hover { color: var(--text); }
.site-build-info {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin: 0 !important;
  color: rgba(155, 163, 175, 0.38) !important;
  font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}
.site-build-info span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.site-build-info:hover {
  color: rgba(155, 163, 175, 0.72) !important;
}
.site-footer-side {
  min-width: 0;
  display: grid;
  gap: 16px;
}
.site-media-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 6px;
}
.site-media-link {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-media-link small {
  color: var(--muted);
  font-size: 10px;
}
.site-media-link:hover { border-color: rgba(242, 184, 75, 0.55); }
.site-media-placeholder {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.site-footer-stats { gap: 5px 12px; font-size: 12px; }
.site-footer-counters { min-width: 0; }

@media (max-width: 640px) {
  .site-showcase { grid-template-columns: minmax(0, 1fr); }
  .site-feed-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .site-feed-head b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .site-footer { margin-top: 18px; padding-top: 14px; }
  .site-footer-inner { grid-template-columns: minmax(0, 1fr); }
  .site-build-info { font-size: 10px !important; }
  .site-media-list { grid-template-columns: minmax(0, 1fr); }
  .picker-head { grid-template-columns: minmax(0, 1fr); }
  .picker-item {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .picker-item .price {
    grid-column: 3;
    justify-self: start;
  }
  .picker-actions { justify-content: stretch; }
  .picker-actions button { width: 100%; }
}
