:root {
  --ink: #0e1210;
  --ink-soft: #1a221c;
  --muted: #6b756e;
  --line: rgba(14, 18, 16, 0.1);
  --bg: #f2f5f0;
  --panel: #ffffff;
  --lime: #c8f542;
  --lime-deep: #9fd100;
  --mint: #2ee6a6;
  --accent: #122019;
  --soft: #e9f6c8;
  --glass: rgba(255, 255, 255, 0.72);
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Unbounded", system-ui, sans-serif;
  --header-h: 72px;
  --shorts-w: 280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(200, 245, 66, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(46, 230, 166, 0.18), transparent 50%),
    radial-gradient(ellipse 40% 30% at 70% 90%, rgba(200, 245, 66, 0.12), transparent 55%),
    var(--bg);
}

img { max-width: 100%; display: block; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.wrap { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }

/* Shell: слева hero+каталог, справа Shorts (липнет при скролле) */
.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 16px;
  align-items: start;
  padding-top: 16px;
  padding-bottom: 40px;
  transition: grid-template-columns 0.28s ease;
}
.page-shell.is-shorts-collapsed {
  grid-template-columns: minmax(0, 1fr) 56px;
}
.page-shell.is-rail-mid {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 25vw);
}
.page-shell.is-rail-wide {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 80vw);
}
.page-shell.is-rail-mid .shorts-rail,
.page-shell.is-rail-wide .shorts-rail {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  width: auto;
  max-width: none;
  height: calc(100vh - var(--header-h) - 28px);
  max-height: calc(100vh - var(--header-h) - 28px);
  border-radius: 24px;
  padding: 14px;
  z-index: 5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
/* Shorts mid/mobile: одно видео + peek следующего (как TikTok) */
.shorts-rail.is-shorts .shorts-rail__track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  overflow-x: hidden;
}
.shorts-rail.is-shorts .short {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  flex: 0 0 calc(100% - 56px);
  height: calc(100% - 56px);
  min-height: calc(100% - 56px);
  max-height: calc(100% - 56px);
  aspect-ratio: auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #0a0e0c;
}
.page-shell.is-rail-mid .shorts-rail.is-shorts .shorts-rail__track,
.shorts-rail.is-shorts.is-rail-mid .shorts-rail__track {
  display: flex;
  flex-direction: column;
}
.page-shell.is-rail-wide .shorts-rail.is-shorts .shorts-rail__track,
.shorts-rail.is-shorts.is-rail-wide .shorts-rail__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  scroll-snap-type: none;
  align-content: start;
}
.page-shell.is-rail-wide .shorts-rail.is-shorts .short,
.shorts-rail.is-shorts.is-rail-wide .short {
  flex: none;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 9 / 16;
}
.page-shell__main { min-width: 0; max-width: 100%; overflow-x: clip; }
.scroll-btn--wide {
  background: rgba(200, 245, 66, 0.2);
  border-color: rgba(200, 245, 66, 0.55);
}
body.is-rail-fullscreen {
  overflow: hidden;
}
body.is-rail-fullscreen .admin-bar.is-visible {
  display: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(242, 245, 240, 0.78);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--header-h);
}
.logo {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.05em;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.logo span { color: #5a8f00; }

.header-chat { display: none !important; }
.header-chat-btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--lime);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.header-chat-btn:hover {
  transform: translateY(-1px);
  background: #000;
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.28);
}

