/* Школа · прототип приложения. Наследует мир карточки (../card/card.css), экраны - тихий тёмный фон. */
:root { --surface: #17181f; --surface-2: #1d1f28; --muted: #8b8fa6; }
html { scroll-behavior: smooth; }
body { padding-bottom: 0; }
.logo { color: var(--paper); text-decoration: none; }
.appbar__right { display: flex; align-items: center; gap: 10px; }
.appbar nav a.on { color: var(--paper); }
.iconbtn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--paper-dim); background: transparent; border: 1px solid transparent; cursor: pointer; }
.iconbtn:hover { border-color: var(--line); color: var(--paper); }
.iconbtn svg, .ico-s { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn { font: inherit; font-weight: 700; font-size: .95rem; border-radius: 14px; padding: 12px 18px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--paper); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { border-color: #4a4f66; }
.btn--primary { border: 0; color: #fff; background: linear-gradient(135deg, #9a6bd0, #5f7fe6); box-shadow: 0 10px 22px rgba(95,127,230,.28); }
.btn--primary:hover { box-shadow: 0 12px 26px rgba(95,127,230,.38); }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 12px; font-size: .85rem; border-radius: 11px; }
.btn[aria-pressed="true"] { border-color: var(--accent); background: #2b2440; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.view { max-width: 1120px; margin: 0 auto; padding: 16px 16px 120px; outline: none; }
.screen-title { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; margin: 8px 0 4px; }
.lede { color: var(--paper-dim); margin: 0 0 18px; line-height: 1.5; max-width: 62ch; }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--paper-dim); text-decoration: none; font-weight: 600; font-size: .9rem; margin: 4px 0 8px; }
.backlink svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.demo-note { font-size: .78rem; color: #8a8ea6; border: 1px dashed #353849; border-radius: 10px; padding: 6px 10px; display: inline-block; margin: 0 0 14px; }

/* ---------- приглашение для гостя ---------- */
.invite { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #231d38, #1a2140); border: 1px solid #33305a; margin: 0 0 14px; }
.invite p { margin: 0; font-weight: 600; line-height: 1.35; }
.invite small { display: block; color: var(--paper-dim); font-weight: 500; margin-top: 2px; }

/* ---------- фильтры-пилюли ---------- */
.pills { position: sticky; top: 62px; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 12px; margin: 0 -16px 6px; padding-left: 16px; padding-right: 16px; background: linear-gradient(var(--table) 70%, transparent); scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; font: inherit; font-weight: 600; font-size: .9rem; color: var(--paper-dim); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; cursor: pointer; }
.pill[aria-pressed="true"] { color: var(--paper); background: #2b2440; border-color: var(--accent); }

/* ---------- лента ---------- */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px 22px; }
.post { display: grid; gap: 10px; align-content: start; }
.post .card-wrap { width: 100%; max-width: 380px; justify-self: center; }
.post__meta { display: flex; align-items: center; gap: 10px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; text-decoration: none; }
.post__who { min-width: 0; flex: 1; line-height: 1.25; }
.post__who a { color: var(--paper); font-weight: 700; text-decoration: none; }
.post__who small { display: block; color: var(--muted); font-size: .8rem; }
.react { display: flex; gap: 8px; }
.react button { font: inherit; font-size: .85rem; font-weight: 700; color: var(--paper-dim); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.react button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.react button[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: #2b2440; }
.react button[aria-pressed="true"] svg { fill: currentColor; }
.insert { grid-column: 1 / -1; display: grid; gap: 8px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.insert h3 { margin: 0; font-size: 1.1rem; }
.insert p { margin: 0; color: var(--paper-dim); line-height: 1.5; }
.empty { text-align: center; padding: 40px 16px; color: var(--paper-dim); display: grid; justify-items: center; gap: 12px; }
.empty h3 { margin: 0; color: var(--paper); font-size: 1.15rem; }

/* карточка в приложении: горизонтальные консоли тоже вписываются в окно */
.card .art__item.fit { height: auto; width: auto; max-height: 86%; max-width: 86%; }
/* вырезка фона не удалась: фото вещи заполняет окно арта */
.card .art--photo .art__item.fit { left: 0; top: 0; transform: none; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; filter: none; }
.mini .card { box-shadow: 0 1.6cqw 3.6cqw rgba(0,0,0,.45); }

/* ---------- каталог ---------- */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin: 6px 0 16px; }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--paper-dim); stroke-width: 2; }
.search input { flex: 1; font: inherit; color: var(--paper); background: transparent; border: 0; padding: 13px 0; outline: none; }
.sections { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.section-tile { display: grid; gap: 8px; justify-items: start; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; font-weight: 700; }
.section-tile svg { width: 34px; height: 34px; fill: none; stroke: #9aa0ff; stroke-width: 1.6; }
.section-tile small { color: var(--muted); font-weight: 500; }
h2.block { font-size: 1.15rem; margin: 18px 0 10px; letter-spacing: -.01em; }
.companies { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.company { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.company b { font-size: 1.05rem; text-transform: capitalize; }
.company small { color: var(--muted); font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; display: grid; gap: 8px; padding: 10px 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.tile__img { aspect-ratio: 1; border-radius: 12px; background: radial-gradient(80% 70% at 50% 45%, #2a2c3a, #191a22); display: grid; place-items: center; overflow: hidden; }
.tile__img img { width: 78%; height: 82%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); }
.tile b { font-size: .95rem; line-height: 1.25; }
.tile small { color: var(--muted); }
.tile .own { position: absolute; top: 14px; right: 14px; font-size: .7rem; font-weight: 800; background: #1b7a55; color: #fff; border-radius: 8px; padding: 3px 7px; }

/* страница модели */
.model { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.model__hero { position: sticky; top: 80px; display: grid; gap: 12px; }
.model__img { aspect-ratio: 1; border-radius: 20px; background: radial-gradient(80% 70% at 50% 45%, #2a2c3a, #15161d); display: grid; place-items: center; }
.model__img { position: relative; overflow: hidden; }
/* абсолютно внутри квадрата: проценты высоты считаются от рамки, высокие фото (PocketStation 465x900) не вылезают */
.model__img img { position: absolute; left: 14%; top: 10%; width: 72%; height: 80%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0,0,0,.5)); }
.credit { font-size: .72rem; color: #6f7389; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 4px; }
.fact { padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.fact small { display: block; color: var(--muted); font-size: .78rem; }
.fact b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.fact details { margin-top: 4px; font-size: .78rem; color: var(--paper-dim); }
.fact summary { cursor: pointer; color: #9aa0ff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; font-weight: 600; color: var(--paper); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px; }
.chip i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--c, #888); }
.prices { display: grid; gap: 8px; }
.price-row { display: grid; grid-template-columns: 120px 1fr 64px; align-items: center; gap: 10px; font-size: .9rem; }
.price-row .bar { position: relative; height: 10px; border-radius: 5px; background: #242736; }
.price-row .bar span { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, #5f7fe6, #9a6bd0); }
.price-row .bar i { position: absolute; top: -3px; width: 3px; height: 16px; border-radius: 2px; background: #fff; }
.price-row b { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: .8rem; color: var(--muted); line-height: 1.45; margin: 6px 0 0; }
.owners { display: flex; align-items: center; gap: 10px; }
.owners .stack { display: flex; }
.owners .stack .avatar { width: 30px; height: 30px; margin-left: -8px; border: 2px solid var(--table); font-size: .7rem; }
.owners .stack .avatar:first-child { margin-left: 0; }

/* ---------- музей ---------- */
.mhead { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 6px 0 16px; }
.mhead .avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.mhead h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
.mhead p { margin: 2px 0 0; color: var(--paper-dim); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.stat { padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: .76rem; }
.stat .hidden-val { display: flex; align-items: center; gap: 4px; font-size: .9rem; color: var(--paper-dim); }
.stat .hidden-val svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.shelf { margin: 22px 0 0; }
.shelf > h3 { margin: 0 0 10px; font-size: 1rem; display: flex; justify-content: space-between; }
.shelf > h3 small { color: var(--muted); font-weight: 600; }
.shelf__row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 20px; background: linear-gradient(transparent calc(100% - 6px), #242634 0); box-shadow: 0 10px 12px -10px rgba(0,0,0,.6); scrollbar-width: thin; } /* ребро полки снизу */
.shelf__row > * { flex: none; width: 140px; }
.goal { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-top: 12px; }
.goal header { display: flex; justify-content: space-between; align-items: baseline; }
.goal header b { font-size: 1rem; }
.goal header small { color: var(--muted); font-variant-numeric: tabular-nums; }
.goal .progress { height: 8px; border-radius: 4px; background: #242736; margin: 10px 0 12px; overflow: hidden; }
.goal .progress span { display: block; height: 100%; background: linear-gradient(90deg, #5f7fe6, #9a6bd0); border-radius: inherit; }
/* цель коллекции: сетка без прокрутки; чего нет - блёклое фото, что есть - цветное с галочкой */
.goal__items { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 10px 8px; }
.goal__items a { min-width: 0; display: grid; gap: 5px; justify-items: stretch; text-align: center; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .02em; }
.goal__items span { position: relative; aspect-ratio: 1; border-radius: 12px; background: #1d1f28; border: 1px dashed #333648; display: grid; place-items: center; overflow: hidden; }
.goal__items img { width: 78%; height: 78%; object-fit: contain; }
.goal__items a.missing img { filter: grayscale(1) brightness(.7); opacity: .35; }
.goal__items a.have span { border: 1px solid #2f8f67; background: radial-gradient(70% 70% at 50% 45%, #22313a, #1a1c25); }
.goal__items a.have span::after { content: ""; position: absolute; top: 4px; right: 5px; width: 16px; height: 16px; border-radius: 50%; background: #1b7a55 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.goal__items a.have { color: var(--paper); }
.goal__items a:hover span { border-color: #4a4f66; }
@media (min-width: 901px) { .goal__items { grid-template-columns: repeat(var(--cols-d, 8), minmax(0, 1fr)); max-width: calc(var(--cols-d, 8) * 110px); } }

/* ---------- профиль ---------- */
.phead { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 10px 0 18px; }
.phead .avatar { width: 88px; height: 88px; font-size: 1.8rem; }
.phead h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.phead p { margin: 0; color: var(--paper-dim); max-width: 42ch; line-height: 1.45; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--paper); position: relative; }
.socials a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.socials a.unverified::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #8b8fa6; border: 2px solid var(--table); }
.socials a.verified::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #2fbf7a; border: 2px solid var(--table); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.badge { font-size: .75rem; font-weight: 700; color: #cfd2ff; border: 1px solid #3a3d6a; background: #1f2040; border-radius: 99px; padding: 4px 10px; }
.pactions { display: flex; gap: 8px; }
.common { padding: 10px 14px; border-radius: 14px; background: #1a2a22; border: 1px solid #25533e; color: #bfe8d2; font-weight: 600; font-size: .9rem; }

/* ---------- формы и настройки ---------- */
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--paper-dim); }
.form input, .form textarea, .form select { font: inherit; color: var(--paper); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.form textarea { min-height: 76px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.hint-ok { color: #6fdca3; font-size: .8rem; }
.hint-bad { color: #ff8a8a; font-size: .8rem; }
.tag { font-size: .72rem; font-weight: 700; border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.tag--ok { background: #16392a; color: #7fe0ae; }
.tag--wait { background: #262838; color: #a7abc2; }
.group { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 0 0 18px; }
.group h3 { margin: 0; padding: 12px 14px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-top: 1px solid var(--line); }
.row div { display: grid; gap: 2px; }
.row small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #33364a; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.16,1,.3,1); }
.switch input:checked + span { background: #6e5fd1; }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { font: inherit; font-size: .85rem; font-weight: 600; color: var(--paper-dim); background: transparent; border: 0; border-radius: 9px; padding: 7px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #2b2440; color: #fff; }

/* ---------- шторка ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(6, 7, 12, .6); backdrop-filter: blur(3px); }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 61; width: min(100%, 520px); transform: translateX(-50%);
  max-height: 88dvh; overflow: auto;
  background: #16171e; border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding: 10px 18px max(22px, env(safe-area-inset-bottom));
  animation: sheetin .35s cubic-bezier(.16, 1, .3, 1);
}
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #3a3d4f; margin: 0 auto 12px; }
.sheet h2 { margin: 4px 0 6px; font-size: 1.3rem; letter-spacing: -.02em; }
.sheet p { color: var(--paper-dim); line-height: 1.5; margin: 0 0 14px; }
.sheet .stack-btns { display: grid; gap: 10px; }
.sheet .fine { font-size: .76rem; color: var(--muted); margin: 12px 0 0; }
.sheet .fine a { color: var(--paper-dim); }
.login-btn { justify-content: flex-start; padding-left: 16px; }
.login-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
@keyframes sheetin { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.onb-steps { display: flex; gap: 6px; margin: 0 0 12px; }
.onb-steps i { flex: 1; height: 4px; border-radius: 2px; background: #2b2e3d; }
.onb-steps i.on { background: linear-gradient(90deg, #5f7fe6, #9a6bd0); }
.own-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.own-grid button { font: inherit; font-size: .8rem; font-weight: 700; color: var(--paper); display: grid; gap: 6px; justify-items: center; padding: 12px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.own-grid button svg { width: 30px; height: 30px; fill: none; stroke: #9aa0ff; stroke-width: 1.6; }
.own-grid button[aria-pressed="true"] { border-color: var(--accent); background: #2b2440; }

.toast { position: fixed; left: 50%; bottom: 96px; z-index: 70; transform: translateX(-50%); background: #262838; color: var(--paper); border: 1px solid #3a3d52; border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: .9rem; box-shadow: 0 10px 24px rgba(0,0,0,.4); }

/* ---------- добавление ---------- */
.addflow { max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
/* выбор типа вещи: один сгруппированный список, а не четыре одинаковые плитки */
.types { display: grid; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.types button { font: inherit; color: var(--paper); font-weight: 700; font-size: 1rem; display: grid; grid-template-columns: 34px 1fr 12px; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px 16px; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; text-align: left; }
.types button:first-child { border-top: 0; }
.types button:hover, .types button:focus-visible { background: var(--surface-2); }
.types button svg { grid-row: 1 / 3; width: 30px; height: 30px; fill: none; stroke: #9aa0ff; stroke-width: 1.6; }
.types button small { grid-column: 2; color: var(--muted); font-weight: 500; font-size: .82rem; }
.types button::after { content: ""; grid-column: 3; grid-row: 1 / 3; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); }
.camera { position: relative; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: #0c0d11; }
.camera img.feedimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.95); }
.camera .frame { position: absolute; left: 22%; right: 22%; top: 12%; bottom: 12%; border: 3px solid rgba(255,255,255,.85); border-radius: 26px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.camera .frame.ok { border-color: #6fdca3; }
.camera .tip { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); background: rgba(12,13,17,.8); color: #fff; font-weight: 700; font-size: .88rem; border-radius: 12px; padding: 8px 12px; white-space: nowrap; }
.camera .code { position: absolute; right: 14px; bottom: 14px; background: #fff; color: #111; font-weight: 800; font-size: 1.6rem; letter-spacing: .12em; border-radius: 10px; padding: 6px 12px; transform: rotate(-4deg); }
.shutter { justify-self: center; width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: transparent; cursor: pointer; display: grid; place-items: center; }
.shutter::after { content: ""; width: 58px; height: 58px; border-radius: 50%; background: #fff; transition: transform .15s; }
.shutter:active::after { transform: scale(.9); }
.steps3 { display: grid; gap: 10px; }
.steps3 li { list-style: none; display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.steps3 li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #3a3d52; }
.steps3 li.done { color: var(--paper); }
.steps3 li.done::before { background: #6fdca3; border-color: #6fdca3; }
.steps3 li.now { color: var(--paper); }
.steps3 li.now::before { border-color: #9aa0ff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(154,160,255,.25); } }
.cutout-stage { aspect-ratio: 1; border-radius: 22px; background: radial-gradient(70% 60% at 50% 45%, #262838, #121318); display: grid; place-items: center; overflow: hidden; }
.cutout-stage img { max-height: 84%; max-width: 70%; filter: drop-shadow(0 14px 18px rgba(0,0,0,.5)); animation: pop .6s cubic-bezier(.16,1,.3,1); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.matches { display: grid; gap: 10px; }
.match { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; font: inherit; color: var(--paper); }
.match img { width: 64px; height: 64px; object-fit: contain; }
.match b { display: block; }
.match small { color: var(--muted); }
.match .pct { font-weight: 800; font-variant-numeric: tabular-nums; color: #6fdca3; }
.match[aria-pressed="true"] { border-color: var(--accent); background: #211c33; }
.found { padding: 12px 14px; border-radius: 14px; background: #1a2a22; border: 1px solid #25533e; color: #bfe8d2; line-height: 1.45; font-size: .92rem; }

@media (max-width: 900px) {
  .view { padding: 12px 16px 120px; }
  .sections { grid-template-columns: repeat(2, 1fr); }
  .model { grid-template-columns: minmax(0, 1fr); }
  .model__hero { position: static; }
  .model__img { aspect-ratio: 4 / 3; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feed { grid-template-columns: 1fr; }
}
@media (min-width: 901px) {
  .showcase { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .shelf__row > * { width: 190px; }
  .tabbar { display: none !important; }
}

/* коды продукта на экране игр */
.codes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.codes code { display: inline-grid; gap: 1px; font: 700 .78rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--paper); background: #232534; border: 1px solid var(--line); border-radius: 8px; padding: 4px 7px; }
.codes code i { font: 500 .66rem/1.2 Onest, sans-serif; font-style: normal; color: var(--muted); }

/* ---------- каталог всех компаний ---------- */
.platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.platform { display: grid; gap: 3px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.platform:hover, .irow:hover { border-color: #4a4f66; }
.platform b { font-size: 1.02rem; }
.platform small { color: var(--paper-dim); font-variant-numeric: tabular-nums; }
.platform span { color: var(--muted); font-size: .8rem; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 4px -16px 16px; padding: 0 16px 2px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; gap: 6px; align-items: baseline; padding: 10px 12px; color: var(--paper-dim); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a small { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.tabs a[aria-selected="true"] { color: var(--paper); border-color: var(--accent); }
.rows { display: grid; gap: 6px; }
.irow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.irow__pic { width: 44px; height: 44px; border-radius: 10px; background: #1d1f28; display: grid; place-items: center; overflow: hidden; }
.irow__pic img { width: 84%; height: 84%; object-fit: contain; }
.irow__pic svg { width: 28px; height: 28px; fill: none; stroke: #8e93c9; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.irow__main { min-width: 0; display: grid; gap: 2px; }
.irow__main b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow__main small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow__side { text-align: right; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.irow__side small { display: block; color: var(--muted); font-weight: 500; font-size: .7rem; }
.irow__tag { font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #9aa0ff; border: 1px solid #3b3f63; border-radius: 6px; padding: 2px 6px; }
h3.sub { display: flex; justify-content: space-between; margin: 18px 0 8px; font-size: .95rem; }
h3.sub small { color: var(--muted); font-weight: 600; }
.seg[aria-label="Сортировка"] { display: inline-flex; margin: 0 0 12px; }
#gmore { margin-top: 12px; }
.model__img.noimg { gap: 8px; align-content: center; justify-items: center; }
.model__img.noimg svg { width: 38%; height: auto; fill: none; stroke: #5d6290; stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.model__img.noimg small { color: var(--muted); font-size: .78rem; max-width: 30ch; text-align: center; line-height: 1.4; }
.model__img.noimg.tinted svg { stroke: var(--c); stroke-width: 1.6; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 35%, transparent)); }
/* реклама: спокойный блок, явно подписан */
.ad { margin: 22px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1px dashed #3a3d52; background: repeating-linear-gradient(135deg, #16171e 0 10px, #181a22 10px 20px); }
.ad small { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad p { margin: 4px 0 0; color: var(--paper-dim); font-size: .85rem; line-height: 1.45; }

/* ---------- добавление: необязательный код, ошибки, уровень проверки ---------- */
.optcode { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.optcode input { width: 20px; height: 20px; margin-top: 2px; accent-color: #7d6be0; }
.optcode b { display: block; font-size: .92rem; }
.optcode small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.camera .frame.bad { border-color: #e0784f; }
.camera .tip.bad { background: rgba(224,120,79,.92); color: #fff; }
.tips { margin: 0; padding-left: 18px; color: var(--paper-dim); line-height: 1.5; display: grid; gap: 6px; }
.demo-sc { margin-top: 4px; border: 1px dashed #353849; border-radius: 12px; padding: 8px 12px; color: var(--muted); font-size: .85rem; }
.demo-sc summary { cursor: pointer; }
.demo-sc .chips { margin-top: 10px; }
.demo-sc .chip { font: inherit; font-size: .82rem; cursor: pointer; }
.level { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--paper-dim); font-size: .88rem; line-height: 1.45; }
.level.ok { border-color: #2f8f67; }
.level b { color: var(--paper); }
.legal p { color: var(--paper-dim); line-height: 1.6; max-width: 68ch; margin: 0; }

/* ---------- уведомления ---------- */
.iconbtn.bell { position: relative; }
.iconbtn.bell i { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e0566f; color: #fff; font: 800 .62rem/16px Onest, sans-serif; font-style: normal; text-align: center; }
.irow.notif { grid-template-columns: 44px minmax(0, 1fr) auto; }
.irow.notif .ntext { font-size: .9rem; line-height: 1.35; white-space: normal; color: var(--paper-dim); }
.irow.notif .ntext b { color: var(--paper); }
.irow.notif.unread { border-color: #3e3a66; background: linear-gradient(90deg, #1d1a30, var(--surface) 60%); }
.irow.notif.unread .irow__pic { box-shadow: inset 0 0 0 1px #6e5fd1; }
.irow__pic svg[viewBox="0 0 24 24"] { width: 22px; height: 22px; }
/* демо-кадр камеры при передаче: стол на весь кадр, вещь вписана в рамку (22%..78% по ширине, 12%..88% по высоте) */
.camera .demo-cam { position: absolute; inset: 0; background: radial-gradient(75% 65% at 50% 48%, #4a4a52, #26272e 70%, #1a1b21); }
.camera .demo-cam img { position: absolute; left: 26%; right: 26%; top: 17%; bottom: 17%; width: 48%; height: 66%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)); }
.insert.ad-wrap { padding: 0; background: none; border: 0; }
.insert.ad-wrap .ad { margin: 0; }
.mine-note { margin: 0 0 12px; color: var(--paper-dim); font-size: .88rem; }
.linkbtn { font: inherit; color: #9aa0ff; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* ---------- Telegram Mini App: своей шапки нет, её даёт Telegram ---------- */
body.tma .appbar { display: none; }
body.tma .tabbar { display: grid !important; }
body.tma .pills { top: 0; }
.tg-bar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; height: 52px; padding: 0 10px; background: #1c1d22; border-bottom: 1px solid #2a2c33; color: #e8e9ee; }
.tg-bar span { text-align: center; font-weight: 700; font-size: .98rem; line-height: 1.1; }
.tg-bar span small { display: block; font-weight: 500; font-size: .72rem; color: #8b8fa0; }
.tg-bar button { font: inherit; font-weight: 600; color: #6ab3f3; background: none; border: 0; cursor: pointer; padding: 6px; display: inline-flex; align-items: center; }
.tg-bar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.tg-bar #tgBack:not([hidden]) + #tgClose { display: none; }
.tg-bar [hidden] { display: none; }
.tg-bar ~ main .pills { top: 52px; }

/* ---------- топы коллекционеров ---------- */
.top-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.top-filters .seg { display: inline-flex; }
.toplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.toplist li { display: grid; grid-template-columns: 30px 34px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.toplist li.me { border-color: #6e5fd1; background: linear-gradient(90deg, #211c38, var(--surface) 70%); }
.toplist .who { color: var(--paper); font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist b { font-variant-numeric: tabular-nums; text-align: right; }
.toplist small { grid-column: 4; text-align: right; color: var(--muted); font-size: .7rem; margin-top: -4px; }
.toplist .rank { color: var(--muted); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.medal { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #1b1b22; }
.medal.m1 { background: linear-gradient(135deg, #f7dc7c, #c99a2e); }
.medal.m2 { background: linear-gradient(135deg, #e5e8ef, #9ea4b3); }
.medal.m3 { background: linear-gradient(135deg, #e7b184, #a86a3d); }
.toplist .empty-top { display: block; color: var(--paper-dim); text-align: center; }
.top-me { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #1d1a30; border: 1px solid #3e3a66; color: var(--paper-dim); }
.top-me b { color: var(--paper); }
.top-me.hidden-me { background: var(--surface); border-color: var(--line); }
details.how { margin-top: 16px; }
.top-link { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--paper-dim); text-decoration: none; font-size: .9rem; }
.top-link svg { width: 20px; height: 20px; fill: #f0c33c; }
.top-link b { color: var(--paper); }
.top-link small { color: #9aa0ff; font-weight: 700; }
a.insert.tops-teaser { text-decoration: none; color: var(--paper); background: linear-gradient(135deg, #2a2210, var(--surface) 70%); border-color: #4a3d1c; }

/* ---------- фото каталога, описания, варианты ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery a { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #1d1f28; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.credit a { color: #9aa0ff; }
.desc { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.desc p { margin: 0; color: var(--paper); line-height: 1.6; }
.desc small { display: block; margin-top: 8px; color: var(--muted); font-size: .76rem; }
.desc small a { color: #9aa0ff; }
a.chip { text-decoration: none; color: inherit; cursor: pointer; }
a.chip:hover { border-color: #4a4f66; color: var(--paper); }
.chip.more { font: inherit; font-size: .82rem; font-weight: 700; color: #9aa0ff; background: transparent; border-style: dashed; cursor: pointer; }
.vswatch { position: absolute; right: 14px; bottom: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid rgba(255,255,255,.85); box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.nophoto { margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed #3a3d52; }
.notes p { margin: 8px 0 0; color: var(--paper-dim); font-size: .85rem; line-height: 1.55; }

/* ---------- фон приложения: те же силуэты, что на карточках, едва заметно и с затуханием ---------- */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--app-field); background-size: 150px; opacity: .065;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 85%); mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 85%); }

/* ---------- «Находка дня» ---------- */
.daily { position: relative; margin: 0 0 12px; min-height: 108px; }
.daily__pack, .daily__item { display: grid; border-radius: 18px; transition: opacity .35s ease, transform .45s cubic-bezier(.16,1,.3,1); }
.daily__pack { position: absolute; inset: 0; z-index: 2; align-content: center; gap: 2px; padding: 16px 18px; cursor: pointer; color: #fff;
  background: radial-gradient(120% 140% at 85% 0%, #3a2e6e, transparent 60%), linear-gradient(135deg, #1f1b33, #151722); border: 1px solid #3b3566; overflow: hidden; }
.daily__pack::after { content: ""; position: absolute; inset: 0; background-image: var(--app-field); background-size: 110px; opacity: .12; pointer-events: none; }
.daily__pack b { font-size: 1.1rem; }
.daily__pack small { color: var(--paper-dim); }
.daily__pack:hover { border-color: #5a4fa0; }
.daily__label { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #b9a8ff; }
.daily__item { grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 10px 16px 10px 10px; text-decoration: none; color: var(--paper);
  background: linear-gradient(135deg, #1d1a30, var(--surface)); border: 1px solid #3b3566; opacity: 0; transform: scale(.96); }
.daily__item b { display: block; font-size: 1.05rem; margin: 2px 0; }
.daily__item small { display: block; color: var(--muted); }
.daily__item em { display: inline-block; margin-top: 6px; font-style: normal; font-weight: 700; font-size: .82rem; color: #9aa0ff; }
.daily__img { width: 96px; height: 96px; border-radius: 14px; background: radial-gradient(70% 70% at 50% 45%, #2e2b48, #17171f); display: grid; place-items: center; overflow: hidden; }
.daily__img img { width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); }
.daily.open .daily__pack { opacity: 0; transform: translateY(-8px) scale(1.02); pointer-events: none; }
.daily.open .daily__item { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .daily__pack, .daily__item { transition: none; } }
/* iPhone увеличивает страницу при фокусе на поле со шрифтом меньше 16px - шторки "уезжали" вправо */
.form input, .form textarea, .form select, .search input, .sheet input { font-size: 16px; }
.cutout-stage { position: relative; }
.cutout-stage img { position: absolute; left: 15%; top: 8%; width: 70%; height: 84%; max-width: none; max-height: none; object-fit: contain; }
/* настоящая камера: подсказка вместо кадра, пока фото нет */
.cam-hint { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 0 24%; text-align: center; color: var(--paper-dim); }
.cam-hint svg { width: 44px; height: 44px; fill: none; stroke: #8e93c9; stroke-width: 1.6; }
.cam-hint b { color: var(--paper); }
.cam-hint small { font-size: .8rem; }
.pickrow { display: flex; gap: 10px; align-items: center; }
.pickrow p { flex: 1; }
.pickrow img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #1d1f28; }
.pickrow img + img { object-fit: contain; }
.chip.hasph::after { content: ""; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: #6fdca3; display: inline-block; vertical-align: middle; }

/* профиль: соцсети как ник после неизменяемого адреса */
.soc-row { display: grid; grid-template-columns: 20px auto 1fr; align-items: center; gap: 8px; }
.soc-row svg { width: 20px; height: 20px; fill: none; stroke: var(--paper-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.soc-pre { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.soc-row input { min-width: 0; background: transparent; border: 0; padding: 6px 0; color: var(--paper); font: inherit; font-size: 16px; }
.soc-row input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* цели: главная цель + полка остальных; шаг без фото - нарисованная иконка */
.goal__items a small { display: block; font-size: .64rem; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: -2px; }
.goal__ico { width: 46%; height: 46%; fill: none; stroke: #9aa0ff; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.goal__items a.missing .goal__ico { stroke: #5d6290; }
.goal__foot { margin: 12px 0 0; color: var(--paper-dim); font-size: .85rem; line-height: 1.45; }
.goal__pin { margin-top: 12px; }
.goal--done { border-color: #2f8f67; }
.goal--done .progress span { background: #2fbf7a; }
.goal-shelf { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 10px -12px 0; padding: 2px 12px; scroll-snap-type: x proximity; }
.goal-shelf::-webkit-scrollbar { display: none; }
.goal-mini { flex: 0 0 auto; min-width: 150px; scroll-snap-align: start; display: grid; gap: 4px; padding: 11px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.goal-mini b { font-size: .9rem; }
.goal-mini small { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.goal-mini:hover { border-color: #4a4f66; }
.goal-mini--done { border-color: #2f8f67; }
.pips { display: flex; gap: 3px; margin-top: 4px; }
.pips i { width: 12px; height: 6px; border-radius: 2px; background: #2a2d3a; }
.pips i.on { background: linear-gradient(90deg, #5f7fe6, #9a6bd0); }
.goal-mini--done .pips i.on { background: #2fbf7a; }
.goal-all { margin-top: 10px; }

/* длинные ссылки в подписях переносятся, а не растягивают экран */
.note a, .desc a, .credit a { overflow-wrap: anywhere; }

/* картинка игры из RAWG: кадр или арт, заполняет окно */
.model__img.cover img { position: absolute; inset: 0; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; filter: none; }

/* галерея вещи: главное фото открывает просмотр, миниатюры и плитка «своё фото» */
button.model__img { display: block; width: 100%; padding: 0; border: 0; font: inherit; color: inherit; cursor: zoom-in; }
button.model__img:focus-visible, .thumbs button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.thumbs button { aspect-ratio: 1; padding: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); cursor: zoom-in; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .thumb-add { cursor: pointer; display: grid; place-items: center; align-content: center; gap: 2px; border-style: dashed; color: var(--paper-dim); font: inherit; }
.thumb-add svg { width: 22px; height: 22px; fill: none; stroke: #9aa0ff; stroke-width: 2; stroke-linecap: round; }
.thumb-add small { font-size: .66rem; font-weight: 600; }
.thumb-add:hover { border-color: #4a4f66; color: var(--paper); }

/* просмотрщик фото поверх страницы */
html.lb-open, html.lb-open body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(8, 9, 12, .94); display: grid; grid-template-rows: 1fr auto; touch-action: none; overscroll-behavior: contain; }
.lb[hidden] { display: none; }
.lb__stage { margin: 0; display: grid; place-items: center; padding: 56px 12px 8px; min-height: 0; }
.lb__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.lb__cap { margin: 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); color: var(--paper-dim); font-size: .82rem; text-align: center; display: grid; gap: 4px; }
.lb__cap b { color: var(--paper); font-variant-numeric: tabular-nums; }
.lb__cap a { color: #9aa0ff; }
.lb__close, .lb__nav { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(29, 31, 40, .85); color: var(--paper); display: grid; place-items: center; cursor: pointer; }
.lb__close svg, .lb__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb__close { top: calc(10px + env(safe-area-inset-top)); right: 12px; }
.lb__nav { top: 50%; transform: translateY(-50%); }
.lb__prev { left: 10px; } .lb__next { right: 10px; }
.lb.single .lb__nav { display: none; }
@media (hover: none) { .lb__nav { display: none; } }

/* отправка своего фото */
.upl { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; }
.upl__prev { aspect-ratio: 1; border-radius: 14px; border: 1px dashed #3a3d52; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.upl__prev svg { width: 34px; height: 34px; fill: none; stroke: #5d6290; stroke-width: 1.6; }
.upl__prev img { width: 100%; height: 100%; object-fit: cover; }

/* модерация: строка = фото, что и чьё, галочка / крестик */
.modlist { display: grid; gap: 8px; margin-top: 12px; }
.modrow { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.modrow__pic { width: 72px; height: 72px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; }
.modrow__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modrow__main { display: grid; gap: 2px; min-width: 0; }
.modrow__main a { color: var(--paper); text-decoration: none; }
.modrow__main b { font-size: .95rem; overflow-wrap: anywhere; }
.modrow__main small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.modrow__acts { display: flex; gap: 8px; }
.modbtn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; background: var(--surface-2); border: 1px solid var(--line); }
.modbtn svg { width: 22px; height: 22px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.modbtn.ok svg { stroke: #2fbf7a; } .modbtn.ok:hover { border-color: #2f8f67; }
.modbtn.no svg { stroke: #ff8a8a; } .modbtn.no:hover { border-color: #8a3a48; }
@media (max-width: 420px) { .modrow { grid-template-columns: 60px minmax(0, 1fr); } .modrow__pic { width: 60px; height: 60px; } .modrow__acts { grid-column: 1 / -1; justify-content: flex-end; } }

/* редкость-оценка: приглушённо, чтобы не выглядела как подтверждённая */
.fact b.est { color: var(--paper-dim); font-weight: 600; }

/* вход через бота: крупный код, который бот повторит */
.login-code { display: grid; justify-items: center; gap: 4px; padding: 14px; margin-bottom: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.login-code b { font-size: 2rem; letter-spacing: .3em; font-variant-numeric: tabular-nums; color: var(--paper); padding-left: .3em; }
.login-code small { color: var(--muted); font-size: .8rem; max-width: 34ch; }

/* подтверждение: фото, которое попадёт на карточку, и поворот */
.rotprev { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.rotprev__img { aspect-ratio: 1; border-radius: 12px; background: #e9e8f2 var(--field-img) center / 60% repeat; display: grid; place-items: center; overflow: hidden; }
.rotprev__img img { max-width: 88%; max-height: 88%; object-fit: contain; }
.rotprev .ico-s { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* поделиться: превью картинки и действия */
.share-prev { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 1200 / 630; object-fit: cover; background: var(--surface-2); }
.share-skel { aspect-ratio: 1200 / 630; border-radius: 12px; background: linear-gradient(100deg, var(--surface-2) 30%, #262937 50%, var(--surface-2) 70%) 0 0 / 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .share-skel { animation: none; } }
.share-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.share-btns .btn:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.share-url { margin-top: 10px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.btn .ico-s { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* ---------- витрина каталога: ячейка под стеклом, свет сверху, вещь с тенью ---------- */
.vits { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.vits--sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.vit { display: grid; grid-template-rows: auto 1fr; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--paper); text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s; }
.vit:hover { border-color: #4a4f66; transform: translateY(-2px); }
.vit:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.vit__case { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 0%, rgba(154,164,255,.20), transparent 70%), linear-gradient(180deg, #1f2130, #15161d 78%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), inset 0 -18px 24px -18px rgba(0,0,0,.6); }
.vit__case::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 9%; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); }
.vit__case img { position: relative; z-index: 1; max-width: 76%; max-height: 74%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0,0,0,.45)); }
.vit__case svg { width: 38%; height: auto; fill: none; stroke: #5d6290; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.vit__ai { position: absolute; z-index: 2; right: 8px; top: 8px; font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .06em; color: var(--paper-dim); background: rgba(18,19,24,.72); border: 1px solid var(--line); border-radius: 99px; padding: 2px 6px; }
.vit__txt { display: grid; align-content: start; gap: 2px; padding: 10px 12px 12px; min-width: 0; }
.vit__txt b { font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.vit__txt small { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vits--sm .vit__txt { padding: 8px 10px 10px; }
.vits--sm .vit__txt b { font-size: .88rem; }
@media (prefers-reduced-motion: reduce) { .vit { transition: none; } .vit:hover { transform: none; } }

/* ---------- цены: заголовок с переключателем валюты ---------- */
.price-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.price-head h2.block { margin: 0; }
.seg--cur { flex-shrink: 0; }
.seg--cur button { min-width: 34px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.price-row b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cur-note { margin-top: 8px; }

/* ---------- модерация правок каталога ---------- */
.modrow--fix { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.modrow--fix .modrow__main small b { color: var(--paper); font-weight: 600; }
.fixval { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; margin: 4px 0; font-size: .78rem; color: var(--muted); }
.fixval input { font: inherit; font-size: .9rem; color: var(--paper); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.fixval input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.note.err { color: #ff8a8a; }
@media (max-width: 420px) { .modrow--fix { grid-template-columns: minmax(0, 1fr); } .modrow--fix .modrow__acts { justify-content: flex-end; } }
.irow.irow--fix { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.irow--fix .irow__main b { white-space: normal; overflow-wrap: anywhere; }
.irow--fix .irow__main small { white-space: normal; overflow-wrap: anywhere; }
.irow--fix .tag { white-space: nowrap; align-self: start; }
.legal p { margin: 0 0 10px; max-width: 70ch; line-height: 1.6; }
.legal h2.block { margin-top: 26px; }
