/* Таверна — на токенах сайта (site/assets/css/style.css), подключается после него.
   Все классы с префиксом tv-, чтобы не задевать ни сайт, ни игру. */

[hidden] { display: none !important; }

.tv-body { min-height: 100vh; display: flex; flex-direction: column; }
.tv-body main { flex: 1; }

.tv-section { padding-top: clamp(20px, 3vw, 32px); }

/* ---------- Шапка раздела ---------- */
.tv-head .lead { max-width: 62ch; }
.tv-head-actions { position: relative; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Вкладки раздела ---------- */
.tv-subnav {
  display: flex; gap: 4px; margin-bottom: 26px; padding: 4px;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(12, 10, 19, .6);
  width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tv-subnav::-webkit-scrollbar { display: none; }
.tv-subnav a {
  padding: 8px 16px; border-radius: 999px; font-size: .9rem; color: var(--text-2);
  white-space: nowrap; transition: background .2s, color .2s;
}
.tv-subnav a:hover { color: var(--text); background: var(--surface-2); }
.tv-subnav a.is-active { color: #1a1206; background: linear-gradient(135deg, var(--gold-2), var(--gold)); font-weight: 600; }

/* ---------- Фокус с клавиатуры ---------- */
.tv-body main :focus-visible, .tv-dialog :focus-visible {
  outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px;
}

/* ---------- Фильтры ленты ---------- */
.tv-filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.tv-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tv-filter-row-2 { justify-content: space-between; }
.tv-filters fieldset, .tv-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Переключатели на настоящих радиокнопках: сами кнопки спрятаны, но в фокусе
   и в порядке Tab, стрелки листают варианты — как у любой группы радио */
.tv-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); }
.tv-seg input, .tv-chips input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.tv-seg label {
  padding: 8px 16px; border-radius: 999px; font-size: .92rem; color: var(--text-2);
  cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; user-select: none;
}
.tv-seg label:hover { color: var(--text); }
.tv-seg input:checked + label { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px rgba(240,180,111,.45); }
.tv-seg input:focus-visible + label, .tv-chips input:focus-visible + label { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.tv-seg-wide { display: flex; width: 100%; }
.tv-seg-wide label { flex: 1; text-align: center; white-space: normal; }

.tv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-chips label {
  padding: 6px 14px; border-radius: 999px; font-size: .86rem; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; user-select: none;
  transition: border-color .2s, color .2s, background .2s;
}
.tv-chips label:hover { color: var(--text); border-color: var(--border-strong); }
.tv-chips input:checked + label { color: var(--gold-2); border-color: rgba(240,180,111,.55); background: rgba(232,147,76,.1); }

.tv-search { position: relative; flex: 1 1 240px; min-width: 0; }
.tv-search input { padding-left: 42px; border-radius: 999px; }
.tv-search-ic {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px;
  fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}

.tv-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; color: var(--text-2); user-select: none; }
.tv-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tv-switch-track {
  position: relative; width: 44px; height: 26px; border-radius: 999px; flex: none;
  background: var(--surface-2); border: 1px solid var(--border-strong); transition: background .2s, border-color .2s;
}
.tv-switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-3); transition: transform .2s, background .2s;
}
.tv-switch input:checked + .tv-switch-track { background: rgba(192,80,58,.35); border-color: rgba(240,143,176,.6); }
.tv-switch input:checked + .tv-switch-track::after { transform: translateX(18px); background: var(--rose); }
.tv-switch input:focus-visible + .tv-switch-track { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* ---------- Поля ввода ---------- */
.tv-body input[type="text"], .tv-body input[type="email"], .tv-body input[type="search"],
.tv-body textarea, .tv-body select, .tv-dialog textarea, .tv-dialog input[type="email"], .tv-dialog input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(255,255,255,.05); border: 1px solid var(--border-strong); accent-color: var(--gold);
  transition: border-color .2s, background .2s;
}
.tv-body textarea, .tv-dialog textarea { resize: vertical; line-height: 1.55; }
.tv-body input:focus, .tv-body textarea:focus, .tv-body select:focus, .tv-dialog textarea:focus, .tv-dialog input:focus {
  outline: none; border-color: var(--gold); background: rgba(255,255,255,.07);
}
.tv-body [aria-invalid="true"] { border-color: var(--rose) !important; }
.tv-body input::placeholder, .tv-body textarea::placeholder, .tv-dialog textarea::placeholder { color: var(--text-3); }
.tv-body select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8934c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.tv-body option { background: #17131f; color: var(--text); }
.tv-body input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }

