/* LeTube v2 — премиум минимализм
   Принципы: тонкие линии, угольная типографика, белая бумага,
   нулевые тени, нулевые градиенты, нулевые украшения.
   Светлая и тёмная темы. */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;450;500;600;700&display=swap');

/* === Темы === */
:root,
html[data-theme="light"] {
  --bg:       #fafaf8;
  --bg-2:     #f4f3ef;
  --surface:  #ffffff;
  --ink:      #0a0a0b;
  --ink-2:    #1a1a1c;
  --ink-soft: #5b5b60;
  --muted:    #9a9aa0;
  --line:     #e6e5e0;
  --line-strong: #d6d5d0;
  --accent:   #0a0a0b;
  --like:     #ff2d55;
  --danger:   #c8261b;
  --ok:       #2c8048;
}

html[data-theme="dark"] {
  --bg:       #0c0c0d;
  --bg-2:     #141416;
  --surface:  #121214;
  --ink:      #f5f5f3;
  --ink-2:    #e8e8e6;
  --ink-soft: #a4a4a8;
  --muted:    #6e6e74;
  --line:     #232326;
  --line-strong: #34343a;
  --accent:   #f5f5f3;
  --like:     #ff3b66;
  --danger:   #ff6b5e;
  --ok:       #45c47a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; color: inherit; }
img, video { max-width: 100%; display: block; }
::selection { background: var(--ink); color: var(--bg); }

/* === Шапка === */
.lt-top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.lt-top__inner {
  max-width: 1080px; margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 14px 24px;
}
.lt-logo {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.lt-logo span { color: var(--ink); }
.lt-logo:hover { text-decoration: none; }

.lt-search {
  position: relative; display: flex; align-items: center;
  max-width: 380px; width: 100%;
}
.lt-search svg {
  position: absolute; left: 12px; color: var(--muted);
  pointer-events: none;
}
.lt-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit; font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.lt-search input:focus {
  background: var(--surface);
  border-color: var(--line-strong);
}

.lt-nav { display: flex; align-items: center; gap: 4px; }
.lt-nav__ico {
  position: relative;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  color: var(--ink-soft);
  transition: color .12s, background .12s;
}
.lt-nav__ico:hover { color: var(--ink); background: var(--bg-2); }
.lt-nav__admin { color: var(--ink); }
.lt-nav__me img {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  margin-left: 6px;
}
.lt-nav__txt {
  font-size: 14px; font-weight: 500;
  padding: 8px 12px;
  color: var(--ink-soft);
}
.lt-nav__txt:hover { color: var(--ink); }

.lt-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--like); color: #fff;
  font-size: 10px; font-weight: 600;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: grid; place-items: center;
  padding: 0 4px;
}

/* === Кнопки === */
.lt-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: opacity .15s, transform .08s;
}
.lt-btn:hover { opacity: .88; color: var(--bg); text-decoration: none; }
.lt-btn:active { transform: scale(.98); }
.lt-btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.lt-btn--block { width: 100%; }
.lt-btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.lt-btn--ghost:hover { background: var(--bg-2); color: var(--ink); opacity: 1; }
.lt-btn--danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.lt-btn--danger:hover { background: var(--danger); color: #fff; opacity: 1; }

/* === Layout === */
.lt-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* === Tabs === */
.lt-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  margin-top: -8px;
}
.lt-tabs a {
  position: relative;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.lt-tabs a:hover { color: var(--ink-soft); }
.lt-tabs a.is-active {
  color: var(--ink);
}
.lt-tabs a.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px; background: var(--ink);
}
.lt-tabs--sub { margin-top: 0; }