.header__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Buttons */
.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--ink);
  color: var(--lime);
}
.btn--primary:hover {
  background: #000;
  box-shadow: 0 0 0 4px rgba(200, 245, 66, 0.25);
}
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}
.btn--glass {
  background: var(--glass);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn--glass:hover { background: #fff; }
.btn--sm { padding: 8px 14px; font-size: 0.9rem; }
.btn--price {
  padding: 10px 28px !important;
  font-size: 0.95rem;
  min-width: 132px;
}

/* Hero — левая колонка рядом с Shorts (−30% по высоте) */
.hero {
  position: relative;
  min-height: min(50vh, 434px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: heroZoom 14s ease-in-out infinite alternate;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 18, 16, 0.15) 0%, rgba(14, 18, 16, 0.55) 55%, rgba(14, 18, 16, 0.82) 100%),
    linear-gradient(90deg, rgba(14, 18, 16, 0.55) 0%, transparent 60%);
}
@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px 28px 22px;
  color: #fff;
  animation: riseIn 0.7s ease both;
}
.hero__content > * { max-width: 34rem; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(200, 245, 66, 0.18);
  border: 1px solid rgba(200, 245, 66, 0.45);
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 8vw, 5rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
  margin: 0 0 14px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* Shop section */
.section { padding: 28px 0 8px; }
.shop__catalog {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.shop__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.shop__head h2 {
  font-family: var(--display);
  letter-spacing: -0.04em;
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: 0.15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--lime);
}

/* Filter board: types + sizes */
.filter-board {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  min-width: 0;
  max-width: 100%;
}
.filter-panel {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.filter-panel--sizes {
  background: linear-gradient(180deg, rgba(233, 246, 200, 0.45), rgba(255, 255, 255, 0.85));
}
.filter-panel__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.filter-panel__head strong {
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: -0.03em;
}
.filter-panel__head span {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}
.filter-panel__row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow: hidden; /* only as many chips as fit the row width */
  padding: 2px 2px 4px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.filter-panel__row::-webkit-scrollbar { height: 4px; }
.filter-panel__row::-webkit-scrollbar-thumb {
  background: rgba(159, 209, 0, 0.55);
  border-radius: 99px;
}
.filter-panel__row--sizes {
  gap: 5px;
}
.filter-panel__row > .type-btn,
.filter-panel__row > .size-btn {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.type-btn {
  appearance: none;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.type-btn__icon-wrap {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  line-height: 0;
}
.type-btn__svg {
  width: 28px;
  height: 34px;
  flex: 0 0 auto;
  display: block;
  background: none;
  box-shadow: none;
}
.type-btn__count {
  position: absolute;
  right: -5px;
  bottom: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}
.type-btn.is-active .type-btn__count {
  background: var(--ink);
  color: var(--lime);
}
.type-btn__sale {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e11d48;
  color: #fff;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.type-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(159, 209, 0, 0.85);
  box-shadow: 0 0 0 2px rgba(200, 245, 66, 0.2);
}
.type-btn.is-active {
  background: var(--lime);
  border-color: #9fd100;
  color: var(--ink);
  box-shadow: 0 0 0 2px rgba(159, 209, 0, 0.35);
  font-weight: 800;
}
.type-btn.is-active .type-btn__name {
  color: var(--ink);
}
.type-btn__name {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: left;
  line-height: 1.15;
  white-space: nowrap;
}
.type-btn__shape {
  width: 16px;
  height: 18px;
  position: relative;
  display: block;
  flex: 0 0 auto;
}
.type-btn__shape--all {
  border: 2px dashed currentColor;
  border-radius: 10px;
  opacity: 0.7;
}
.type-btn__shape--zip,
.type-btn__shape--slider {
  width: 34px;
  height: 46px;
  border: 2px solid currentColor;
  border-radius: 7px 7px 9px 9px;
}
.type-btn__shape--zip::before,
.type-btn__shape--slider::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 16%;
  right: 16%;
  height: 12%;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.type-btn__shape--slider::after {
  content: "";
  position: absolute;
  top: 16%;
  left: 55%;
  width: 28%;
  height: 16%;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.55;
}
.type-btn__shape--doy {
  width: 36px;
  height: 48px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 14px 14px;
  clip-path: polygon(8% 18%, 92% 18%, 100% 100%, 0 100%);
}
.type-btn__shape--doy::before {
  content: "";
  position: absolute;
  top: 22%;
  left: 20%;
  right: 20%;
  height: 10%;
  border-top: 2px solid currentColor;
  opacity: 0.7;
}
.type-btn__shape--flat {
  width: 40px;
  height: 34px;
  border: 2px solid currentColor;
  border-radius: 6px;
  margin-top: 8px;
}
.type-btn__shape--kraft {
  width: 36px;
  height: 46px;
  border: 2px solid currentColor;
  border-radius: 4px 4px 10px 10px;
}
.type-btn__shape--kraft::after {
  content: "";
  position: absolute;
  inset: 55% 18% 12%;
  background: currentColor;
  opacity: 0.2;
  border-radius: 2px;
}
.type-btn__shape--courier {
  width: 46px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 4px;
  margin-top: 10px;
  transform: skewX(-8deg);
}
.type-btn__shape--courier::before {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 2px solid currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 55%);
  opacity: 0.55;
}
.type-btn__shape--vac {
  width: 34px;
  height: 46px;
  border: 2px solid currentColor;
  border-radius: 4px;
}
.type-btn__shape--vac::before,
.type-btn__shape--vac::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  height: 2px;
  background: currentColor;
  opacity: 0.45;
}
.type-btn__shape--vac::before { top: 35%; }
.type-btn__shape--vac::after { top: 55%; }
.type-btn__shape--bubble {
  width: 40px;
  height: 40px;
  border: 2px solid currentColor;
  border-radius: 12px;
  margin-top: 4px;
  background:
    radial-gradient(circle at 30% 35%, currentColor 0 3px, transparent 4px),
    radial-gradient(circle at 62% 40%, currentColor 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 45% 65%, currentColor 0 3px, transparent 4px);
  opacity: 0.85;
}

.size-btn {
  appearance: none;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.size-btn--num .size-btn__name {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.size-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(159, 209, 0, 0.85);
  box-shadow: 0 0 0 2px rgba(200, 245, 66, 0.2);
}
.size-btn.is-active {
  background: var(--lime);
  border-color: #9fd100;
  color: var(--ink);
  box-shadow: 0 0 0 2px rgba(159, 209, 0, 0.35);
}
.size-btn.is-active .size-btn__name {
  color: var(--ink);
}
.size-btn__bag {
  display: block;
  width: 14px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 3px 3px 4px 4px;
  position: relative;
  opacity: 0.9;
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(200, 245, 66, 0.18), transparent 70%);
}
.size-btn.is-active .size-btn__bag {
  background: linear-gradient(180deg, rgba(200, 245, 66, 0.35), transparent 70%);
}
.size-btn__bag::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 18%;
  right: 18%;
  height: 14%;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.75;
}
.size-btn__bag.has-print::after {
  content: "";
  position: absolute;
  left: 28%;
  right: 28%;
  top: 48%;
  height: 10%;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
}
.size-btn__name {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Catalog — миниатюры ~30% меньше */
.catalog {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: riseIn 0.5s ease both;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(159, 209, 0, 0.55);
}
.card:focus-visible {
  outline: 2px solid var(--lime-deep);
  outline-offset: 2px;
}
.card__media {
  aspect-ratio: 1;
  background: #e8eee6;
  overflow: hidden;
  position: relative;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card__media img { transform: scale(1.05); }
.card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(14, 18, 16, 0.82);
  color: var(--lime);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  z-index: 1;
}
.card__sale {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fb7185 0%, #e11d48 55%, #be123c 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.45);
  z-index: 1;
  letter-spacing: -0.04em;
}
.card__sale::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.is-admin .card__sale {
  right: 42px; /* leave room for edit button */
}
.card__edit {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  z-index: 2;
}
.card__body {
  padding: 10px;
  display: grid;
  gap: 3px;
  flex: 1;
}
.card__body h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.card__meta { color: var(--muted); font-size: 0.72rem; }
.card__price {
  font-weight: 800;
  font-size: 0.88rem;
  margin-top: 2px;
}
.card__actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.card__actions .btn {
  flex: 1;
  justify-content: center;
  padding: 7px 6px;
  font-size: 0.72rem;
}
.empty-catalog {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 600;
  background: rgba(255,255,255,0.6);
}

/* Shorts rail — справа от hero, sticky; сюда же встраивается бот */
.shorts-rail {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  align-self: start;
  background: var(--ink);
  color: #fff;
  border-radius: 24px;
  padding: 14px;
  height: calc(100vh - var(--header-h) - 28px);
  max-height: calc(100vh - var(--header-h) - 28px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  z-index: 5;
  transition: height 0.28s ease, padding 0.28s ease, border-radius 0.28s ease;
}
.shorts-rail__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.shorts-rail__panel[hidden],
.chat__messages[hidden],
.chat[hidden] {
  display: none !important;
}
.shorts-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.shorts-rail__title h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.03em;
}
.shorts-rail__title span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}
.shorts-rail__tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.scroll-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime);
  font-weight: 800;
  cursor: pointer;
  transition: 0.15s ease;
  line-height: 1;
}
.scroll-btn:hover {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}
.scroll-btn:disabled {
  opacity: 0.35;
  cursor: default;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
}
.scroll-btn--fold {
  background: rgba(200, 245, 66, 0.16);
  border-color: rgba(200, 245, 66, 0.45);
}