.tv-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; min-width: 0; }
.tv-field > label, .tv-label, .tv-label-row label, .tv-fieldset legend { font-size: .9rem; color: var(--text); font-weight: 500; }
.tv-fieldset { margin-bottom: 20px; }
.tv-fieldset legend { margin-bottom: 8px; padding: 0; }
.tv-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tv-counter { font-size: .78rem; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-counter.is-near { color: var(--gold-2); }
.tv-optional { color: var(--text-3); font-weight: 400; font-size: .82rem; margin-left: 6px; }
.tv-hint { font-size: .84rem; color: var(--text-3); line-height: 1.5; }
.tv-field-error { font-size: .86rem; color: var(--rose); }
.tv-field-error:empty { display: none; }
.tv-field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 16px; }

.tv-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: .95rem; line-height: 1.45; }
.tv-check input, .tv-radio input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); }
.tv-check a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.tv-field-check { gap: 6px; }
.tv-field-check .tv-hint { padding-left: 32px; }

.tv-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Статусы ---------- */
.tv-status { font-size: .92rem; color: var(--text-2); margin: 10px 0; }
.tv-status:empty { display: none; }
.tv-status.is-error { color: var(--rose); padding: 10px 14px; border-radius: 12px; background: rgba(240,143,176,.08); border: 1px solid rgba(240,143,176,.3); }
.tv-status.is-ok { color: var(--teal); padding: 10px 14px; border-radius: 12px; background: rgba(95,212,196,.07); border: 1px solid rgba(95,212,196,.3); }
.tv-loading { color: var(--text-3); padding: 40px 0; text-align: center; }
.tv-loading::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px;
  background: var(--gold-2); box-shadow: 0 0 12px var(--gold); vertical-align: 1px; animation: tv-flicker 1.4s ease-in-out infinite;
}
@keyframes tv-flicker { 0%, 100% { opacity: .45; } 40% { opacity: 1; } 70% { opacity: .7; } }
.tv-feed-status { min-height: 1.2em; }

/* ---------- Пустые состояния ---------- */
.tv-notice {
  grid-column: 1 / -1; text-align: center; padding: clamp(36px, 6vw, 60px) 22px; border-radius: var(--radius);
  border: 1px dashed var(--border-strong); background: radial-gradient(420px 160px at 50% 0%, rgba(232,147,76,.08), transparent 70%), var(--surface);
}
.tv-notice-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--text); margin-bottom: 8px; }
.tv-notice-text { color: var(--text-2); max-width: 52ch; margin: 0 auto; }
.tv-notice-actions { justify-content: center; margin-top: 20px; }