/* === Auth === */
.lt-auth {
  max-width: 360px;
  margin: 40px auto;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.lt-auth h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  line-height: 1;
}
.lt-auth__alt {
  color: var(--muted); margin-top: 18px; font-size: 14px; text-align: center;
}
.lt-auth__alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.lt-form { display: grid; gap: 14px; }
.lt-form label {
  display: grid; gap: 6px;
  font-size: 12px; font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.lt-form input, .lt-form textarea {
  font: inherit; color: var(--ink);
  font-size: 15px; letter-spacing: -0.005em;
  text-transform: none;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
}
.lt-form input:focus, .lt-form textarea:focus { border-color: var(--ink); }
.lt-form textarea { resize: vertical; min-height: 80px; font-family: inherit; }

.lt-err, .lt-ok {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 14px;
  border: 1px solid;
}
.lt-err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.lt-ok  { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }

/* === Feed & posts === */
.lt-feed { display: grid; gap: 56px; }

.lt-post {
  display: grid;
  gap: 14px;
}
.lt-post__head {
  display: flex; align-items: center; justify-content: space-between;
}
.lt-post__author {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink);
}
.lt-post__author:hover { text-decoration: none; }
.lt-post__author img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.lt-post__author strong {
  display: block; font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
}
.lt-post__author em {
  display: block; font-style: normal;
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
}
.lt-post__menu {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--muted);
  border-radius: 8px;
}
.lt-post__menu:hover { color: var(--ink); background: var(--bg-2); }

.lt-post__media {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
}
.lt-post__media img, .lt-post__media video {
  width: 100%;
  max-height: 700px;
  object-fit: contain;
  background: var(--bg-2);
}

.lt-post__bar {
  display: flex; align-items: center; gap: 16px;
}
.lt-act {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink);
  padding: 4px;
  border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: color .12s, transform .15s;
}
.lt-act:hover { color: var(--ink); text-decoration: none; }
.lt-act:active { transform: scale(.94); }
.lt-act svg { color: var(--ink); transition: color .15s; }

.lt-like.is-on svg { color: var(--like); }
.lt-like.is-on .lt-act__path { fill: var(--like); stroke: var(--like); }
.lt-like.is-on .lt-act__n { color: var(--like); }
@keyframes lt-pop { 0%{transform:scale(.8)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }
.lt-like.is-bursting svg { animation: lt-pop .35s ease; }

.lt-save.is-on svg { color: var(--ink); }
.lt-save.is-on .lt-act__path { fill: var(--ink); }

.lt-post__cap {
  font-size: 14.5px; line-height: 1.55;
  color: var(--ink-2);
}
.lt-post__cap a:first-child {
  font-weight: 600; color: var(--ink); margin-right: 6px;
}
.lt-tag {
  color: var(--ink-soft);
  font-weight: 500;
}
.lt-tag:hover { color: var(--ink); text-decoration: none; }

.lt-mention {
  color: var(--like, #ff2d55);
  font-weight: 500;
  text-decoration: none;
}
.lt-mention:hover { text-decoration: underline; }

/* === Подгрузка/пусто === */
.lt-more { text-align: center; padding: 40px 0 12px; }
.lt-more button {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: background .12s, border-color .12s;
}
.lt-more button:hover { background: var(--bg-2); border-color: var(--ink-soft); }

.lt-empty {
  text-align: center; padding: 80px 20px;
  color: var(--muted);
}
.lt-empty h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 30px;
  margin: 0 0 8px;
  color: var(--ink); letter-spacing: -0.02em;
}
.lt-empty p { font-size: 15px; }
.lt-empty a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* === Профиль === */
.lt-profile__head {
  display: grid; grid-template-columns: 128px 1fr;
  gap: 32px; align-items: center;
  padding: 12px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.lt-profile__avatar {
  width: 128px; height: 128px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}
.lt-profile__row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.lt-profile__row h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 36px;
  margin: 0; letter-spacing: -0.02em; line-height: 1;
}
.lt-profile__name { margin: 6px 0 2px; font-weight: 600; color: var(--ink); }
.lt-profile__bio { margin: 4px 0; color: var(--ink-soft); }
.lt-profile__stats {
  list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; gap: 22px; font-size: 13.5px; color: var(--muted);
}
.lt-profile__stats strong {
  color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 540px) {
  .lt-profile__head { grid-template-columns: 80px 1fr; gap: 16px; }
  .lt-profile__avatar { width: 80px; height: 80px; }
  .lt-profile__row h1 { font-size: 26px; }
  .lt-profile__stats { gap: 18px; font-size: 13px; }
}

/* === Grid в профиле === */
.lt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.lt-grid__cell {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--bg-2);
  border-radius: 6px;
}
.lt-grid__cell img, .lt-grid__cell video {
  width: 100%; height: 100%; object-fit: cover;
}
.lt-grid__hover {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  color: var(--bg); font-weight: 500; font-size: 13px;
  opacity: 0; transition: opacity .15s;
}
.lt-grid__cell:hover .lt-grid__hover { opacity: 1; }