.shorts-rail__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.shorts-rail__track {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 245, 66, 0.4) transparent;
  outline: none;
}
.shorts-rail__track::-webkit-scrollbar { width: 4px; }
.shorts-rail__track::-webkit-scrollbar-thumb {
  background: rgba(200, 245, 66, 0.45);
  border-radius: 99px;
}

/* Collapsed: split Shorts / bot */
.shorts-rail__split {
  display: none;
  flex: 1;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.shorts-rail__split[hidden] { display: none !important; }
.shorts-rail.is-chat {
  background: var(--ink);
  border-radius: 24px;
}
.shorts-rail.is-collapsed {
  position: sticky;
  width: auto;
  height: calc(100vh - var(--header-h) - 28px);
  max-height: calc(100vh - var(--header-h) - 28px);
  padding: 8px 4px;
  border-radius: 18px;
  box-shadow: none;
}
.shorts-rail.is-collapsed .shorts-rail__split {
  display: flex;
}
.shorts-rail__split-btn {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lime);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.shorts-rail__split-btn:hover {
  background: rgba(200, 245, 66, 0.18);
  border-color: rgba(200, 245, 66, 0.5);
}
.shorts-rail__split-btn--bot {
  color: #fff;
  background: rgba(200, 245, 66, 0.1);
}

.short {
  flex: 0 0 auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 9 / 14;
  position: relative;
  cursor: pointer;
  text-align: left;
  color: #fff;
  background: #1a221c;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  animation: shortIn 0.55s ease both;
  box-shadow: 0 0 0 0 rgba(200, 245, 66, 0);
}
.short:nth-child(1) { animation-delay: 0.02s; }
.short:nth-child(2) { animation-delay: 0.06s; }
.short:nth-child(3) { animation-delay: 0.1s; }
.short:nth-child(4) { animation-delay: 0.14s; }
.short:nth-child(5) { animation-delay: 0.18s; }
@keyframes shortIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.short:hover { transform: scale(0.985); }
.short.is-playing {
  box-shadow: 0 0 0 2px rgba(200, 245, 66, 0.55), 0 12px 28px rgba(0, 0, 0, 0.35);
}
.short__poster,
.short__video,
.short img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
  transform: none;
}
.short__poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.short__video {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}
.short.is-playing .short__video {
  animation: none;
}
.short.is-playing .short__poster {
  opacity: 0;
}
.short__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.short.is-playing .short__overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 35%, rgba(0, 0, 0, 0.72) 100%);
}
.short__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: rgba(200, 245, 66, 0.92);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  transition: transform 0.25s ease;
}
.short.is-playing .short__tag {
  animation: tagPulse 1.6s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.5); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(200, 245, 66, 0); }
}
.short__live {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(14, 18, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.short.is-playing .short__live { display: inline-flex; }
.short__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4d4d;
  animation: liveBlink 1s ease-in-out infinite;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.short__play {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(14, 18, 16, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  animation: playPulse 2s ease-in-out infinite;
}
@keyframes playPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(200, 245, 66, 0); }
}
.short.is-playing .short__play {
  opacity: 0;
  animation: none;
}
.short.is-playing:hover .short__play,
.short.is-playing:focus-within .short__play {
  opacity: 1;
}
.short__label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 18px;
  z-index: 3;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 0.35s ease;
}
.short.is-playing .short__label {
  transform: translateY(-4px);
}
.short__progress {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.short.is-playing .short__progress { opacity: 1; }
.short__progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), #2ee6a6);
  transition: width 0.1s linear;
}