/* ---------- Лента ---------- */
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.tv-grid[aria-busy="true"] { opacity: .6; transition: opacity .2s; }
.tv-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; min-width: 0;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.tv-card:hover { transform: translateY(-3px); border-color: rgba(232,147,76,.45); box-shadow: var(--shadow); }
.tv-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.tv-card-link:focus-visible { outline: 2px solid var(--gold-2); outline-offset: -2px; border-radius: var(--radius); }
.tv-card-art { position: relative; }
.tv-cover { aspect-ratio: 16 / 10; background: #0e0c1a; overflow: hidden; }
.tv-cover img, .tv-cover svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.tv-card-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.tv-badge {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: rgba(12,10,19,.78); border: 1px solid var(--border-strong);
  color: var(--text); backdrop-filter: blur(6px);
}
.tv-badge.is-world { color: var(--violet-2); border-color: rgba(154,157,212,.45); }
.tv-badge.is-hero { color: var(--gold-2); border-color: rgba(240,180,111,.5); }
.tv-badge.is-adult { color: #fff; background: rgba(192,80,58,.85); border-color: rgba(240,143,176,.6); }
.tv-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.tv-card-title {
  font-family: var(--font-display); font-size: 1.32rem; line-height: 1.2; color: var(--text);
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tv-card-short {
  color: var(--text-2); font-size: .93rem; line-height: 1.5; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tv-tags li, .tv-tags a {
  font-size: .76rem; padding: 2px 10px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text-2); overflow-wrap: anywhere;
}
.tv-tags li:has(a) { padding: 0; border: 0; background: none; }
.tv-tags a { display: inline-block; transition: color .2s, border-color .2s; }
.tv-tags a:hover { color: var(--gold-2); border-color: rgba(240,180,111,.45); }
.tv-card-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; color: var(--text-3); margin-top: auto; padding-top: 4px; min-width: 0; }
.tv-card-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tv-card-genre { white-space: nowrap; color: var(--text-2); }
.tv-card-stats { display: flex; gap: 14px; align-items: center; font-size: .84rem; color: var(--text-3); border-top: 1px solid var(--border); padding-top: 10px; }
.tv-stat { display: inline-flex; align-items: center; gap: 5px; }
.tv-heart { width: 16px; height: 16px; fill: none; stroke: var(--rose); stroke-width: 2; stroke-linejoin: round; }
.tv-more { display: flex; justify-content: center; margin-top: 28px; }
.tv-sentinel { height: 1px; }

/* ---------- Панели (вход, псевдоним) ---------- */
.tv-panel {
  padding: clamp(20px, 3vw, 28px); border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); max-width: 560px;
}
.tv-gate .tv-panel { margin: 0 auto 24px; }
.tv-panel-title { font-family: var(--font-display); font-size: 1.55rem; margin-bottom: 8px; }
.tv-panel-lead { margin-bottom: 18px; font-size: .92rem; }
.tv-auth-step .tv-field { margin-bottom: 14px; }
.tv-auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--text-3); font-size: .82rem; }
.tv-auth-or::before, .tv-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Диалоги ---------- */
.tv-dialog {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 24px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #17131f, #100d18); color: var(--text); box-shadow: var(--shadow);
}
.tv-dialog-wide { width: min(560px, calc(100vw - 32px)); }
.tv-dialog::backdrop { background: rgba(5,4,10,.7); backdrop-filter: blur(3px); }
.tv-dialog-title { font-family: var(--font-display); font-size: 1.45rem; margin-bottom: 10px; }
.tv-dialog-text { color: var(--text-2); margin-bottom: 16px; font-size: .95rem; }
.tv-dialog-actions { justify-content: flex-end; margin-top: 8px; }
.tv-dialog .tv-panel { padding: 0; border: 0; background: none; margin-bottom: 12px; }
.tv-dialog .tv-panel-title { font-size: 1.1rem; }
.tv-reasons { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 4px; }
.tv-reasons legend { font-weight: 500; margin-bottom: 8px; }
.tv-radio { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: .94rem; }
.tv-radio:hover { background: var(--surface-2); }
.tv-radio:has(input:checked) { background: rgba(232,147,76,.1); }