/* === Upload / Settings / Single === */
.lt-upload, .lt-settings, .lt-search-page, .lt-single, .lt-notif-page, .lt-admin {
  display: grid; gap: 22px;
}
.lt-upload h1, .lt-settings h1, .lt-search-page h1, .lt-single h1, .lt-notif-page h1, .lt-admin h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 38px;
  margin: 0; letter-spacing: -0.02em; line-height: 1;
}

/* === Card (карточка-секция) === */
.lt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: grid; gap: 16px;
}
.lt-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.lt-card--danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.lt-card--danger h2 { color: var(--danger); }

.lt-drop {
  position: relative; display: grid; place-items: center;
  min-height: 280px; padding: 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--bg-2);
  cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s;
}
.lt-drop:hover { border-color: var(--ink-soft); }
.lt-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lt-drop__hint {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px; color: var(--ink);
}
.lt-drop__sub { color: var(--muted); font-size: 13px; margin-top: 8px; }
.lt-drop__preview { margin-top: 18px; max-width: 380px; width: 100%; }
.lt-drop__preview img, .lt-drop__preview video {
  width: 100%; max-height: 320px; object-fit: contain;
  border-radius: 10px; background: #000;
}

.lt-settings__avatar { display: flex; align-items: center; gap: 16px; }
.lt-settings__avatar img {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

/* === Тема (превью) === */
.lt-theme { display: flex; gap: 14px; }
.lt-theme__opt {
  flex: 1;
  display: grid; gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
  text-transform: none; letter-spacing: 0;
  transition: border-color .15s;
}
.lt-theme__opt input { display: none; }
.lt-theme__opt.is-on { border-color: var(--ink); color: var(--ink); }
.lt-theme__preview {
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.lt-theme__preview--light { background: #fafaf8; }
.lt-theme__preview--light::before {
  content: ''; position: absolute; left: 8px; top: 8px;
  width: 36%; height: 4px; background: #0a0a0b; border-radius: 2px;
}
.lt-theme__preview--light::after {
  content: ''; position: absolute; left: 8px; top: 20px;
  width: 70%; height: 3px; background: #d6d5d0; border-radius: 2px;
  box-shadow: 0 8px 0 #d6d5d0, 0 16px 0 #d6d5d0;
}
.lt-theme__preview--dark { background: #0c0c0d; }
.lt-theme__preview--dark::before {
  content: ''; position: absolute; left: 8px; top: 8px;
  width: 36%; height: 4px; background: #f5f5f3; border-radius: 2px;
}
.lt-theme__preview--dark::after {
  content: ''; position: absolute; left: 8px; top: 20px;
  width: 70%; height: 3px; background: #34343a; border-radius: 2px;
  box-shadow: 0 8px 0 #34343a, 0 16px 0 #34343a;
}

/* === Поиск === */
.lt-search-page .lt-search input { padding: 12px 14px 12px 36px; max-width: 100%; }
.lt-search--inline input { max-width: 100%; }

.lt-tags-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.lt-userlist { list-style: none; padding: 0; display: grid; gap: 8px; margin: 0; }
.lt-userlist a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
}
.lt-userlist a:hover { background: var(--bg-2); text-decoration: none; }
.lt-userlist img {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.lt-userlist strong { display: block; font-weight: 600; }
.lt-userlist em { font-style: normal; font-size: 13px; color: var(--muted); }

/* === Комментарии === */
.lt-comments {
  margin-top: 12px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.lt-comments h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; font-size: 22px;
  margin: 0 0 18px; letter-spacing: -0.01em;
}
.lt-comment-form {
  display: flex; gap: 8px; margin-bottom: 22px;
}
.lt-comment-form input {
  flex: 1;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit; outline: none;
  color: var(--ink);
}
.lt-comment-form input:focus {
  background: var(--surface);
  border-color: var(--line-strong);
}

.lt-comments__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.lt-comment {
  display: grid; grid-template-columns: 36px 1fr;
  gap: 12px; position: relative;
}
.lt-comment img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.lt-comment__user { font-weight: 600; color: var(--ink); }
.lt-comment__time { color: var(--muted); font-size: 12px; margin-left: 8px; }
.lt-comment p { margin: 4px 0 0; color: var(--ink-2); }
.lt-comment__del {
  position: absolute; top: 0; right: 0;
  color: var(--muted); font-size: 18px;
  width: 24px; height: 24px;
  border-radius: 4px;
  opacity: 0; transition: opacity .15s, color .15s;
}
.lt-comment:hover .lt-comment__del { opacity: 1; }
.lt-comment__del:hover { color: var(--danger); }

/* === Уведомления === */
.lt-notifs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lt-notif {
  display: grid; grid-template-columns: 40px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px;
  border-radius: 12px;
}
.lt-notif:hover { background: var(--bg-2); }
.lt-notif img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); }
.lt-notif__body { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lt-notif__body strong { color: var(--ink); font-weight: 600; }
.lt-notif__body em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
.lt-notif__thumb { width: 44px; height: 44px; overflow: hidden; border-radius: 8px; }
.lt-notif__thumb img, .lt-notif__thumb video { width: 100%; height: 100%; object-fit: cover; }

/* === Админка === */
.lt-admin { max-width: 100%; }
.lt-admin__head { margin-bottom: 4px; }
.lt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lt-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: grid; gap: 4px;
}
.lt-stat span {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 36px; line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.lt-stat em { font-style: normal; font-size: 12px; color: var(--muted); }

.lt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lt-table th, .lt-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.lt-table th {
  font-weight: 500; color: var(--muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
}
.lt-table tr.is-banned { opacity: .55; }
.lt-tag-bad {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger); font-size: 11px; font-weight: 500;
}
.lt-tag-ok {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--ok) 15%, transparent);
  color: var(--ok); font-size: 11px; font-weight: 500;
}
.lt-row-actions { display: flex; gap: 6px; }

.lt-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.lt-admin-cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.lt-admin-cell__media {
  display: block;
  aspect-ratio: 1; background: var(--bg-2);
}
.lt-admin-cell__media img, .lt-admin-cell__media video {
  width: 100%; height: 100%; object-fit: cover;
}
.lt-admin-cell__meta {
  padding: 10px;
  display: grid; gap: 6px;
  font-size: 12.5px;
}

/* === Меню поста (модалка/попап) === */
.lt-menu {
  position: fixed; inset: 0;
  background: color-mix(in srgb, var(--ink) 30%, transparent);
  display: grid; place-items: center;
  z-index: 100; padding: 20px;
}
.lt-menu__box {
  background: var(--surface);
  border-radius: 14px;
  width: 100%; max-width: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.lt-menu__btn {
  display: block; width: 100%;
  padding: 14px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.lt-menu__btn:hover { background: var(--bg-2); }
.lt-menu__btn:last-child { border-bottom: none; }
.lt-menu__btn--danger { color: var(--danger); font-weight: 500; }

/* === Прочее === */
.lt-muted { color: var(--muted); font-size: 13.5px; }
.lt-muted--center { text-align: center; padding: 12px 0; }
.lt-muted a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }

code {
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 5px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

main.lt-main + .lt-foot { display: none; }
.lt-foot { display: none; }

@media (max-width: 640px) {
  .lt-top__inner { grid-template-columns: auto 1fr; gap: 12px; padding: 12px 16px; }
  .lt-search { grid-column: 1 / -1; order: 3; max-width: 100%; }
  .lt-logo { font-size: 22px; }
  .lt-main { padding: 20px 16px 80px; }
  .lt-feed { gap: 40px; }
  .lt-stats { grid-template-columns: repeat(2, 1fr); }
  .lt-theme { flex-direction: column; }
  .lt-table { font-size: 12.5px; }
  .lt-table th, .lt-table td { padding: 8px 6px; }
}
/* === Верификация === */
.lt-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.12em;
  margin-left: 0.25em;
  color: #1d9bf0;
}
.lt-verified svg {
  display: block;
  width: 1em;
  height: 1em;
}

/* В крупных заголовках профиля — чуть меньше */
.lt-profile__row h1 .lt-verified svg {
  width: 0.7em;
  height: 0.7em;
}

/* Заявка-форма пользователя */
.lt-drop--sm {
  min-height: 120px;
  padding: 18px;
}
.lt-drop--sm .lt-drop__hint {
  font-size: 18px;
}
.lt-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.lt-details summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.lt-details summary:hover { color: var(--ink); }
.lt-verify__reason {
  white-space: pre-wrap;
  background: var(--bg-2);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  margin: 12px 0;
}

/* Заявки в админке — компактная сетка */
.lt-verify-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.lt-verify-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.lt-verify-card__video {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}
.lt-verify-card__body {
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}
.lt-verify-card__head {
  display: flex; align-items: center; gap: 10px;
}
.lt-verify-card__head img {
  width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--line);
  flex-shrink: 0;
}
.lt-verify-card__head a {
  font-weight: 600; color: var(--ink); font-size: 14px;
}
.lt-verify-card__head em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.lt-verify-card__reason {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.lt-verify-card__reason.is-expanded {
  display: block;
  overflow: visible;
}
.lt-verify-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
  padding: 0 14px 14px;
}
.lt-verify-card__actions form { display: contents; }
.lt-verify-card__actions .lt-btn {
  width: 100%;
  padding: 7px 10px;
  font-size: 12.5px;
}
.lt-verify-card__reject-input {
  grid-column: 1 / -1;
  padding: 7px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit; font-size: 12px;
  color: var(--ink);
  outline: none;
  margin-bottom: 4px;
}
.lt-verify-card__reject-input:focus { border-color: var(--ink); }

/* Старые стили (legacy fallback, не используются больше, но не ломают) */
.lt-verify-list, .lt-verify-item { display: none; }

/* Видео-блок в посте: оверлей-ссылка + кнопка звука */
.lt-post__media--video {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.lt-post__media--video video {
  width: 100%;
  max-height: 700px;
  object-fit: contain;
  background: var(--bg-2);
  display: block;
}
/* Прозрачный слой-ссылка поверх видео — клик ведёт на пост */
.lt-post__media-link {
  position: absolute; inset: 0; z-index: 1;
  display: block;
}
/* Кнопка звука — поверх ссылки */
.lt-mute {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border: 0; padding: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .15s, transform .15s;
}
.lt-mute:hover { background: rgba(0, 0, 0, 0.7); transform: scale(1.05); }
.lt-mute:active { transform: scale(0.95); }
.lt-mute svg { display: block; }

/* ===== Текстовые посты ===== */
.lt-post__text {
  display: block; padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink);
}
.lt-post__text:hover { text-decoration: none; }
.lt-post__text-body {
  display: block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px; line-height: 1.4;
  white-space: pre-wrap; word-break: break-word;
}

/* Текстовая плитка в сетке профиля */
.lt-grid__cell--text {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); padding: 14px;
}
.lt-grid__text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 14px; line-height: 1.4; color: var(--ink);
  text-align: center;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 6; -webkit-box-orient: vertical;
}

