/* ===== Карточка тайтла: обложки со стрелками, сворачиваемые ссылки и сезоны ===== */

.tp-head {
  display: grid;
  grid-template-columns: minmax(170px, 250px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.tp-cover-col { min-width: 0; }
.tp-cover-frame { position: relative; overflow: hidden; width: 100%; max-width: 250px; aspect-ratio: 3 / 4; height: auto; }
.tp-cover-letter { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: rgba(255, 255, 255, 0.85); }
.tp-cover-letter[hidden] { display: none; }

/* стрелки появляются при наведении на обложку (на телефоне — видны всегда) */
.tp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(20, 20, 26, 0.5);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(6px);
  transition: opacity 0.18s ease, background 0.18s ease;
}
.tp-arrow.is-prev { left: 10px; }
.tp-arrow.is-next { right: 10px; }
.tp-arrow:hover { background: rgba(20, 20, 26, 0.8); }
.tp-arrow svg { width: 18px; height: 18px; }
.tp-cover-frame:hover .tp-arrow,
.tp-cover-frame:focus-within .tp-arrow { opacity: 1; }
@media (hover: none) {
  .tp-arrow { opacity: 0.85; }
}
.tp-cover-label {
  display: block;
  min-height: 1.2em;
  margin-top: 8px;
  font-size: 0.85rem;
  opacity: 0.7;
}

.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }

/* сворачиваемые блоки: закрыты по умолчанию, при перерисовке страницы тоже закрываются */
.tp-block {
  margin-top: 14px;
  border: 1px solid rgba(127, 127, 140, 0.28);
  border-radius: 14px;
}
.tp-block > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  user-select: none;
}
.tp-block > summary::-webkit-details-marker { display: none; }
.tp-block > summary::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.tp-block[open] > summary::after { transform: rotate(-135deg); }
.tp-block-body { padding: 0 16px 12px; }

.tp-link-row,
.tp-season-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed rgba(127, 127, 140, 0.25);
}
.tp-link-row { color: inherit; text-decoration: none; }
.tp-link-row > span { display: grid; min-width: 0; flex: 1; }
.tp-link-row small { opacity: 0.65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-link-row svg { width: 16px; height: 16px; opacity: 0.6; }
.tp-link-row:hover > span b { text-decoration: underline; }

.tp-season-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tp-season-pick:disabled { cursor: default; }
.tp-season-pick.is-current .tp-season-name { text-decoration: underline; }
.tp-season-thumb {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cover) center / cover;
}
.tp-season-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Форма: сезоны ===== */
.season-list { display: grid; gap: 10px; }
.season-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.season-cover {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px dashed currentColor;
  border-radius: 12px;
  background: var(--cover-img, none) center / cover no-repeat;
  color: inherit;
  opacity: 0.85;
  cursor: pointer;
}
.season-cover.has-image { border-style: solid; opacity: 1; }
.season-fields { display: grid; gap: 6px; min-width: 0; }
.season-fields input { width: 100%; min-width: 0; }

/* ===== Галочка «Анонимно»: простой контур вместо стандартной заливки ===== */
.check-row input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  flex: none;
  margin: 2px 0 0;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  background: transparent;
  opacity: 0.7;
  cursor: pointer;
}
.check-row input[type="checkbox"]:checked { opacity: 1; }
.check-row input[type="checkbox"]:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.check-row input[type="checkbox"]:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ===== Кнопки, у которых подпись меняется: ширина фиксирована, чтобы не прыгало ===== */
[data-open-propose],
#pr-submit {
  min-width: 15.5em;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .tp-head { grid-template-columns: 1fr; }
  .tp-cover-col { max-width: 260px; }
}


/* Значки ролей в кружке: корона 13px; значок куратора чуть крупнее, чтобы визуально совпадал по весу с короной */
.badge-chip:not(.badge-admin) svg { width: 14px; height: 14px; }