/* ---------- Кнопки ---------- */
.tv-btn-danger { color: #fff; background: linear-gradient(135deg, #d0654d, var(--ember)); box-shadow: 0 10px 26px rgba(192,80,58,.3); }
.tv-danger-text { color: var(--rose); }
.tv-quiet { color: var(--text-3); }
.tv-linkbtn { background: none; border: 0; padding: 0; color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* ---------- Страница записи ---------- */
.tv-record-art { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 28px; }
.tv-record-art .tv-cover { aspect-ratio: 21 / 8; }
.tv-record-art .tv-card-badges { top: 16px; left: 16px; }
.tv-record-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.tv-record-main { min-width: 0; }
.tv-record-eyebrow { margin-bottom: 12px; }
.tv-record-title { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; overflow-wrap: anywhere; }
.tv-record-short { font-size: 1.15rem; color: var(--text-2); margin-top: 14px; overflow-wrap: anywhere; }
.tv-record-meta { color: var(--text-3); font-size: .9rem; margin: 14px 0; }
.tv-record-main .tv-tags { margin-bottom: 26px; }
.tv-record-desc {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; line-height: 1.75; color: #e7dfd2;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.tv-record-side { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 12px; }
.tv-record-actions {
  padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.tv-take-row { flex-wrap: nowrap; }
.tv-take { flex: 1 1 auto; }
.tv-like { padding-inline: 16px; gap: 7px; font-variant-numeric: tabular-nums; }
.tv-like .tv-heart { width: 18px; height: 18px; transition: fill .2s, transform .2s; }
.tv-like.is-on .tv-heart { fill: var(--rose); transform: scale(1.08); }
.tv-like.is-on { border-color: rgba(240,143,176,.5); }
.tv-author-tools { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tv-record-auth .tv-panel { max-width: none; }
.tv-banner { padding: 14px 16px; border-radius: 14px; margin-bottom: 20px; background: rgba(232,147,76,.08); border: 1px solid rgba(240,180,111,.35); color: var(--gold-2); }
.tv-banner-reason { color: var(--text-2); margin-top: 6px; font-size: .92rem; overflow-wrap: anywhere; }

.tv-age {
  max-width: 560px; margin: 20px auto; text-align: center; padding: clamp(28px, 5vw, 48px) 24px;
  border-radius: var(--radius); background: radial-gradient(360px 180px at 50% 0%, rgba(192,80,58,.18), transparent 70%), var(--surface);
  border: 1px solid rgba(240,143,176,.3);
}
.tv-age-mark {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff;
  background: linear-gradient(135deg, #d0654d, var(--ember)); box-shadow: 0 10px 30px rgba(192,80,58,.35);
}
.tv-age-title { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 12px; }
.tv-age-text { color: var(--text-2); }
.tv-age-actions { justify-content: center; margin-top: 22px; }

/* ---------- Публикация ---------- */
.tv-publish { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.tv-form {
  padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-width: 0;
}
.tv-form-title { font-size: 1.9rem; margin-bottom: 6px; }
.tv-form > .tv-hint:first-of-type { margin-bottom: 22px; }
.tv-form > .tv-hint b { color: var(--text); font-weight: 600; }
.tv-nick-slot .tv-panel { margin: -10px 0 22px; max-width: none; background: rgba(0,0,0,.18); }
.tv-preview { position: sticky; top: calc(var(--nav-h) + 16px); }
.tv-preview-title { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 12px; }
.tv-preview-card .tv-card:hover { transform: none; }
.tv-picker { margin: -6px 0 22px; display: flex; flex-direction: column; gap: 14px; }
.tv-picker .tv-notice { padding: 24px 18px; }
.tv-picker .tv-notice-title { font-size: 1.2rem; }
.tv-pick-label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.tv-pick-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tv-pick {
  text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03);
  border: 1px solid var(--border); min-width: 0; transition: border-color .2s, background .2s;
}
.tv-pick:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tv-pick[aria-pressed="true"] { border-color: var(--gold); background: rgba(232,147,76,.1); }
.tv-pick b { display: block; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-pick span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .82rem; color: var(--text-3); }
.tv-cover-pick { display: flex; gap: 16px; align-items: flex-start; }
.tv-cover-thumb {
  flex: none; width: 160px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  border: 1px dashed var(--border-strong); display: grid; place-items: center; background: rgba(0,0,0,.2);
}
.tv-cover-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tv-cover-empty { font-size: .8rem; color: var(--text-3); }
.tv-cover-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.tv-cover-actions .tv-hint { flex-basis: 100%; }
.tv-file-btn { cursor: pointer; }
.tv-file-btn:has(+ input:focus-visible) { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.tv-done { max-width: 640px; margin: 0 auto; }
.tv-done:focus { outline: none; }

/* ---------- Мои записи и модерация ---------- */
.tv-page-title { margin-bottom: 8px; }
.tv-page-lead { margin-bottom: 22px; }
.tv-mine-head { justify-content: space-between; margin-bottom: 16px; }
.tv-mine-list, .tv-queue-list { display: flex; flex-direction: column; gap: 14px; }
.tv-mine-item, .tv-mod-item {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 16px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.tv-mine-item.is-deleted { opacity: .62; }
.tv-mine-cover .tv-cover { border-radius: 12px; }
.tv-mine-body, .tv-mod-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tv-mine-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tv-mine-title { font-family: var(--font-display); font-size: 1.35rem; overflow-wrap: anywhere; }
.tv-mine-title a:hover { color: var(--gold-2); }
.tv-mine-reason { font-size: .9rem; color: var(--gold-2); padding: 8px 12px; border-radius: 10px; background: rgba(232,147,76,.08); overflow-wrap: anywhere; }
.tv-mine-stats { font-size: .86rem; color: var(--text-3); }
.tv-mine-actions { margin-top: 6px; }
.tv-state { font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; border: 1px solid; }
.tv-state.is-published { color: var(--teal); border-color: rgba(95,212,196,.4); background: rgba(95,212,196,.07); }
.tv-state.is-review { color: var(--gold-2); border-color: rgba(240,180,111,.45); background: rgba(232,147,76,.08); }
.tv-state.is-hidden { color: var(--rose); border-color: rgba(240,143,176,.45); background: rgba(240,143,176,.07); }
.tv-state.is-deleted { color: var(--text-3); border-color: var(--border-strong); }

.tv-mod-item { display: block; }
.tv-mod-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
.tv-mod-author { gap: 10px; }
.tv-mod-desc { margin-top: 6px; }
.tv-mod-desc summary { cursor: pointer; color: var(--text-2); font-size: .9rem; padding: 4px 0; }
.tv-mod-desc .tv-record-desc { font-size: .95rem; padding-top: 12px; max-height: 420px; overflow-y: auto; }
.tv-mod-reports { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(240,143,176,.05); border: 1px solid rgba(240,143,176,.22); }
.tv-mod-reports h3 { font-size: .95rem; color: var(--rose); margin-bottom: 10px; font-family: var(--font-body); }
.tv-mod-reports ul { display: flex; flex-direction: column; gap: 10px; }
.tv-mod-reports li { font-size: .9rem; }
.tv-mod-comment { color: var(--text-2); margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tv-mod-noreports { margin-top: 14px; }
.tv-mod-note { margin: 16px 0 8px; }

/* ---------- Правила ---------- */
.tv-rules { max-width: 780px; display: flex; flex-direction: column; gap: 18px; }
.tv-rules-block { padding: clamp(20px, 3vw, 30px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.tv-rules-block h2 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 14px; }
.tv-rules-block p + p { margin-top: 12px; }
.tv-rules-block p, .tv-rules-block li { color: var(--text-2); line-height: 1.65; }
.tv-rules-block b { color: var(--text); font-weight: 600; }
.tv-rules-block ul { display: flex; flex-direction: column; gap: 10px; }
.tv-rules-block li { position: relative; padding-left: 26px; }
.tv-rules-block li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); opacity: .8; }
.tv-rules-block.is-yes { border-color: rgba(95,212,196,.28); }
.tv-rules-block.is-yes h2 { color: var(--teal); }
.tv-rules-block.is-yes li::before { background: var(--teal); }
.tv-rules-block.is-no { border-color: rgba(240,143,176,.28); }
.tv-rules-block.is-no h2 { color: var(--rose); }
.tv-rules-block.is-no li::before { background: none; width: 10px; height: 2px; border-radius: 0; top: .78em; background-color: var(--rose); }
.tv-rules-block a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.tv-rules-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 960px) {
  .tv-record-grid, .tv-publish { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tv-record-side, .tv-preview { position: static; }
  .tv-record-side { order: -1; }
  .tv-preview { max-width: 420px; }
}
@media (max-width: 720px) {
  .tv-record-art .tv-cover { aspect-ratio: 16 / 10; }
  .tv-record-art { margin-bottom: 20px; }
}
@media (max-width: 600px) {
  .tv-filter-row { gap: 10px; }
  .tv-filter-row > .tv-seg { flex: 1 1 auto; }
  .tv-filter-row > .tv-seg label { flex: 1; text-align: center; padding: 8px 10px; }
  .tv-search { flex-basis: 100%; order: -1; }
  .tv-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tv-field-pair { grid-template-columns: minmax(0, 1fr); }
  .tv-cover-pick { flex-direction: column; }
  .tv-cover-thumb { width: 100%; max-width: 280px; }
  .tv-mine-item, .tv-mod-grid { grid-template-columns: minmax(0, 1fr); }
  .tv-mine-cover { max-width: 100%; }
  .tv-head-actions .btn { width: 100%; }
  .tv-subnav { width: 100%; }
  .tv-subnav a { flex: 1 0 auto; text-align: center; padding: 8px 12px; }
  .tv-take-row { flex-wrap: wrap; }
  .tv-dialog { padding: 20px 18px; }
  .tv-seg-wide { flex-direction: column; border-radius: 18px; }
  .tv-seg-wide label { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .tv-card, .tv-card:hover { transition: none; transform: none; }
  .tv-loading::before { animation: none; opacity: 1; }
  .tv-switch-track, .tv-switch-track::after, .tv-like .tv-heart, .tv-grid[aria-busy="true"] { transition: none; }
}

/* Поиск: общий отступ полей выше перебивал место под значок лупы */
.tv-body .tv-search input[type="search"] { padding-left: 42px; border-radius: 999px; }

/* Вкладки раздела на телефоне: четыре в ряд без прокрутки */
@media (max-width: 480px) {
  .tv-subnav { display: grid; grid-template-columns: repeat(4, auto); justify-content: stretch; gap: 2px; }
  .tv-subnav a { padding: 8px 6px; font-size: .82rem; }
}

/* Свои галочки и радиокнопки: системные в тёмной теме — белые квадраты */
.tv-check input[type="checkbox"], .tv-radio input[type="radio"] {
  appearance: none; -webkit-appearance: none; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.32); background: rgba(255,255,255,.05); transition: background .15s, border-color .15s;
}
.tv-check input[type="checkbox"] { border-radius: 6px; }
.tv-radio input[type="radio"] { border-radius: 50%; }
.tv-check input[type="checkbox"]:checked { background: var(--gold); border-color: var(--gold); }
.tv-check input[type="checkbox"]:checked::after {
  content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid #1a1206; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.tv-radio input[type="radio"]:checked { border-color: var(--gold); box-shadow: inset 0 0 0 4px #17131f; background: var(--gold); }
.tv-check input:focus-visible, .tv-radio input:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.tv-check input[aria-invalid="true"] { border-color: var(--rose); }

/* На телефоне в списках обложка — полоса, а не полэкрана */
@media (max-width: 600px) {
  .tv-mine-cover .tv-cover { aspect-ratio: 21 / 8; }
}
.tv-rules-block ul + p { margin-top: 14px; }