@media (max-width: 640px) {
  .lt-post__text { padding: 18px; }
  .lt-post__text-body { font-size: 18px; }
  .lt-grid__text { font-size: 11px; -webkit-line-clamp: 5; }
  .lt-grid__cell--text { padding: 8px; }
}

/* === Карусель в посте === */
.lt-post__carousel {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
}
.lt-post__carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lt-post__carousel-track::-webkit-scrollbar { display: none; }
.lt-post__carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
}
.lt-post__carousel-slide .lt-post__media {
  display: block;
  width: 100%;
}
.lt-post__carousel-slide img,
.lt-post__carousel-slide video {
  width: 100%;
  display: block;
  max-height: 80vh;
  object-fit: cover;
  background: var(--bg-2);
}

/* Точки-индикаторы */
.lt-post__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
  padding: 4px 8px;
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.lt-post__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transition: background .2s;
}
.lt-post__dot.is-active {
  background: #fff;
}

/* Счётчик 1/N */
.lt-post__counter {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* === Превью загрузки нескольких файлов === */
.lt-drop__preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.lt-drop__item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-2);
}
.lt-drop__item img,
.lt-drop__item video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.lt-upload__info {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 8px 12px;
  background: var(--bg-2);
  border-radius: 8px;
}
.lt-upload__info--over {
  background: rgba(255, 80, 80, 0.12);
  color: #c73030;
  font-weight: 500;
}

