/* ============================================================
   «Архив стендов» — единый файл стилей для index / admin / share
   Дизайн-токены и базовые классы — по спецификации, не менять.
   ============================================================ */

:root {
  --bg:#f4f6f8; --surface:#ffffff; --text:#101828; --muted:#667085;
  --accent:#21a038; --accent-dark:#15803d; --accent-soft:#e7f6ec;
  --danger:#d92d20; --border:#e4e7ec; --radius:14px; --radius-sm:9px;
  --shadow:0 1px 3px rgba(16,24,40,.07),0 8px 24px -12px rgba(16,24,40,.12);
  --font:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,sans-serif;
}

/* ---------- база ---------- */

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

[hidden] { display: none !important; }

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

body.modal-open { overflow: hidden; }
body.has-selection { padding-bottom: 120px; }

img { max-width: 100%; }

a { color: var(--accent-dark); }

h1, h2, h3 { line-height: 1.25; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

main.container { padding-bottom: 56px; }

.muted { color: var(--muted); }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: #eef1f4; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
}
.btn:hover { background: #e3e7ec; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.btn-ghost.active { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b42318; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- поля ввода ---------- */

.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .8; }
.input:hover, .select:hover, .textarea:hover { border-color: #cfd4dc; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input[readonly] { background: #f9fafb; }

.textarea { min-height: 88px; resize: vertical; line-height: 1.5; }

.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

/* ---------- чипы и теги ---------- */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 13.5px; line-height: 1.2;
  cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip.active { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); font-weight: 600; }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f2f4f7; color: var(--muted);
  font-size: 12px; line-height: 1.5; white-space: nowrap;
}

/* ---------- карточка-поверхность ---------- */

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- модалы ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(16,24,40,.55);
  backdrop-filter: blur(2px);
  overflow-y: auto;
}

