/* ── Общее для ленты (feed.html) и каталога (catalog.html) ── */

:root {
  --bg:           #12100a;
  --bg-deep:      #0b0906;
  --card:         #1e1608;
  --surface:      #1a1508;
  --flame:        #f5c842;
  --accent:       #c8860a;
  --text:         #e8d4a0;
  --muted:        #9a7a40;
  --dim:          #5a4010;
  --like:         #ff4d5e;
  --border:       rgba(200,140,20,0.18);
  --border-hover: rgba(200,140,20,0.45);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'PT Serif', Georgia, serif;
  --font-ui:      system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tabbar-h:     0px;
}

/* hidden у элемента со своим display (flex, grid) иначе не прячет */
[hidden] { display: none !important; }

.sc-ava {
  flex: none; display: block;
  width: 36px; height: 36px; border-radius: 50%;
  background: #1a1508 center / cover no-repeat;
  border: 1px solid var(--border-hover);
}

/* ── Нижняя панель — только на телефоне ── */
.sc-tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .sc-tabbar {
    display: flex; justify-content: space-around; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    height: var(--tabbar-h);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(11,9,6,0.94);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .sc-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); text-decoration: none;
    font: 600 11px var(--font-ui);
    -webkit-tap-highlight-color: transparent;
  }
  .sc-tab svg { width: 24px; height: 24px; margin: 3px 0; fill: currentColor; }
  .sc-tab.on { color: var(--flame); }
  /* «Создать» — главная кнопка сайта, выделена, как «+» в тикток */
  .sc-tab-create svg {
    width: 44px; height: 30px; margin: 0; padding: 3px 10px; border-radius: 10px;
    background: linear-gradient(135deg, var(--flame), var(--accent));
    fill: #12100a;
  }
  .sc-tab-create.on { color: var(--muted); }
  /* Строка меню шапки — то же, что панель снизу. Остаются логотип и вход */
  body.has-tabbar nav[data-nav] .nav-links { display: none; }
}

/* ── Тост ── */
.sc-toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px); z-index: 300;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(30,22,8,0.96); color: var(--text);
  border: 1px solid var(--border-hover); border-radius: 22px;
  padding: 10px 18px; font: 600 14px var(--font-ui);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px);
}
.sc-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Поделиться (где нет системного окна) ── */
.sc-share {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.sc-share[hidden] { display: none; }
.sc-share-card {
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--border-hover); border-radius: 18px;
  padding: 18px; color: var(--text); font-family: var(--font-ui);
}
.sc-share-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.sc-x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 8px; }
.sc-share-url { display: flex; gap: 8px; margin-bottom: 16px; }
.sc-share-url input {
  flex: 1; min-width: 0; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: 13px var(--font-ui);
}
.sc-copy {
  flex: none; background: var(--accent); color: #12100a; border: none; border-radius: 10px;
  padding: 0 16px; font: 700 14px var(--font-ui); cursor: pointer;
}
.sc-share-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sc-share-apps a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text); text-decoration: none; font-size: 12px;
  padding: 10px 4px; border-radius: 12px;
}
.sc-share-apps a:hover { background: rgba(200,140,20,0.08); }
.sc-share-apps b {
  width: 46px; height: 46px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