/* Print */
.print-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(200, 245, 66, 0.35), rgba(46, 230, 166, 0.15)),
    #fff;
  border: 1px solid rgba(159, 209, 0, 0.35);
  margin-top: 18px;
}
.print-block h2 {
  font-family: var(--display);
  margin: 0 0 8px;
  letter-spacing: -0.04em;
  font-size: 1.5rem;
}
.print-block p { margin: 0; color: var(--muted); max-width: 46ch; }

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 100px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.footer__brand {
  display: grid;
  gap: 4px;
}
.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.social-link svg {
  width: 20px;
  height: 20px;
  display: block;
}
.social-link:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  background: var(--ink);
  color: var(--lime);
}

/* Modal */
.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(920px, calc(100% - 24px));
  width: 100%;
}
.modal::backdrop { background: rgba(14, 18, 16, 0.55); }
.modal__panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.modal__head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}
.modal__body { padding: 16px; }
.muted { color: var(--muted); margin: 0 0 12px; }
.tiny { font-size: 0.82rem; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.price-table th, .price-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
}
.price-table th {
  background: #f3f7ea;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.price-table tr:last-child td { border-bottom: 0; }
.price-table td:not(:first-child),
.price-table th:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

/* Chat — тёмная тема как Shorts, скругление */
.chat-fab {
  display: none !important;
}

.chat.chat--rail,
.chat {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  background: transparent;
  border: 0;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  flex: 1;
  min-height: 0;
  gap: 8px;
}
.chat.chat--rail .chat__head {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px 12px;
}
.chat.chat--rail .chat__head .icon-btn,
.chat.chat--rail .scroll-btn {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--lime);
}
.chat.chat--rail .chat__modes {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
}
.chat.chat--rail .mode {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
}
.chat.chat--rail .mode.is-active {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.chat.chat--rail .chat__messages {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}
.chat.chat--rail .msg--bot {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}
.chat.chat--rail .msg--user {
  background: rgba(200, 245, 66, 0.18);
  border: 1px solid rgba(200, 245, 66, 0.35);
  color: #fff;
}
.chat.chat--rail .order-summary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}
.chat.chat--rail .product-card-chat,
.chat.chat--rail .order-card-chat,
.chat.chat--rail .history-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
}
.chat.chat--rail .product-card-chat:hover,
.chat.chat--rail .order-card-chat:hover,
.chat.chat--rail .history-item:hover,
.chat.chat--rail .history-item.is-focus {
  background: rgba(200, 245, 66, 0.12);
  border-color: rgba(200, 245, 66, 0.4);
}
.chat.chat--rail .product-card-chat__body span,
.chat.chat--rail .order-card-chat__body span,
.chat.chat--rail .history-item__sum,
.chat.chat--rail .history-item__meta {
  color: rgba(255, 255, 255, 0.65);
}
.chat.chat--rail .chat__quick {
  background: transparent;
  padding: 0 2px;
}
.chat.chat--rail .chat__quick button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
}
.chat.chat--rail .chat__quick button:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.chat.chat--rail .chat__form {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.chat.chat--rail .chat__form input,
.chat.chat--rail .chat__form input[type="text"] {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 12px;
}
.chat.chat--rail .chat__form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.chat.chat--rail .upload {
  background: rgba(200, 245, 66, 0.1);
  color: var(--lime);
  border-color: rgba(200, 245, 66, 0.4);
  border-radius: 12px;
}

.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
  flex-shrink: 0;
}
.chat__head strong {
  display: block;
  font-family: var(--display);
  letter-spacing: -0.03em;
  font-size: 0.95rem;
}
.chat__status {
  font-size: 0.72rem;
  color: var(--lime);
  font-weight: 700;
}
.chat__modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.mode {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--lime);
}
.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7faf4;
  min-height: 0;
}
.chat__messages[hidden] {
  display: none !important;
}
.msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.92rem;
  white-space: pre-wrap;
}
.msg--typing {
  opacity: 0.75;
  font-style: italic;
}
.chat.chat--rail .msg--typing {
  background: rgba(200, 245, 66, 0.08);
  border: 1px dashed rgba(200, 245, 66, 0.35);
}
.msg--bot {
  background: #fff;
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg--user {
  background: var(--ink);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg__meta {
  display: block;
  font-size: 0.72rem;
  opacity: 0.7;
  margin-bottom: 4px;
  font-weight: 700;
}
.mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.mockup-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.mockup-card canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #eef3ef;
}
.mockup-card .cap {
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}
.order-summary {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 0.85rem;
}
.product-card-chat,
.order-card-chat,
.history-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.product-card-chat:hover,
.order-card-chat:hover,
.history-item:hover,
.history-item.is-focus {
  border-color: var(--ink);
  background: var(--soft);
}
.product-card-chat img,
.order-card-chat img,
.history-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
  background: #eef2ef;
}
.product-card-chat__body,
.order-card-chat__body,
.history-item > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.product-card-chat__body span,
.order-card-chat__body span,
.history-item__sum,
.history-item__meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.order-card-chat__status {
  font-weight: 700;
  color: #5a8f00 !important;
}
.history-list {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}
.attach-preview {
  margin-top: 8px;
}
.attach-preview img {
  max-width: 160px;
  border-radius: 10px;
  display: block;
}
.chat__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 8px;
}
.chat__quick button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}
.chat__quick button:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.chat__form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat__form input[type="text"] {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}
.upload {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(159, 209, 0, 0.7);
  border-radius: 12px;
  padding: 0 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #5a8f00;
  cursor: pointer;
  background: var(--soft);
  min-width: 42px;
  min-height: 42px;
}
.upload--attach {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}
.upload__icon {
  display: grid;
  place-items: center;
}
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 12px;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 8px;
  min-height: 360px;
  height: 100%;
}
.kanban__col {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  min-width: 200px;
}
.kanban__col header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.kanban__col h3 {
  margin: 0;
  font-size: 0.9rem;
}
.kanban__col header span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}
.kanban__cards {
  display: grid;
  gap: 8px;
}
.kanban-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.kanban-card__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
}
.kanban-card__title {
  font-weight: 700;
  font-size: 0.88rem;
}
.kanban-card__status {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}
.kanban-card__status select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}
.modal__panel--kanban {
  width: min(1100px, 96vw);
  max-height: 90vh;
}