.modal {
  position: relative;
  width: 100%; max-width: 960px;
  max-height: min(92vh, 940px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.modal-narrow { max-width: 560px; }

.modal-title { font-size: 19px; margin-bottom: 14px; padding-right: 36px; }
.modal-sub { font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.modal-loading { display: flex; align-items: center; justify-content: center; padding: 90px 0; grid-column: 1 / -1; }

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: #eef1f4; color: var(--muted);
  font-size: 14px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: #e3e7ec; color: var(--text); }

.field {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.field .input, .field .select, .field .textarea { font-weight: 400; color: var(--text); }

/* ---------- toast ---------- */

.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 400;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%; max-width: 480px; padding: 0 16px;
  pointer-events: none;
}

.toast {
  background: #101828; color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 14px; text-align: center;
  max-width: 100%;
  opacity: 0; transform: translateY(10px);
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: none; }
.toast-error, .toast.error { background: var(--danger); }

/* ---------- login-оверлей ---------- */

.login-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-card {
  width: 100%; max-width: 360px;
  padding: 36px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.login-card h1 { font-size: 24px; }
.login-sub { color: var(--muted); font-size: 14px; margin-top: -8px; }
.login-card .input { text-align: center; }
.login-card .btn { width: 100%; }
.login-error { color: var(--danger); font-size: 13px; }

/* ---------- спиннер ---------- */

.spinner {
  flex: none;
  width: 20px; height: 20px;
  border: 2.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.spinner-lg { width: 34px; height: 34px; border-width: 3.5px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ГЛАВНАЯ (index.html)
   ============================================================ */

/* шапка */

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 24px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand h1 { font-size: 19px; font-weight: 700; white-space: nowrap; }

.brand-mark {
  flex: none;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 2px 6px rgba(33,160,56,.35);
}
.brand-mark svg { display: block; }
.brand-mark-lg { width: 52px; height: 52px; border-radius: 14px; }

.count-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}

/* поиск */

.search-hero { padding: 18px; margin: 22px 0 18px; }

.search-row { display: flex; gap: 10px; }
.search-input { flex: 1 1 auto; font-size: 16px; padding: 13px 16px; }

/* зона ИИ-диалога */

.ai-dialog { margin-top: 14px; }

.ai-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid #cdeada;
  border-radius: var(--radius-sm);
}

.ai-icon {
  flex: none;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 15px;
}

.ai-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ai-text { font-size: 14.5px; line-height: 1.5; }
.ai-loading { display: flex; align-items: center; gap: 10px; color: var(--accent-dark); font-size: 14px; }

.ai-answer { display: flex; gap: 8px; }
.ai-answer .input { flex: 1; background: #fff; }

.ai-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ai-found { font-size: 13px; font-weight: 600; color: var(--accent-dark); }

/* панель фильтров */

.filters-panel { padding: 18px; margin-bottom: 20px; display: grid; gap: 16px; }

.filter-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filter-label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.range-pair { display: flex; align-items: center; gap: 8px; }
.range-sep { color: var(--muted); flex: none; }

.filters-footer { display: flex; justify-content: flex-end; }

/* результаты */

.results-meta { font-size: 13px; color: var(--muted); margin: 0 2px 12px; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.stand-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
}
.stand-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(16,24,40,.08), 0 16px 36px -14px rgba(16,24,40,.22);
}

.stand-cover { position: relative; aspect-ratio: 4 / 3; background: #eceff3; }
.stand-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #b4bdc9;
}

.card-check {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 28px; height: 28px;
  border: 2px solid #fff; border-radius: 50%;
  background: rgba(255,255,255,.78);
  box-shadow: 0 1px 4px rgba(0,0,0,.28);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.card-check:hover { border-color: var(--accent); transform: scale(1.08); }
.card-check.checked { background: var(--accent); border-color: #fff; }
.card-check.checked::after {
  content: "";
  position: absolute; left: 7px; top: 8px;
  width: 10px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.cover-badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.badge-3d, .badge-glb, .badge-concept {
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; line-height: 1.4;
}
.badge-3d { background: rgba(16,24,40,.72); color: #fff; }
.badge-glb { background: linear-gradient(135deg, #f7ce55, #e0a832); color: #4a3302; }
.badge-concept { background: #fef0c7; color: #93540b; }

.stand-card-body { padding: 13px 16px 16px; display: flex; flex-direction: column; gap: 5px; }
.stand-card-body h3 { font-size: 16px; font-weight: 700; }
.stand-meta { font-size: 13.5px; color: var(--text); }
.stand-event { font-size: 13px; color: var(--muted); }
.stand-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }

.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-sub { font-size: 14px; }

/* липкая панель выбора */

.select-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 90;
  display: flex; align-items: center; gap: 18px;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 32px -8px rgba(16,24,40,.3);
}

.select-info { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }

.select-previews { display: flex; align-items: center; }
.select-previews img, .select-previews .mini-ph, .select-previews .mini-more {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 2px solid #fff;
  object-fit: cover;
  background: #e6eaef;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  margin-left: -9px;
}
.select-previews > :first-child { margin-left: 0; }
.select-previews .mini-more {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted);
}

.select-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.mini-ph { display: inline-block; background: #e6eaef; }

/* модал стенда */

.stand-modal-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }

.stand-media { min-width: 0; }

.tabs {
  display: inline-flex; gap: 4px;
  padding: 4px;
  background: #eef1f4;
  border-radius: 10px;
  margin-bottom: 12px;
}
.tab {
  padding: 7px 18px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.14); }

.gallery-main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eceff3;
  cursor: pointer;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--text);
  font-size: 20px; line-height: 1;
  box-shadow: 0 1px 5px rgba(0,0,0,.25);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.gallery-nav:hover { background: #fff; }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

.gallery-count {
  position: absolute; bottom: 10px; right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16,24,40,.65); color: #fff;
  font-size: 12px;
}

.gallery-thumbs {
  display: flex; gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumbs button {
  flex: none;
  width: 72px; height: 54px;
  padding: 0;
  border: 2px solid transparent; border-radius: 8px;
  overflow: hidden;
  background: #eceff3;
  cursor: pointer;
  transition: border-color .15s;
}
.gallery-thumbs button:hover { border-color: #c4cbd4; }
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.stand3d {
  position: relative;
  width: 100%; height: 420px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f1f3f5;
}
.stand3d-error {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
  color: var(--muted); font-size: 14px;
}

.stand-info { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.stand-info-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-right: 26px; }
.stand-info-head h2 { font-size: 21px; }

.status-badge {
  flex: none;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.status-done { background: var(--accent-soft); color: var(--accent-dark); }
.status-concept { background: #fef0c7; color: #93540b; }

.props-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.props-table td { padding: 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.props-table tr:last-child td { border-bottom: 0; }
.props-table td:first-child { color: var(--muted); width: 42%; padding-right: 12px; }

.stand-desc { font-size: 14px; line-height: 1.55; white-space: pre-line; }

.tag-groups { display: flex; flex-direction: column; gap: 8px; }
.tag-group { display: flex; gap: 10px; align-items: baseline; }
.tag-group-label { flex: none; min-width: 86px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tag-group-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.stand-info-actions { margin-top: auto; padding-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }

/* списки выбранных стендов в модалах */

.selected-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 230px; overflow-y: auto;
  margin: 8px 0 12px;
}
.selected-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13.5px;
}
.selected-item img, .selected-item .mini-ph {
  flex: none;
  width: 44px; height: 33px;
  border-radius: 6px;
  object-fit: cover;
  background: #e6eaef;
}
.selected-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-remove {
  flex: none;
  width: 26px; height: 26px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 13px; line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.selected-remove:hover { background: #fdecea; color: var(--danger); }

/* результат создания подборки */

.collection-result {
  margin-top: 16px;
  padding: 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 10px;
}
.url-row { display: flex; gap: 8px; }
.url-row .input { flex: 1; background: #fff; font-size: 13px; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* модал генерации */

.generate-form-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.generate-form-row .field { margin-bottom: 0; min-width: 120px; }

.generate-progress {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 4px;
  color: var(--muted); font-size: 14px;
}

.generate-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.gen-item { overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border); box-shadow: none; }
.gen-item a { display: block; aspect-ratio: 4 / 3; background: #eceff3; }
.gen-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gen-item a:hover img { transform: scale(1.03); }
.gen-actions { padding: 10px; display: flex; justify-content: center; }

/* ============================================================
   АДМИНКА (admin.html)
   ============================================================ */

.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 22px 0 16px;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
}
.admin-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: #f7f9fa; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table img {
  width: 60px; height: 45px;
  border-radius: 7px;
  object-fit: cover; display: block;
  background: #e6eaef;
}
.admin-table .btn + .btn { margin-left: 6px; }

/* форма стенда: две колонки */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  align-items: start;
}
.form-grid label, .form-grid .field {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 0;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.form-grid .input, .form-grid .select, .form-grid .textarea { font-weight: 400; color: var(--text); }
.form-grid .full, .form-grid .span-2 { grid-column: 1 / -1; }

/* сетка фото-миниатюр с кнопками ✕ / ☆ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.photo-grid > * {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eceff3;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-grid .photo-actions {
  position: absolute; top: 6px; right: 6px;
  display: flex; gap: 6px;
}
.photo-grid .photo-actions button,
.photo-grid > * > button {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.94); color: var(--text);
  font-size: 13px; line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,.28);
  cursor: pointer;
  transition: transform .1s, color .15s, background .15s;
}
.photo-grid .photo-actions button:hover,
.photo-grid > * > button:hover { transform: scale(1.1); background: #fff; color: var(--accent-dark); }
.photo-grid > * > button { position: absolute; top: 6px; right: 6px; }
.photo-grid > * > button + button { right: 40px; }

.photo-grid .is-cover { outline: 3px solid var(--accent); outline-offset: -3px; }
.photo-grid .is-cover::after {
  content: "обложка";
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600;
}

/* зона загрузки файлов */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--muted); font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ============================================================
   ПУБЛИЧНАЯ ПОДБОРКА (share.html, /c/{token})
   ============================================================ */

.share-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 24px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border);
}

.share-title { font-size: 26px; margin: 26px 0 6px; }
.share-date { color: var(--muted); font-size: 13px; }

.share-comment {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 18px 0 24px;
  font-size: 15px; line-height: 1.55;
  white-space: pre-line;
}
.share-comment b, .share-comment .share-comment-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-dark);
}

.share-stand {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.share-stand h2 { font-size: 18px; margin-bottom: 4px; }
.share-stand .stand-meta { margin-bottom: 4px; }
.share-stand .stand-tags { margin: 8px 0 0; }

.share-photos, .share-stand .photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.share-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover; display: block;
  border-radius: var(--radius-sm);
  background: #eceff3;
  cursor: zoom-in;
}

.share-footer {
  text-align: center;
  color: var(--muted); font-size: 13px;
  padding: 30px 0 44px;
}

/* ---------- печать ---------- */

@media print {
  body { background: #fff; padding: 0; }
  .topbar, .share-header .btn, .share-header a,
  .btn, .no-print, .toast-container, .select-bar,
  .login-overlay, .modal-backdrop { display: none !important; }
  .card, .share-stand, .share-comment { box-shadow: none; border: 1px solid #d7dbe0; }
  .share-comment { border-left: 4px solid #9aa4af; }
  .share-stand { break-inside: avoid; page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 880px) {
  .stand-modal-body { grid-template-columns: 1fr; }
  .stand-info-head { padding-right: 0; }
}

@media (max-width: 720px) {
  .topbar { padding: 11px 16px; }
  .brand h1 { font-size: 17px; }

  .results-grid { gap: 14px; }

  .select-bar {
    left: 0; right: 0; bottom: 0; transform: none;
    max-width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    flex-wrap: wrap; gap: 10px;
    justify-content: space-between;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .select-actions { width: 100%; }
  .select-actions .btn { flex: 1; }

  .share-photos, .share-stand .photo-grid { grid-template-columns: repeat(2, 1fr); }

  body.has-selection { padding-bottom: 170px; }
}

@media (max-width: 440px) {
  .container { padding: 0 14px; }

  .search-hero { padding: 14px; }
  .search-row { flex-wrap: wrap; }
  .search-input { flex: 1 1 100%; }
  .search-row .btn { flex: 1; }

  .filters-panel { padding: 14px; }
  .filters-grid { grid-template-columns: 1fr; }

  .modal { padding: 18px 14px; }
  .modal-backdrop { padding: 12px; }

  .count-badge { display: none; }

  .gallery-thumbs button { width: 60px; height: 45px; }
  .stand3d { height: 320px; }

  .ai-answer { flex-wrap: wrap; }
  .ai-answer .input { flex: 1 1 100%; }
}
