/* Витрина NFT-подарков (раздел Telegram → «NFT-подарки»). Токены цветов — из main.css */
.nft-store { --nft-surface: #151515; --nft-surface-2: #1d1d1f; --nft-control: #2a2a2c; --nft-muted: #909097; --nft-line: rgba(255,255,255,0.06); padding-bottom: 60px; }
.nft-store[hidden], [data-standard][hidden] { display: none !important; }
body.nft-lock { overflow: hidden; }

/* картинка / заглушка */
.nft-media { position: relative; width: 100%; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--bd, #333); }
.nft-media img { width: 100%; height: 100%; object-fit: cover; }
/* заглушка, пока нет картинки подарка */
.nft-media--ph {
    background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--bd) 60%, #fff 18%) 0%, var(--bd) 70%, color-mix(in srgb, var(--bd) 70%, #000) 100%);
}
.nft-opt-thumb { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px; object-fit: cover; }

/* вкладки */
.nft-tabs { display: flex; gap: 22px; margin-bottom: 18px; }
.nft-tabs__tab { background: none; border: 0; padding: 0; font-size: 24px; font-weight: 800; color: #4a4a4e; transition: color 0.2s; }
.nft-tabs__tab:hover { color: #8a8a90; }
.nft-tabs__tab.active { color: var(--text-white); }

/* раскладка */
.nft-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.nft-layout[hidden], .nft-collections[hidden] { display: none; }

/* фильтры */
.nft-filters { position: sticky; top: 20px; padding: 18px; border-radius: var(--border-radius); background: var(--card-bg); border: 1px solid var(--nft-line); }
.nft-filters__head { display: none; }
.nft-filters__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.nft-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nft-field--wide { grid-column: 1 / -1; }
.nft-field__label { font-size: 12px; font-weight: 600; color: var(--nft-muted); }
.nft-input { height: 44px; width: 100%; padding: 0 14px; border-radius: 12px; border: 1px solid transparent; background: var(--nft-surface-2); color: #fff; font: 600 14px 'Montserrat', sans-serif; outline: none; transition: border-color 0.2s; }
.nft-input::placeholder { color: #55555a; }
.nft-input:focus { border-color: rgba(229,9,20,0.6); }
.nft-filters__reset { margin-top: 16px; width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--nft-line); background: transparent; color: var(--text-gray); font-weight: 600; font-size: 14px; transition: 0.2s; }
.nft-filters__reset:hover { color: #fff; border-color: rgba(255,255,255,0.18); }
.nft-filters__apply { display: none; }

/* dropdown */
.nft-dd { position: relative; }
.nft-dd__btn { width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; border-radius: 12px; border: 1px solid transparent; background: var(--nft-surface-2); color: #cfcfd4; font-size: 14px; font-weight: 600; text-align: left; transition: border-color 0.2s; }
.nft-dd__btn:disabled { cursor: not-allowed; color: #4f4f55; }
.nft-dd__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-dd__btn svg { flex-shrink: 0; transition: transform 0.2s; color: var(--nft-muted); }
.nft-dd.has-value .nft-dd__btn { color: #fff; border-color: rgba(229,9,20,0.45); }
.nft-dd.open .nft-dd__btn { border-color: rgba(229,9,20,0.7); }
.nft-dd.open .nft-dd__btn svg { transform: rotate(180deg); }
.nft-dd__panel { display: none; position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; min-width: 220px; padding: 6px; border-radius: 14px; background: #1b1b1d; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 18px 40px rgba(0,0,0,0.55); }
.nft-dd.open .nft-dd__panel { display: block; }
.nft-dd__search { padding: 4px 4px 6px; }
.nft-dd__search input { width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--nft-control); color: #fff; font: 500 13px 'Montserrat', sans-serif; outline: none; }
.nft-dd__list { max-height: 260px; overflow-y: auto; }
.nft-dd__opt { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: #ddd; font-size: 13px; font-weight: 500; text-align: left; }
.nft-dd__opt:hover { background: rgba(255,255,255,0.05); }
.nft-dd__opt[hidden] { display: none; }
.nft-dd__opt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-check { flex: 0 0 16px; height: 16px; border-radius: 5px; border: 1.5px solid #4a4a50; transition: 0.15s; }
.nft-dd__opt.is-on { color: #fff; }
.nft-dd__opt.is-on .nft-check { background: var(--primary-red); border-color: var(--primary-red); box-shadow: inset 0 0 0 3px #1b1b1d; }
.nft-swatch { flex: 0 0 14px; height: 14px; border-radius: 50%; }
.nft-opt-emoji { font-style: normal; font-size: 16px; line-height: 1; }
.nft-dd__clear { width: 100%; margin-top: 4px; padding: 8px; border: 0; border-top: 1px solid var(--nft-line); background: transparent; color: var(--primary-red); font-size: 13px; font-weight: 600; }

/* toolbar */
.nft-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.nft-search { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; }
.nft-search svg { position: absolute; left: 14px; color: var(--nft-muted); pointer-events: none; }
.nft-search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid transparent; background: var(--nft-surface-2); color: #fff; font: 600 14px 'Montserrat', sans-serif; outline: none; }
.nft-search input::placeholder { color: #5c5c62; }
.nft-search input:focus { border-color: rgba(229,9,20,0.6); }
.nft-icon-btn { position: relative; flex: 0 0 40px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--nft-control); color: #bdbdc2; transition: 0.2s; }
.nft-icon-btn:hover, .nft-icon-btn.active { color: #fff; background: #3a3a3d; }
.nft-icon-btn__badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.nft-icon-btn__badge[hidden] { display: none; }
.nft-toolbar__filters { display: none; }
.nft-view-toggle { display: flex; gap: 4px; }
.nft-sort { position: relative; }
.nft-sort__btn { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--nft-control); color: #ddd; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nft-sort__btn:hover { color: #fff; }
.nft-sort__menu { display: none; position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; min-width: 220px; padding: 6px; border-radius: 14px; background: #1b1b1d; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 18px 40px rgba(0,0,0,0.55); }
.nft-sort.open .nft-sort__menu { display: block; }
.nft-sort__menu button { width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: #ccc; font-size: 13px; font-weight: 500; text-align: left; }
.nft-sort__menu button:hover { background: rgba(255,255,255,0.05); }
.nft-sort__menu button.active { color: #fff; font-weight: 700; }

.nft-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 30px; margin-bottom: 14px; }
.nft-summary > span { font-size: 14px; font-weight: 700; color: var(--text-gray); }
.nft-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nft-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 12px; border: 0; border-radius: 999px; background: rgba(229,9,20,0.14); color: #ffb3b6; font-size: 13px; font-weight: 600; }
.nft-chip span { font-size: 16px; line-height: 1; opacity: 0.7; }
.nft-chip:hover span { opacity: 1; }

/* сетка карточек */
.nft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; transition: opacity 0.2s; }
/* карточки-заглушки, пока грузятся лоты */
.nft-card--skeleton { cursor: default; pointer-events: none; }
.nft-card--skeleton:hover { transform: none; background: var(--nft-surface); border-color: var(--nft-line); }
.nft-skeleton { position: relative; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,0.045); }
.nft-skeleton::after {
    content: ''; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: nft-shimmer 1.4s infinite;
}
@keyframes nft-shimmer { to { transform: translateX(100%); } }
.nft-skeleton--media { aspect-ratio: 1; border-radius: 18px; }
.nft-skeleton--line { height: 14px; }
.nft-skeleton--short { width: 45%; height: 11px; }
.nft-skeleton--button { height: 34px; margin-top: auto; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .nft-skeleton::after { animation: none; } }
.nft-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 22px; background: var(--nft-surface); border: 1px solid var(--nft-line); cursor: pointer; transition: transform 0.2s, background 0.2s, border-color 0.2s; outline: none; }
.nft-card:hover, .nft-card:focus-within, .nft-card--collection:focus-visible { background: var(--nft-surface-2); border-color: rgba(255,255,255,0.12); transform: translateY(-2px); }
/* вся карточка — ссылка на лот; кнопки поверх неё */
.nft-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; outline: none; }
.nft-card__link:focus-visible { box-shadow: 0 0 0 2px var(--primary-red); }
.nft-card__media { position: relative; }
.nft-card__badge { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); font-size: 11px; font-weight: 600; color: #eee; }
.nft-card__info { min-width: 0; }
.nft-card__name { font-size: 17px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-card__num { font-size: 13px; font-weight: 600; color: var(--nft-muted); }
.nft-card__attrs { display: none; }
.nft-card__actions { display: flex; gap: 6px; margin-top: auto; }
.nft-card__price { flex: 1; min-width: 0; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: linear-gradient(135deg, var(--primary-red), #b3000b); color: #fff; font-size: 15px; font-weight: 800; white-space: nowrap; transition: filter 0.2s; }
.nft-card:hover .nft-card__price { filter: brightness(1.15); }
.nft-card__cart { position: relative; z-index: 2; flex: 0 0 44px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--nft-control); color: #ddd; transition: 0.2s; }
.nft-card__cart:hover { background: #3a3a3d; color: #fff; }
.nft-card__floor { margin-top: auto; font-size: 13px; color: var(--text-gray); }
.nft-card__floor b { color: #fff; font-size: 15px; }

/* список */
.nft-grid--list { grid-template-columns: 1fr; gap: 8px; }
.nft-grid--list .nft-card { flex-direction: row; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; border-radius: 18px; }
.nft-grid--list .nft-card:hover { transform: none; }
.nft-grid--list .nft-card__media { flex: 0 0 64px; }
.nft-grid--list .nft-media { border-radius: 14px; }
.nft-grid--list .nft-media--md span { font-size: 32px; }
.nft-grid--list .nft-card__badge { display: none; }
.nft-grid--list .nft-card__info { flex: 1; display: grid; grid-template-columns: minmax(120px, 220px) 90px 1fr; align-items: center; gap: 12px; }
.nft-grid--list .nft-card__attrs { display: block; font-size: 13px; color: var(--text-gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-grid--list .nft-card__actions { margin-top: 0; flex: 0 0 190px; }

.nft-empty { padding: 60px 20px; text-align: center; color: var(--text-gray); font-weight: 600; }
.nft-empty[hidden] { display: none; }
.nft-empty__icon { font-size: 44px; margin-bottom: 10px; }
.nft-empty .nft-filters__reset { width: auto; padding: 0 22px; }
.nft-more { display: block; margin: 22px auto 0; height: 46px; padding: 0 34px; border-radius: 999px; border: 1px solid var(--nft-line); background: var(--nft-surface-2); color: #fff; font-size: 14px; font-weight: 700; transition: 0.2s; }
.nft-more:hover { border-color: rgba(229,9,20,0.5); }
.nft-more[hidden] { display: none; }

/* характеристики лота */
.nft-attrs { margin-top: 18px; border-radius: 16px; background: #1b1b1d; overflow: hidden; }
.nft-attr { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 10px; padding: 13px 16px; font-size: 14px; }
.nft-attr + .nft-attr { border-top: 1px solid rgba(255,255,255,0.05); }
.nft-attr span { color: #7c7c82; font-weight: 500; }
.nft-attr b { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-attr em { font-style: normal; font-size: 12px; font-weight: 700; color: #2AABEE; background: rgba(42,171,238,0.12); padding: 2px 8px; border-radius: 999px; }
.nft-attr em:empty { display: none; }

/* страница лота */
.nft-lot { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 40px; align-items: start; margin-bottom: 48px; }
.nft-lot__media .nft-media { border-radius: 28px; box-shadow: 0 24px 60px rgba(0,0,0,0.45); }
.nft-lot__info { min-width: 0; display: flex; flex-direction: column; }
.nft-lot__collection { align-self: flex-start; font-size: 14px; font-weight: 700; color: #2AABEE; }
.nft-lot__collection:hover { text-decoration: underline; }
.nft-lot__title { margin-top: 6px; font-size: 36px; font-weight: 900; line-height: 1.15; }
.nft-lot__title span { color: #7c7c82; font-weight: 700; }
.nft-lot__buy { margin-top: 18px; padding: 20px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--nft-line); }
.nft-lot__price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nft-lot__price span { color: var(--text-gray); font-weight: 600; }
.nft-lot__price b { font-size: 34px; font-weight: 900; white-space: nowrap; }
.nft-lot__actions { display: flex; gap: 8px; margin-top: 14px; }
.nft-lot__buy-btn { flex: 1; height: 54px; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--primary-red), #990000); color: #fff; font-size: 16px; font-weight: 800; }
.nft-lot__buy-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.nft-lot__cart { flex: 0 0 54px; height: 54px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 16px; background: var(--nft-control); color: #ddd; transition: 0.2s; }
.nft-lot__cart:hover { background: #3a3a3d; color: #fff; }
.nft-lot__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; list-style: none; counter-reset: step; }
.nft-lot__steps li { counter-increment: step; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.03); font-size: 12px; color: var(--text-gray); }
.nft-lot__steps li::before { content: counter(step); width: 22px; height: 22px; margin-bottom: 6px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(229,9,20,0.15); color: #ff6b72; font-size: 12px; font-weight: 800; }
.nft-lot__steps b { color: #fff; font-size: 13px; }

.nft-similar[hidden] { display: none; }
.nft-similar__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.nft-similar__head h2 { font-size: 22px; font-weight: 800; }
.nft-similar__head a { font-size: 14px; font-weight: 700; color: var(--text-gray); white-space: nowrap; }
.nft-similar__head a:hover { color: #fff; }

.nft-filters-overlay { display: none; }

/* адаптив */
@media (max-width: 1100px) {
    .nft-layout { grid-template-columns: minmax(0, 1fr); }
    .nft-toolbar__filters { display: inline-flex; }
    .nft-filters {
        position: fixed; z-index: 1001; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); overflow-y: auto;
        border-radius: 0 24px 24px 0; transform: translateX(-102%); transition: transform 0.25s ease; padding-bottom: 90px;
    }
    .nft-filters.open { transform: none; }
    .nft-filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 20px; font-weight: 800; }
    .nft-filters__close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #2a2a2c; color: #ccc; font-size: 22px; line-height: 1; }
    .nft-filters__apply { display: block; margin-top: 10px; width: 100%; height: 48px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--primary-red), #990000); color: #fff; font-size: 15px; font-weight: 800; }
    .nft-filters-overlay { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
    .nft-filters-overlay.open { opacity: 1; pointer-events: auto; }
}
@media (max-width: 900px) {
    .nft-lot { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .nft-lot__media { max-width: 420px; width: 100%; margin: 0 auto; }
}
@media (max-width: 700px) {
    .nft-tabs { gap: 16px; overflow-x: auto; scrollbar-width: none; }
    .nft-tabs__tab { font-size: 18px; white-space: nowrap; }
    .nft-toolbar { flex-wrap: wrap; }
    .nft-search { flex: 1 1 100%; }
    .nft-sort { flex: 1; }
    .nft-sort__btn { width: 100%; justify-content: center; }
    .nft-sort__menu { left: 0; right: auto; }
    .nft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .nft-card { padding: 8px; border-radius: 18px; }
    .nft-media--md span { font-size: 48px; }
    .nft-card__name { font-size: 15px; }
    .nft-card__price { font-size: 14px; }
    .nft-card__cart { flex-basis: 38px; }
    .nft-grid--list .nft-card__info { grid-template-columns: 1fr; gap: 0; }
    .nft-grid--list .nft-card__attrs { display: none; }
    .nft-grid--list .nft-card__actions { flex: 0 0 auto; }
    .nft-grid--list .nft-card__price { flex: 0 0 auto; padding: 0 12px; }
    .nft-grid--list .nft-card__cart { display: none; }
    .nft-media--lg span { font-size: 110px; }
    .nft-lot__title { font-size: 26px; }
    .nft-lot__price b { font-size: 28px; }
    .nft-lot__buy { padding: 16px; }
    .nft-lot__steps { grid-template-columns: 1fr; }
    .nft-lot__steps li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 8px; }
    .nft-lot__steps li::before { margin-bottom: 0; }
    .nft-similar__head h2 { font-size: 18px; }
}

/* ряд карточек в других разделах сайта (главная, страница лота) */
.nft-row { grid-auto-flow: column; grid-auto-columns: 166px; grid-template-columns: none; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.nft-row .nft-card { scroll-snap-align: start; }
@media (max-width: 700px) { .nft-row { grid-auto-columns: 148px; } }

/* Превью подарка — 160×160, поэтому не растягиваем его, а ставим в рамку с фоном лота */
.nft-lot__media { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; border-radius: 28px; overflow: hidden; background: var(--nft-surface); border: 1px solid var(--nft-line); }
.nft-lot__media::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, var(--lot-bd, #333) 0%, transparent 72%); opacity: 0.55; }
.nft-lot__media .nft-media { position: relative; width: 260px; max-width: 100%; border-radius: 22px; box-shadow: 0 22px 50px rgba(0,0,0,0.5); }
.nft-card__media { overflow: hidden; border-radius: 18px; }
.nft-card .nft-media { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.nft-card:hover .nft-media { transform: scale(1.04); }
@media (max-width: 900px) { .nft-lot__media { padding: 28px; } .nft-lot__media .nft-media { width: 260px; } }

/* Названия коллекций длиннее названий лотов — даём им две строки */
.nft-card--collection .nft-card__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }

/* переключатель «монохромные» в фильтрах */
.nft-mono {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
    border-radius: 12px; border: 1px solid transparent; background: var(--nft-surface-2);
    color: #cfcfd4; font-family: 'Montserrat', sans-serif; transition: 0.2s;
}
.nft-mono:hover { color: #fff; }
.nft-mono.is-on { border-color: rgba(229,9,20,0.6); color: #fff; }
.nft-mono__check { flex: 0 0 16px; height: 16px; border-radius: 5px; border: 1.5px solid #4a4a50; transition: 0.15s; }
.nft-mono.is-on .nft-mono__check { background: var(--primary-red); border-color: var(--primary-red); box-shadow: inset 0 0 0 3px var(--nft-surface-2); }
.nft-mono__text { display: flex; flex-direction: column; min-width: 0; }
.nft-mono__text b { font-size: 13px; font-weight: 700; }
.nft-mono__text i { font-style: normal; font-size: 11px; color: var(--nft-muted); }

/* плитка тематики */
.nft-card--theme { text-decoration: none; color: inherit; }
.nft-card--theme .nft-card__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }

/* ===== Конструктор коллекций ===== */
.constructor[hidden] { display: none; }
.constructor__title { font-size: 26px; font-weight: 900; }
.constructor__subtitle { margin-top: 6px; max-width: 640px; font-size: 14px; color: var(--text-gray); }
.constructor__presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 18px 0; }
.constructor-preset {
    display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-align: left;
    border-radius: 16px; border: 1px solid var(--nft-line); background: var(--nft-surface);
    color: #d6d6db; font-family: 'Montserrat', sans-serif; transition: 0.2s;
}
.constructor-preset:hover { border-color: rgba(255,255,255,0.2); color: #fff; }
.constructor-preset.active { border-color: rgba(58,214,160,0.7); background: rgba(58,214,160,0.1); color: #fff; }
.constructor-preset b { font-size: 15px; font-weight: 800; }
.constructor-preset span { font-size: 12px; color: var(--nft-muted); line-height: 1.35; }
.constructor__theme { max-width: 320px; margin-bottom: 18px; }
.constructor__theme[hidden] { display: none; }

.constructor__board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.constructor__rows { display: grid; gap: 14px; }
.constructor-row { display: grid; gap: 8px; }
.constructor-row__num { font-size: 12px; font-weight: 700; color: var(--nft-muted); }
.constructor-row__cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.constructor-slot {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    min-height: 236px; padding: 12px; border-radius: 20px; border: 1.5px dashed rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.02); color: var(--nft-muted); font-family: 'Montserrat', sans-serif; transition: 0.2s;
}
.constructor-slot:hover { border-color: rgba(58,214,160,0.6); color: #fff; background: rgba(58,214,160,0.06); }
.constructor-slot__plus { font-size: 26px; line-height: 1; }
.constructor-slot__hint { font-size: 12px; font-weight: 600; text-align: center; }
.constructor-slot--filled {
    justify-content: flex-start; border-style: solid; border-color: var(--nft-line);
    background: var(--nft-surface); color: #fff; cursor: default;
}
.constructor-slot--filled:hover { background: var(--nft-surface); border-color: var(--nft-line); }
.constructor-slot--filled .nft-media { width: 100%; max-width: 150px; margin: 0 auto; }
.constructor-slot__info { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; text-align: left; }
.constructor-slot__info b { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.constructor-slot__info span { font-size: 11px; color: var(--nft-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.constructor-slot__info i { font-style: normal; font-size: 14px; font-weight: 800; }
.constructor-slot__remove {
    position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff; font-size: 16px; line-height: 1;
}
.constructor-slot__remove:hover { background: var(--primary-red); }

.constructor__summary { position: sticky; top: 20px; padding: 20px; border-radius: var(--border-radius); background: var(--card-bg); border: 1px solid var(--nft-line); }
.constructor__summary-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-gray); }
.constructor__summary-head b { color: #fff; }
.constructor__summary-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; }
.constructor__summary-total span { color: var(--text-gray); font-weight: 600; }
.constructor__summary-total b { font-size: 26px; font-weight: 900; }
.constructor__buy { width: 100%; height: 50px; margin-top: 14px; border: 0; border-radius: 16px; background: linear-gradient(135deg, #3ad6a0, #1b8f76); color: #06231b; font-size: 15px; font-weight: 800; }
.constructor__buy:disabled { opacity: 0.6; cursor: not-allowed; }
.constructor__row-actions { display: flex; gap: 6px; margin-top: 12px; }
.constructor__row-btn { flex: 1; height: 38px; border-radius: 12px; border: 1px solid var(--nft-line); background: transparent; color: var(--text-gray); font: 600 13px 'Montserrat', sans-serif; transition: 0.2s; }
.constructor__row-btn:hover { color: #fff; border-color: rgba(255,255,255,0.2); }
.constructor__note { margin-top: 12px; font-size: 12px; color: #6d6d73; }

.constructor__bundles { margin-top: 34px; }
.constructor__bundles[hidden] { display: none; }
.constructor__bundle-list { display: grid; gap: 10px; }
.bundle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px 16px; border-radius: 18px; background: var(--nft-surface); border: 1px solid var(--nft-line); }
.bundle__items { display: flex; gap: 6px; }
.bundle__items .nft-media { width: 62px; border-radius: 14px; }
.bundle__info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bundle__info b { font-size: 15px; font-weight: 700; }
.bundle__info span { font-size: 12px; color: var(--nft-muted); }
.bundle__buy { display: flex; align-items: center; gap: 12px; }
.bundle__full { font-size: 13px; color: var(--nft-muted); text-decoration: line-through; }
.bundle__price { font-size: 18px; font-weight: 900; white-space: nowrap; }
.bundle__btn { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--nft-control); color: #ddd; font: 700 13px 'Montserrat', sans-serif; }
.bundle__btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* окно выбора подарка */
.picker { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.picker[hidden] { display: none; }
.picker__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(4px); }
.picker__dialog { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 880px; max-height: calc(100vh - 32px); padding: 20px; border-radius: 26px; background: #141416; border: 1px solid rgba(255,255,255,0.08); }
.picker__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.picker__title { font-size: 18px; font-weight: 800; }
.picker__close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--nft-control); color: #ccc; font-size: 20px; line-height: 1; }
.picker__close:hover { color: #fff; }
.picker__filters { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 8px; margin-bottom: 14px; }
.picker__grid { overflow-y: auto; align-content: start; }
.picker__card { cursor: pointer; text-align: left; font-family: 'Montserrat', sans-serif; }
.picker__card .nft-card__price { width: 100%; }
.picker__loading { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--nft-muted); font-weight: 600; }

@media (max-width: 1100px) { .constructor__board { grid-template-columns: minmax(0, 1fr); } .constructor__summary { position: static; } }
@media (max-width: 700px) {
    .constructor__title { font-size: 22px; }
    .constructor-row__cells { gap: 6px; }
    .constructor-slot { min-height: 168px; padding: 8px; border-radius: 16px; }
    .constructor-slot--filled .nft-media { max-width: 92px; }
    .constructor-slot__hint { font-size: 10px; }
    .constructor-slot__info b { font-size: 12px; }
    .constructor-slot__info i { font-size: 12px; }
    .picker { padding: 0; align-items: flex-end; }
    .picker__dialog { max-height: 92vh; border-radius: 24px 24px 0 0; padding: 16px; }
    .picker__filters { grid-template-columns: 1fr; }
    .bundle { grid-template-columns: 1fr; gap: 10px; }
    .bundle__buy { justify-content: space-between; }
}

.nft-bundles[hidden] { display: none; }
.nft-bundles__note { margin-bottom: 14px; font-size: 13px; color: var(--text-gray); }
.nft-bundles__list { display: grid; gap: 10px; }
.nft-bundles__list .bundle__items a { display: block; }

/* списки выбора внутри окна подбора: тот же тёмный фон, что и у витрины */
.picker .nft-dd__panel, .constructor .nft-dd__panel { background: #202023; border-color: rgba(255,255,255,0.12); }
.picker .nft-dd__opt, .constructor .nft-dd__opt { color: #e6e6ea; font-size: 14px; }
.picker .nft-dd__opt:hover, .constructor .nft-dd__opt:hover { background: rgba(255,255,255,0.08); color: #fff; }
.picker .nft-dd__opt.is-on, .constructor .nft-dd__opt.is-on { background: rgba(229,9,20,0.18); color: #fff; }
.picker .nft-dd__btn, .constructor .nft-dd__btn { height: 46px; background: rgba(255,255,255,0.06); color: #fff; }
.picker .nft-swatch, .constructor .nft-swatch { flex: 0 0 16px; height: 16px; box-shadow: 0 0 0 1px rgba(255,255,255,0.18); }
.picker .nft-dd__list, .constructor .nft-dd__list { max-height: 300px; }

/* живая модель поверх обычного превью (если собрать как в Telegram не из чего) */
.nft-media .gift-live { position: absolute; left: 50%; top: 50%; width: 74%; height: 74%; transform: translate(-50%, -50%); z-index: 1; }
.nft-media .gift-live svg { width: 100% !important; height: 100% !important; }
.nft-media.is-live > img:not(.gift-art__model) { visibility: hidden; }

/* окно подбора: короткий поиск и фильтры-плашки в одну строку */
.picker__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.picker__search { position: relative; display: flex; align-items: center; flex: 0 1 240px; min-width: 160px; }
.picker__search svg { position: absolute; left: 14px; color: #8a8a90; pointer-events: none; }
.picker__search input {
    width: 100%; height: 44px; padding: 0 14px 0 38px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
    color: #fff; font: 600 14px 'Montserrat', sans-serif; outline: none; transition: border-color 0.2s;
}
.picker__search input::placeholder { color: #8a8a90; }
.picker__search input:focus { border-color: rgba(229,9,20,0.6); }
.picker__pill { flex: 0 0 auto; min-width: 150px; }
.picker__pill .nft-dd__btn { height: 44px; border-radius: 999px; padding: 0 16px; }
.picker__pill .nft-dd__panel { min-width: 240px; }
.picker__pill.is-disabled { opacity: 0.45; pointer-events: none; }

/* кнопки «Анимировать все» и «Скачать GIF» */
.constructor__media-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.constructor__media-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px;
    border-radius: 12px; border: 1px solid rgba(58,214,160,0.4); background: rgba(58,214,160,0.08);
    color: #7ff0c6; font: 700 12px 'Montserrat', sans-serif; transition: 0.2s;
}
.constructor__media-btn:hover:not(:disabled) { background: rgba(58,214,160,0.16); color: #fff; }
.constructor__media-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.constructor__media-btn.is-busy { opacity: 0.7; }
@media (max-width: 700px) {
    .picker__search { flex: 1 1 100%; }
    .picker__pill { flex: 1 1 calc(33% - 6px); min-width: 0; }
    .picker__pill .nft-dd__btn { padding: 0 10px; gap: 4px; font-size: 12px; }
}

/* подарок, собранный как в приложении Telegram (gift-art.js) */
.gift-art { background: radial-gradient(circle at 50% 50%, var(--center) 0%, var(--edge) 93.9%); container-type: inline-size; }
.gift-art__sym {
    position: absolute; aspect-ratio: 1; background: var(--pattern);
    -webkit-mask: var(--pattern-img) center / contain no-repeat; mask: var(--pattern-img) center / contain no-repeat;
    pointer-events: none;
}
/* модель — квадрат 63.3% по центру, как на превью t.me (см. gift-art.js) */
.gift-art__model {
    position: absolute; left: 50%; top: 18.359%; width: 63.281% !important; height: 63.281% !important;
    transform: translateX(-50%); object-fit: contain;
}
.gift-art .gift-live { position: absolute; left: 50%; top: 18.359%; width: 63.281%; height: 63.281%; transform: translateX(-50%); z-index: 1; }
.gift-art .gift-live svg { width: 100% !important; height: 100% !important; }
.gift-art.is-live .gift-art__model { visibility: hidden; }

.constructor__media-btn--wide { grid-column: 1 / -1; flex-direction: column; gap: 0; height: auto; padding: 8px 10px; border-color: rgba(255,255,255,0.12); background: transparent; color: var(--text-gray); }
.constructor__media-btn--wide span { font-size: 10px; font-weight: 500; opacity: 0.8; }

/* лента с номером в правом верхнем углу — как у Telegram (геометрия — GiftArt.RIBBON) */
.nft-media { container-type: inline-size; }
.gift-ribbon { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: inherit; pointer-events: none; }
.gift-ribbon b {
    position: absolute; left: 35.15%; top: 6.85%; width: 100%; height: 16%;
    display: flex; align-items: center; justify-content: center; transform: rotate(45deg);
    background: linear-gradient(90deg, var(--rb-from), var(--rb-to));
    color: #fff; font-size: 8cqw; font-weight: 700; line-height: 1; letter-spacing: 0.01em; white-space: nowrap;
}
@container (max-width: 100px) { .gift-ribbon { display: none; } }

/* подписи под плиткой: название — белым, модель — светло-серым (номер теперь на ленте) */
.nft-card__name { color: #fff; }
.nft-card__model { font-size: 13px; font-weight: 600; color: #b4b4bb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__card { color: #fff; }
.constructor-slot__info span { font-size: 12px; font-weight: 600; color: #b4b4bb; }

/* «Готовые ряды»: подпись — отдельной строкой под заголовком, иначе на телефоне обрезается */
.constructor__bundles .home-section__head { flex-direction: column; align-items: flex-start; gap: 4px; }
.constructor__bundles .home-section__link { white-space: normal; }