/* Tablet */
@media (max-width: 1100px) {
  .catalog { grid-template-columns: repeat(3, 1fr); }
  :root { --shorts-w: 220px; }
}

/* Mobile: Shorts / бот на всю ширину; категории — карусель */
@media (max-width: 860px) {
  .hero { min-height: min(44vh, 340px); border-radius: 20px; }
  .hero__content { padding: 28px 18px 24px; }

  .header__inner { flex-wrap: wrap; padding: 8px 0; }
  .header-chat-btn { order: 3; }

  :root { --shorts-w: 48px; --header-h: 118px; }

  .page-shell {
    gap: 10px;
    padding-top: 12px;
    grid-template-columns: minmax(0, 1fr) 48px;
  }
  .page-shell.is-shorts-collapsed {
    grid-template-columns: minmax(0, 1fr) 48px;
  }
  /* expanded Shorts/bot: full-width overlay on mobile */
  .page-shell:not(.is-shorts-collapsed) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .page-shell.is-rail-mid,
  .page-shell.is-rail-wide {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .page-shell:not(.is-shorts-collapsed) .shorts-rail,
  .page-shell.is-rail-mid .shorts-rail,
  .page-shell.is-rail-wide .shorts-rail,
  .shorts-rail.is-shorts,
  .shorts-rail.is-chat {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: var(--header-h) !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100dvh - var(--header-h)) !important;
    max-height: calc(100dvh - var(--header-h)) !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 12px 14px 18px !important;
    z-index: 60 !important;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  /* Только активная панель: в боте — чат, в Shorts — лента */
  .shorts-rail.is-chat #panel-shorts,
  .shorts-rail.is-shorts #chat-widget {
    display: none !important;
  }
  .shorts-rail.is-chat #chat-widget:not([hidden]),
  .shorts-rail.is-shorts #panel-shorts:not([hidden]) {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }
  .shorts-rail.is-shorts .shorts-rail__body {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
  }
  .shorts-rail.is-shorts .shorts-rail__track {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }
  .shorts-rail.is-chat .chat__messages[hidden] {
    display: none !important;
  }
  .scroll-btn--wide { display: none !important; }

  .shorts-rail {
    top: calc(var(--header-h) + 8px);
    height: calc(100dvh - var(--header-h) - 20px);
    max-height: calc(100dvh - var(--header-h) - 20px);
    padding: 8px;
    border-radius: 18px;
  }
  .shorts-rail.is-collapsed {
    position: sticky !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    height: calc(100dvh - var(--header-h) - 20px) !important;
    max-height: calc(100dvh - var(--header-h) - 20px) !important;
    padding: 8px 4px !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    z-index: 5 !important;
  }
  .chat.chat--rail .chat__modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
  }
  .chat.chat--rail .mode {
    padding: 5px 4px;
    font-size: 0.68rem;
    border-radius: 999px;
    letter-spacing: -0.02em;
  }
  .shorts-rail__title h3 { font-size: 0.95rem; }
  .shorts-rail__title span { display: block; font-size: 0.72rem; }
  .scroll-btn { width: 34px; height: 34px; border-radius: 10px; font-size: 0.85rem; }
  .shorts-rail__tools { gap: 4px; }
  #shorts-prev, #shorts-next { display: inline-flex; }

  .shorts-rail.is-shorts .shorts-rail__track {
    gap: 8px;
  }
  .shorts-rail.is-shorts .short {
    flex: 0 0 calc(100% - 56px);
    height: calc(100% - 56px);
    min-height: calc(100% - 56px);
    max-height: calc(100% - 56px);
    aspect-ratio: auto;
    max-width: none;
    margin-inline: 0;
    width: 100%;
  }

  .short__label { font-size: 0.72rem; left: 8px; right: 8px; bottom: 8px; }
  .short__play { width: 32px; height: 32px; font-size: 0.7rem; }

  .catalog { grid-template-columns: repeat(2, 1fr); }
  .filter-board { gap: 8px; display: grid; }
  .filter-panel { padding: 8px 10px; border-radius: 14px; }
  .filter-panel__head { margin-bottom: 6px; }
  .filter-panel__head strong { font-size: 0.74rem; }
  .filter-panel__head span { display: none; }
  .filter-panel__row {
    gap: 5px;
    padding-bottom: 6px;
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 36px), transparent 100%);
  }
  .type-btn { padding: 5px 8px 5px 6px; gap: 5px; }
  .type-btn__name { font-size: 0.58rem; }
  .type-btn__svg { width: 22px; height: 28px; }
  .size-btn { min-width: 0; padding: 6px 10px; border-radius: 999px; }
  .size-btn--num .size-btn__name { font-size: 0.72rem; }
  .print-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat.chat--rail .chat__messages {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 16px); }
  :root { --shorts-w: 44px; }
  .page-shell,
  .page-shell.is-shorts-collapsed {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .page-shell:not(.is-shorts-collapsed) {
    grid-template-columns: minmax(0, 1fr);
  }
  .card__actions { flex-direction: column; }
  .hero h1 { font-size: 2.35rem; }
  .shop__head { align-items: start; }
  .shorts-rail__split-btn { font-size: 0.68rem; }
  .catalog { grid-template-columns: repeat(2, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  .modal--half { max-width: min(960px, calc(100% - 16px)); height: auto; }
  .modal__panel--half { height: auto; max-height: 85vh; }
}

/* Admin bar */
.admin-bar {
  display: none;
  position: sticky;
  top: 8px;
  z-index: 60;
  width: min(1100px, calc(100% - 24px));
  margin: 8px auto 0;
  background: #000;
  color: #fff;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid #fff;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.admin-bar.is-visible { display: flex; }
.admin-bar .btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
}
.admin-bar .btn--primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.admin-bar .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}
body.is-admin .header { top: 0; }

.type-btn__icon,
.size-btn__icon {
  display: none !important;
}
.type-btn--lg {
  border-radius: 16px;
  min-width: 110px;
  padding: 10px 12px;
  flex-direction: column;
  gap: 6px;
}
.type-btn--lg .type-btn__svg {
  width: 36px;
  height: 44px;
}
.type-btn--lg .type-btn__name {
  text-align: center;
  white-space: normal;
}
.type-btn__tag {
  font-size: 0.62rem;
  opacity: 0.7;
  font-weight: 700;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
  max-height: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.media-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.media-card img,
.media-card video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #111;
}
.media-card span {
  display: block;
  padding: 6px 8px;
  font-size: 0.68rem;
  color: var(--muted);
  word-break: break-all;
}

.modal--half {
  max-width: none;
  width: min(980px, 92vw);
  height: 50vh;
  margin: auto;
}
.modal__panel--half {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.modal__panel--half .modal__body {
  flex: 1;
  overflow: auto;
}
.modal--wide,
.modal--screen,
dialog.modal[id^="admin-"] {
  max-width: none;
  width: min(1480px, 98vw);
  height: 96dvh;
  max-height: 96dvh;
  margin: auto;
}
.modal__panel--wide,
.modal__panel--screen,
dialog.modal[id^="admin-"] > .modal__panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: none;
  width: 100%;
}
.modal__panel--wide .modal__body,
.modal__panel--screen .modal__body,
dialog.modal[id^="admin-"] > .modal__panel > .modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
dialog.modal[id^="admin-"] .modal__body.auth-form {
  display: grid;
  align-content: start;
}
.modal__panel--kanban .kanban {
  flex: 1;
  min-height: 0;
}
.chars-admin {
  gap: 12px !important;
  display: flex !important;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.chars-admin__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #eef2ec;
  flex-shrink: 0;
  width: fit-content;
  max-width: 100%;
}
.chars-admin__tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 120px;
}
.chars-admin__tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(14, 18, 16, 0.08);
}
.chars-admin__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.chars-admin__panel[hidden] {
  display: none !important;
}
.chars-admin__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.chars-admin__hint {
  margin: 0;
  flex: 1 1 240px;
}
.chars-admin__toolbar #admin-types-msg,
.chars-admin__toolbar #admin-sizes-msg {
  margin: 0;
  flex: 1 1 100%;
  min-height: 1.1em;
}
.chars-admin__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.chars-admin__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}
.chars-admin__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6f1;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.chars-admin__table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.chars-admin__table input[type="text"],
.chars-admin__table input:not([type]),
.chars-admin__table input[type="number"],
.chars-admin__table input[type="url"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  font: inherit;
  font-size: 0.82rem;
  background: #fff;
  color: var(--ink);
}
.chars-admin__table input[type="number"] {
  width: 72px;
  text-align: right;
}
.chars-admin__table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.chars-admin__table .chars-admin__key {
  width: 110px;
}
.chars-admin__table .chars-admin__label {
  min-width: 140px;
}
.chars-admin__table .chars-admin__shape {
  width: 96px;
}
.chars-admin__table .chars-admin__icon {
  min-width: 160px;
}
.chars-admin__preview {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #f7faf5;
  border: 1px solid var(--line);
  display: block;
}
.icon-thumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icon-thumb__btn {
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7faf5;
  cursor: zoom-in;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.icon-thumb__btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.icon-thumb__empty {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
}
.icon-thumb__load {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  font-size: 0.85rem;
}
.icon-thumb__load:hover {
  background: var(--soft);
  border-color: var(--lime);
}
.modal--icon-preview {
  max-width: min(520px, 92vw);
  height: auto;
  max-height: 90dvh;
}
.modal__panel--icon-preview {
  height: auto;
  max-height: 90dvh;
}
.icon-preview-body {
  display: grid !important;
  gap: 10px;
  place-items: center;
  padding-bottom: 8px;
}
.icon-preview-body img {
  max-width: min(420px, 80vw);
  max-height: min(60vh, 420px);
  object-fit: contain;
  border-radius: 16px;
  background: #f7faf5;
  border: 1px solid var(--line);
}
.themes-admin {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.stock-admin {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.stock-admin__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.stock-admin__toolbar input[type="search"],
.stock-admin__toolbar select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
.stock-admin__toolbar input[type="search"] { flex: 1 1 200px; min-width: 160px; }
.stock-admin__toolbar #admin-stock-msg {
  margin: 0;
  flex: 1 1 100%;
  min-height: 1.1em;
}
.stock-admin__import { cursor: pointer; }
.stock-admin__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.stock-admin__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}
.stock-admin__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6f1;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.stock-admin__table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.stock-admin__table tr.is-zero { background: rgba(255, 80, 80, 0.06); }
.stock-admin__table tr.is-low { background: rgba(240, 180, 40, 0.08); }
.stock-admin__pm {
  display: inline-flex;
  gap: 4px;
}
.stock-admin__pm button {
  width: 30px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}
.stock-admin__pm button:hover { background: var(--soft); }
.card__stock {
  display: inline-flex;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.card__stock.is-ok { color: #2a8f5b; }
.card__stock.is-order { color: #b06a00; }
.themes-admin__toolbar {
  flex-shrink: 0;
  display: grid;
  gap: 4px;
}
.themes-admin__toolbar p { margin: 0; }
.themes-admin__grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  align-content: start;
  padding: 2px;
}
.theme-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: var(--panel, #fff);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: grid;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.theme-card:hover {
  border-color: color-mix(in srgb, var(--lime) 55%, var(--line));
}
.theme-card.is-active {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lime) 45%, transparent);
}
.theme-card__swatches {
  display: flex;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
.theme-card__swatches span {
  flex: 1;
}
.theme-card__name {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.theme-card__id {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}
body.theme-dark .header,
body.theme-dark .card,
body.theme-dark .filter-panel,
body.theme-dark .modal__panel {
  background: var(--panel);
  color: var(--ink);
}
body.theme-dark .muted { color: var(--muted); }
.chars-admin__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 420px;
  min-width: 220px;
}
.chars-admin__size-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7faf5;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.chars-admin__size-chip:has(input:checked),
.chars-admin__size-chip.is-on {
  background: rgba(200, 245, 66, 0.35);
  border-color: rgba(90, 120, 40, 0.35);
}
.chars-admin__size-chip input {
  width: 12px;
  height: 12px;
  margin: 0;
}
.chars-admin__actions .btn {
  padding: 4px 8px;
  font-size: 0.72rem;
}
.products-admin {
  gap: 12px !important;
  display: flex !important;
  flex-direction: column;
  height: 100%;
}
.products-admin__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.products-admin__toolbar input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}
.products-admin__toolbar #admin-products-msg {
  margin: 0;
  flex: 1 1 100%;
  min-height: 1.1em;
}
.products-admin__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.products-admin__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}
.products-admin__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6f1;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.products-admin__table td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.products-admin__table tr.is-dirty {
  background: rgba(200, 245, 66, 0.12);
}
.products-admin__table tr.is-new {
  background: rgba(46, 230, 166, 0.1);
}
.products-admin__table input,
.products-admin__table select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  font-size: 0.8rem;
  background: #fff;
  color: var(--ink);
}
.products-admin__table input[type="number"] {
  width: 76px;
  text-align: right;
}
.products-admin__table input[type="checkbox"] {
  width: auto;
  min-width: auto;
}
.products-admin__table .products-admin__name {
  min-width: 140px;
}
.products-admin__table .products-admin__microns {
  min-width: 88px;
}
.products-admin__table .products-admin__badge {
  width: 88px;
}
.products-admin__actions {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.products-admin__actions .btn {
  padding: 4px 8px;
  font-size: 0.72rem;
  white-space: nowrap;
}
.products-admin__id {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 600;
}
.types-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.modal--detail { max-width: min(980px, calc(100% - 24px)); width: 100%; }
.modal__panel--detail { max-height: 90vh; overflow: auto; }
.detail-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}
.detail-gallery { display: grid; gap: 10px; }
.detail-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #e8eee6;
  aspect-ratio: 1;
}
.detail-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(14,18,16,0.65);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}
#detail-prev { left: 10px; }
#detail-next { right: 10px; }
.detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.detail-thumb {
  flex: 0 0 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #ddd;
}
.detail-thumb.is-active { border-color: var(--lime-deep); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { display: grid; gap: 10px; align-content: start; }
.detail-price {
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  font-size: 0.92rem;
}
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modal__panel--auth {
  max-width: 460px;
}
.auth-hint { margin: 8px 0 0; }
.modal__panel--cabinet {
  width: min(720px, 96vw);
}
.cabinet-body {
  display: grid;
  gap: 18px;
}
.cabinet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.cabinet-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.cabinet-section h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.cabinet-uploads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cabinet-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.cabinet-photo-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  display: grid;
  gap: 6px;
}
.cabinet-photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.cabinet-photo-card > div {
  padding: 0 8px 8px;
  display: grid;
  gap: 4px;
}
.modal__panel--welcome {
  max-width: 420px;
}
.welcome-body {
  display: grid;
  gap: 12px;
}
.welcome-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.cabinet-panel { margin-top: 14px; }