/* === Иконка "несколько" в сетке профиля === */
.lt-grid__multi {
  position: absolute;
  top: 6px; right: 6px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  pointer-events: none;
  z-index: 1;
}
.lt-grid__cell {
  position: relative;
}

@media (max-width: 640px) {
  .lt-post__dots { bottom: 8px; }
  .lt-post__counter { top: 8px; right: 8px; font-size: 11px; padding: 3px 8px; }
}

/* === Табы (для уведомления/сообщения) === */
.lt-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  gap: 4px;
}
.lt-tab {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  position: relative;
}
.lt-tab.is-on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.lt-tab__badge {
  display: inline-block;
  background: var(--like, #ff2d55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
}

/* === Список чатов === */
.lt-chats {
  list-style: none; padding: 0; margin: 0;
}
.lt-chat-item {
  border-bottom: 1px solid var(--line-soft, var(--line));
}
.lt-chat-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
}
.lt-chat-item img {
  width: 48px; height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.lt-chat-item__body { flex: 1; min-width: 0; }
.lt-chat-item__top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px;
}
.lt-chat-item__top strong { font-weight: 600; font-size: 14.5px; }
.lt-chat-item__top em { font-size: 12px; color: var(--muted); font-style: normal; flex-shrink: 0; }
.lt-chat-item__preview {
  font-size: 13.5px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.lt-chat-item__you { color: var(--muted); }
.lt-chat-item.is-unread .lt-chat-item__preview { color: var(--ink); font-weight: 500; }
.lt-chat-item__badge {
  background: var(--like, #ff2d55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}

/* === Страница чата === */
.lt-chat {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bg);
}
.lt-chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.lt-chat__back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.lt-chat__user {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); flex: 1; min-width: 0;
}
.lt-chat__user img {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
}
.lt-chat__user strong { font-weight: 600; font-size: 14.5px; display: block; }
.lt-chat__user em { font-size: 12px; color: var(--muted); font-style: normal; }

.lt-chat__messages {
  list-style: none;
  padding: 14px 12px;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}
.lt-msg {
  max-width: 75%;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.4;
  word-break: break-word;
}
.lt-msg--mine {
  background: var(--ink);
  color: var(--bg);
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}
.lt-msg--theirs {
  background: var(--bg-2);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}
.lt-msg__body { white-space: pre-wrap; }
.lt-msg__time {
  font-size: 10.5px;
  opacity: 0.6;
  margin-top: 2px;
}

.lt-chat__form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  bottom: 0;
}
.lt-chat__form input[type="text"] {
  flex: 1;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 22px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.lt-chat__form input[type="text"]:focus {
  background: var(--bg);
  border-color: var(--line);
}
.lt-chat__send {
  width: 42px; height: 42px;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lt-chat__send:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 640px) {
  .lt-tab { padding: 12px 14px; font-size: 13px; }
  .lt-chat-item a { padding: 10px 12px; }
  .lt-chat-item img { width: 44px; height: 44px; }
}

/* Блок с временным паролем в админке */
.lt-tmp-pwd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lt-tmp-pwd__code {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  user-select: all;
}
.lt-tmp-pwd small { color: var(--ink-soft); font-size: 12px; flex-basis: 100%; }

/* === Заблокированный профиль ("овощ") === */
.lt-profile--banned {
  min-height: 60vh;
}
.lt-profile__banned {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  gap: 14px;
}
.lt-profile__banned-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.6;
}
.lt-profile__banned-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
}
.lt-profile__banned-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 640px) {
  .lt-profile__banned { padding: 40px 16px; }
  .lt-profile__banned-avatar { width: 96px; height: 96px; }
  .lt-profile__banned-avatar svg { width: 96px; height: 96px; }
  .lt-profile__banned-title { font-size: 22px; }
}