.media-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.media-toolbar__label {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: -0.03em;
}
.media-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.media-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  transition: 0.15s ease;
}
.media-pill:hover {
  border-color: rgba(159, 209, 0, 0.7);
  transform: translateY(-1px);
}
.media-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--lime);
}
.media-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 4px rgba(200, 245, 66, 0.18);
  transition: 0.15s ease;
}
.media-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 5px rgba(200, 245, 66, 0.28);
}
.media-upload-btn__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--ink);
  font-weight: 900;
}

.auth-body { display: grid; gap: 14px; }
.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-social__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-social__btn:hover { background: #f4f7f2; border-color: #b7d0c1; }
.auth-social__icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}
.auth-social__btn--yandex .auth-social__icon { background: #fc3f1d; color: #fff; }
.auth-social__btn--google .auth-social__icon { background: #fff; color: #4285f4; border: 1px solid #dadce0; }
.auth-social__btn--telegram .auth-social__icon { background: #229ed9; color: #fff; font-size: 0.7rem; }
.auth-social__btn--vk .auth-social__icon { background: #0077ff; color: #fff; font-size: 0.62rem; }
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}
.auth-form { display: grid; gap: 10px; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-actions .btn { width: 100%; }
.auth-form label { display: grid; gap: 4px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.auth-form input, .auth-form textarea, .auth-form select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
}
.auth-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; }
.order-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
}
.btn.is-on { background: var(--soft); border-color: #b7d0c1; }

.hash-box {
  border: 1px dashed rgba(14, 18, 16, 0.25);
  border-radius: 14px;
  padding: 12px;
  background: #f7faf5;
  display: grid;
  gap: 8px;
}
.hash-box code {
  word-break: break-all;
  font-size: 0.78rem;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.discount-pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-weight: 800;
  font-size: 0.85rem;
}
.cabinet-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.cabinet-upload { display: inline-flex; width: fit-content; cursor: pointer; }
.cabinet-videos { display: grid; gap: 10px; }
.cabinet-video-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}
.cabinet-video-card video {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #111;
}
.photo-editor { display: grid; gap: 10px; }
.photo-editor__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.photo-editor__item {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
  text-align: center;
}
.photo-editor__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #111;
}
.photo-editor__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.size-pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.size-pick {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px 4px 4px !important;
  background: #fff;
  font-size: 0.72rem !important;
}
.size-pick__icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
}
.mockup-card canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px 12px 0 0;
}

