/* Anime detail redesign + comments (detail page only) */

.detail-page {
  overflow-x: clip;
}

.detail-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-weight: 500;
}

.detail-crumbs a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.detail-crumbs a:hover,
.detail-crumbs a:focus-visible {
  color: #fff;
}

.detail-crumbs-sep {
  opacity: 0.45;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.7rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 14, 28, 0.72);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
}

.detail-badge--accent {
  border-color: color-mix(in srgb, var(--primary-start) 45%, transparent);
  background: color-mix(in srgb, var(--primary-start) 22%, rgba(12, 10, 18, 0.85));
  color: #fff;
}

.detail-badge--status {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(22, 101, 52, 0.35);
  color: #86efac;
}

.detail-badge--status.is-releasing {
  border-color: rgba(255, 138, 196, 0.4);
  background: rgba(255, 61, 154, 0.18);
  color: #ffb4d8;
}

.detail-badge--status.is-upcoming,
.detail-badge--status.is-not_yet_aired {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
}

.detail-badge svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
}

.detail-genre-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.detail-genre-chip:hover,
.detail-genre-chip:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.detail-hero-poster {
  position: relative;
}

.detail-trailer-btn {
  position: absolute;
  inset-inline: 0.55rem;
  bottom: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: rgba(10, 10, 15, 0.78);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease;
}

.detail-trailer-btn:hover,
.detail-trailer-btn:focus-visible {
  background: rgba(255, 61, 154, 0.88);
}

.detail-trailer-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.detail-tabs {
  display: flex;
  gap: 1.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
  border-bottom: 1px solid var(--outline);
}

.detail-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0 0.9rem;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.15s ease;
}

.detail-tab:hover,
.detail-tab:focus-visible {
  color: var(--text);
}

.detail-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--primary-start);
}

.detail-tab svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-panel[hidden] {
  display: none !important;
}

.detail-card {
  margin: 0 0 1.25rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--outline) 88%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.detail-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
}

.detail-card-title svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--primary-start);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.detail-sheet.detail-card .detail-synopsis {
  font-size: 0.98rem;
  line-height: 1.85;
}

.detail-body {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 1.5rem 1.75rem;
}

.detail-aside .detail-card {
  margin-bottom: 1rem;
}

.detail-aside .detail-facts {
  margin: 0;
}

.detail-aside .detail-facts div {
  padding: 0.62rem 0;
}

.detail-aside .detail-facts div:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-aside .detail-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.5rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.detail-status-pill.is-finished,
.detail-status-pill.is-completed,
.detail-status-pill.is-finished_season,
.detail-status-pill.is-finished_series {
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
}

.detail-badge--status.is-finished_season,
.detail-badge--status.is-finished_series {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(22, 101, 52, 0.35);
  color: #86efac;
}

.detail-status-pill.is-releasing {
  background: rgba(255, 61, 154, 0.16);
  color: #ff8ac4;
}

.detail-status-pill.is-upcoming {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.detail-aside-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.detail-aside-genres a {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.detail-aside-genres a:hover,
.detail-aside-genres a:focus-visible {
  border-color: color-mix(in srgb, var(--primary-start) 50%, var(--outline));
  color: var(--primary-start);
}

/* Comments — premium discussion UI */
.aniu-comments {
  --aniu-cmt-bg: #0d0d12;
  --aniu-cmt-card: #171720;
  --aniu-cmt-secondary: #1d1b27;
  --aniu-cmt-border: #302b3a;
  --aniu-cmt-accent: #d93670;
  --aniu-cmt-accent-2: #9146e8;
  --aniu-cmt-text: #f5f5f7;
  --aniu-cmt-text-2: #a09daa;
  --aniu-cmt-muted: #777482;
  --aniu-cmt-grad: linear-gradient(110deg, #9146e8, #d93670);
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--aniu-cmt-border);
  border-radius: 18px;
  background: var(--aniu-cmt-card);
  color: var(--aniu-cmt-text);
}

.aniu-comments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.aniu-comments-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--aniu-cmt-text);
  font-family: var(--font);
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.35;
}

.aniu-comments-title svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--aniu-cmt-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aniu-comments-desc {
  margin: 0.4rem 0 0;
  max-width: 42rem;
  color: var(--aniu-cmt-text-2);
  font-size: 0.88rem;
  line-height: 1.65;
}

.aniu-comments-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 1.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--aniu-cmt-accent) 35%, var(--aniu-cmt-border));
  background: color-mix(in srgb, var(--aniu-cmt-accent) 14%, var(--aniu-cmt-secondary));
  color: var(--aniu-cmt-text);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.aniu-composer {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--aniu-cmt-border);
  border-radius: 16px;
  background: var(--aniu-cmt-secondary);
}

.aniu-composer--guest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.aniu-composer-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem 0.8rem;
  align-items: center;
}

.aniu-composer-user.has-rank {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.aniu-composer-avatar-wrap {
  position: relative;
  width: 52px;
  padding-bottom: 0.7rem;
  flex: 0 0 auto;
}

.aniu-composer-avatar {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background:
    linear-gradient(#171720, #171720) padding-box,
    linear-gradient(135deg, #9146e8, #d93670) border-box;
  box-shadow: 0 0 0 3px color-mix(in srgb, #d93670 18%, transparent);
  flex: 0 0 auto;
}

.aniu-composer-avatar--fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 750;
}

.aniu-composer-identity {
  min-width: 0;
}

.aniu-composer-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.aniu-composer-display-name {
  color: var(--aniu-cmt-text);
  font-size: 1.05rem;
  font-weight: 780;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.aniu-composer-handle {
  margin: 0.18rem 0 0;
  color: var(--aniu-cmt-muted);
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.aniu-composer-rank-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 1px solid color-mix(in srgb, var(--aniu-cmt-border) 85%, transparent);
  min-width: 3.5rem;
}

.aniu-composer-rank {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

.aniu-composer-rank-label {
  color: var(--aniu-cmt-text-2);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.aniu-composer-name {
  color: var(--aniu-cmt-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.aniu-composer-box {
  border: 1px solid color-mix(in srgb, var(--aniu-cmt-accent-2) 42%, var(--aniu-cmt-border));
  border-radius: 12px;
  background: #121218;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aniu-composer-box:focus-within {
  border-color: color-mix(in srgb, var(--aniu-cmt-accent) 55%, var(--aniu-cmt-accent-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aniu-cmt-accent-2) 18%, transparent);
}

.aniu-composer-box textarea {
  display: block;
  width: 100%;
  min-height: 7.5rem;
  max-height: 220px;
  margin: 0;
  padding: 0.85rem 0.95rem 0.35rem;
  border: 0;
  resize: vertical;
  background: transparent;
  color: var(--aniu-cmt-text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
}

.aniu-composer-box textarea::placeholder {
  color: var(--aniu-cmt-muted);
}

.aniu-composer-box textarea:focus {
  outline: none;
}

.aniu-composer-box textarea.is-invalid {
  color: #fecaca;
}

.aniu-composer-box-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.35rem 0.85rem 0.65rem;
}

.aniu-composer-counter {
  color: var(--aniu-cmt-muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.aniu-composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.aniu-composer-hint {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  max-width: 28rem;
  color: var(--aniu-cmt-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.aniu-composer-hint svg {
  width: 15px;
  height: 15px;
  margin-top: 0.12rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aniu-composer-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 12px;
  background: var(--aniu-cmt-grad);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(145, 70, 232, 0.22);
  transition: filter 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.aniu-composer-submit:hover:not(:disabled),
.aniu-composer-submit:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.aniu-composer-submit:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.aniu-composer-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aniu-comments-note {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--aniu-cmt-accent-2) 28%, var(--aniu-cmt-border));
  background: color-mix(in srgb, var(--aniu-cmt-accent-2) 12%, var(--aniu-cmt-secondary));
  color: var(--aniu-cmt-text);
  font-size: 0.86rem;
  line-height: 1.55;
}

.aniu-comments-note.is-error {
  border-color: color-mix(in srgb, #ef4444 40%, var(--aniu-cmt-border));
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.aniu-comments-note[hidden] {
  display: none;
}

.aniu-comments-sort {
  display: flex;
  justify-content: flex-end;
  margin: 1rem 0 0.35rem;
}

.aniu-comments-sort[hidden] {
  display: none;
}

.aniu-comments-sort-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--aniu-cmt-text-2);
  font-size: 0.82rem;
}

.aniu-comments-sort-label select {
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--aniu-cmt-border);
  border-radius: 8px;
  background: var(--aniu-cmt-secondary);
  color: var(--aniu-cmt-text);
  font: inherit;
  font-size: 0.82rem;
}

.aniu-comments-empty {
  margin-top: 1rem;
  padding: 2rem 1.25rem;
  border: 1px solid var(--aniu-cmt-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--aniu-cmt-accent-2) 8%, var(--aniu-cmt-secondary));
  text-align: center;
}

.aniu-comments-empty[hidden] {
  display: none;
}

.aniu-comments-empty-art {
  display: grid;
  place-items: center;
  margin: 0 auto 0.85rem;
  width: 88px;
  height: 72px;
}

.aniu-comments-empty-art svg {
  width: 88px;
  height: 72px;
}

.aniu-comments-empty-title {
  margin: 0;
  color: var(--aniu-cmt-text);
  font-size: 1.05rem;
  font-weight: 750;
}

.aniu-comments-empty-desc {
  margin: 0.45rem 0 0;
  color: var(--aniu-cmt-text-2);
  font-size: 0.88rem;
  line-height: 1.6;
}

.aniu-comments-list {
  display: grid;
  gap: 0.85rem;
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
}

.aniu-comments-list:empty {
  display: none;
}

.aniu-cmt-card {
  margin: 0;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--aniu-cmt-border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--aniu-cmt-accent-2) 7%, #171720), #171720);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--aniu-cmt-accent) 8%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.22);
}

.aniu-cmt-card--reply {
  margin: 0;
  padding: 0.9rem 0.95rem;
  border-color: color-mix(in srgb, var(--aniu-cmt-accent-2) 22%, var(--aniu-cmt-border));
  border-radius: 14px;
  background: #1c1826;
  box-shadow: none;
}

.aniu-cmt-card--reply .aniu-cmt-avatar-wrap {
  width: 44px;
  padding-bottom: 0.55rem;
}

.aniu-cmt-card--reply .aniu-cmt-avatar {
  width: 44px;
  height: 44px;
}

.aniu-cmt-card--reply .aniu-cmt-display-name {
  font-size: 0.95rem;
}

.aniu-cmt-card--reply .aniu-cmt-rank {
  width: 44px;
  height: 44px;
}

.aniu-cmt-card--reply .aniu-cmt-rank-label {
  font-size: 0.64rem;
}

.aniu-cmt-card--reply .aniu-cmt-top {
  margin-bottom: 0.7rem;
}

.aniu-cmt-card--reply .aniu-cmt-footer {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
}

.aniu-cmt-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem 0.8rem;
  align-items: center;
  margin-bottom: 0.95rem;
}

.aniu-cmt-top.has-rank {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.aniu-cmt-avatar-wrap {
  position: relative;
  width: 52px;
  padding-bottom: 0.7rem;
  flex: 0 0 auto;
  justify-self: start;
}

.aniu-cmt-avatar {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background:
    linear-gradient(#171720, #171720) padding-box,
    linear-gradient(135deg, #9146e8, #d93670) border-box;
  box-shadow: 0 0 0 3px color-mix(in srgb, #d93670 18%, transparent);
}

.aniu-cmt-avatar--fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 750;
}

.aniu-cmt-vip {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 1.2rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #f5c518 55%, #302b3a);
  background: linear-gradient(110deg, #6a5212, #2f2614 70%);
  color: #f5d56e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.aniu-cmt-vip .aniu-cmt-crown {
  width: 11px;
  height: 11px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.aniu-cmt-identity {
  min-width: 0;
  align-self: center;
}

.aniu-cmt-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.aniu-cmt-display-name {
  color: var(--aniu-cmt-text);
  font-size: 1.05rem;
  font-weight: 780;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.aniu-cmt-handle {
  margin: 0.18rem 0 0;
  color: var(--aniu-cmt-muted);
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.aniu-cmt-username {
  color: var(--aniu-cmt-text);
  font-size: 0.98rem;
  font-weight: 750;
}

.aniu-cmt-verified {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.aniu-cmt-rank-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  align-self: center;
  padding-inline-start: 0.75rem;
  border-inline-start: 1px solid color-mix(in srgb, var(--aniu-cmt-border) 85%, transparent);
  min-width: 3.5rem;
}

.aniu-cmt-rank {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

.aniu-cmt-rank-label {
  color: var(--aniu-cmt-text-2);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
}

.aniu-cmt-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--aniu-cmt-muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.aniu-cmt-time svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.aniu-cmt-body {
  margin: 0;
  color: color-mix(in srgb, var(--aniu-cmt-text) 92%, var(--aniu-cmt-text-2));
  font-size: 0.95rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.aniu-cmt-spoiler {
  margin: 0;
}

.aniu-cmt-spoiler-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  color: #f5b942;
  font-size: 0.8rem;
  font-weight: 750;
}

.aniu-cmt-spoiler-label svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aniu-cmt-spoiler-mask {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid color-mix(in srgb, #f5b942 40%, var(--aniu-cmt-border));
  border-radius: 12px;
  background: color-mix(in srgb, #f5b942 7%, #211d2b);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.aniu-cmt-spoiler-hint {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: auto;
  width: max-content;
  height: 2.1rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: rgba(18, 16, 26, 0.88);
  color: var(--aniu-cmt-text);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--aniu-cmt-border);
}

.aniu-cmt-spoiler-hint svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.aniu-cmt-spoiler-text {
  display: block;
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  opacity: 0.8;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.aniu-cmt-spoiler.is-revealed .aniu-cmt-spoiler-hint {
  display: none;
}

.aniu-cmt-spoiler.is-revealed .aniu-cmt-spoiler-mask {
  cursor: default;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.aniu-cmt-spoiler.is-revealed .aniu-cmt-spoiler-text {
  filter: none;
  user-select: text;
  pointer-events: auto;
  opacity: 1;
}

.aniu-cmt-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--aniu-cmt-border) 88%, transparent);
}

.aniu-cmt-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.aniu-cmt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--aniu-cmt-border);
  background: #211d2b;
  color: var(--aniu-cmt-text-2);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.aniu-cmt-chip svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aniu-cmt-chip--reply {
  border-color: color-mix(in srgb, var(--aniu-cmt-accent-2) 42%, var(--aniu-cmt-border));
  color: #c4a8ff;
}

.aniu-cmt-reply-count {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  opacity: 0.92;
}

.aniu-cmt-chip--reply:hover,
.aniu-cmt-chip--reply:focus-visible {
  border-color: var(--aniu-cmt-accent-2);
  color: #ddd0ff;
}

.aniu-cmt-chip--like {
  border-color: color-mix(in srgb, var(--aniu-cmt-muted) 45%, var(--aniu-cmt-border));
  background: color-mix(in srgb, var(--aniu-cmt-muted) 12%, #211d2b);
  color: var(--aniu-cmt-muted);
}

.aniu-cmt-chip--like:hover,
.aniu-cmt-chip--like:focus-visible {
  border-color: color-mix(in srgb, var(--aniu-cmt-text-2) 55%, var(--aniu-cmt-border));
  color: var(--aniu-cmt-text-2);
  background: color-mix(in srgb, var(--aniu-cmt-muted) 18%, #211d2b);
}

.aniu-cmt-chip--like svg {
  fill: none;
  stroke: currentColor;
}

.aniu-cmt-chip--like.is-liked {
  border-color: color-mix(in srgb, #ef4444 55%, transparent);
  background: color-mix(in srgb, #ef4444 18%, #211d2b);
  color: #ef4444;
}

.aniu-cmt-chip--like.is-liked:hover,
.aniu-cmt-chip--like.is-liked:focus-visible {
  border-color: #f87171;
  color: #f87171;
  background: color-mix(in srgb, #ef4444 26%, #211d2b);
}

.aniu-cmt-chip--like.is-liked svg {
  fill: currentColor;
  stroke: none;
}

.aniu-cmt-quote {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 0;
  border-inline-start: 3px solid color-mix(in srgb, var(--aniu-cmt-accent-2) 75%, #c4a8ff);
  background: color-mix(in srgb, #0f0c16 70%, #2a2436);
}

.aniu-cmt-quote--composer {
  margin-bottom: 0.55rem;
}

.aniu-cmt-quote--composer[hidden] {
  display: none;
}

.aniu-cmt-quote-to {
  margin: 0;
  color: #c4a8ff;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.aniu-cmt-quote-text {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0.28rem 0 0;
  color: var(--aniu-cmt-text-2);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.aniu-cmt-quote-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  margin-top: 0.05rem;
  color: color-mix(in srgb, var(--aniu-cmt-accent-2) 70%, #c4a8ff);
}

.aniu-cmt-quote-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aniu-cmt-chip--thread {
  gap: 0.28rem;
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
  justify-content: center;
  border-color: color-mix(in srgb, var(--aniu-cmt-accent-2) 42%, var(--aniu-cmt-border));
  color: #c4a8ff;
}

.aniu-cmt-chip--thread:hover,
.aniu-cmt-chip--thread:focus-visible,
.aniu-cmt-chip--thread[aria-expanded="true"] {
  border-color: var(--aniu-cmt-accent-2);
  color: #ddd0ff;
  background: color-mix(in srgb, var(--aniu-cmt-accent-2) 14%, #211d2b);
}

.aniu-cmt-chip--thread .aniu-cmt-chevron {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aniu-cmt-thread {
  margin-top: 0.85rem;
}

.aniu-cmt-thread-body {
  position: relative;
  margin-top: 0;
  padding-inline-start: 1.5rem;
}

.aniu-cmt-thread-body[hidden] {
  display: none;
}

.aniu-cmt-thread-body::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.35rem;
  top: 0.15rem;
  bottom: 0.35rem;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--aniu-cmt-accent-2) 70%, transparent),
    color-mix(in srgb, var(--aniu-cmt-accent-2) 18%, transparent)
  );
}

.aniu-cmt-replies {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aniu-comments-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 0.85rem;
  border: 1px solid var(--aniu-cmt-border);
  border-radius: 12px;
  background: transparent;
  color: var(--aniu-cmt-text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.aniu-comments-more:hover,
.aniu-comments-more:focus-visible {
  border-color: color-mix(in srgb, var(--aniu-cmt-accent) 45%, var(--aniu-cmt-border));
  color: var(--aniu-cmt-accent);
}

.aniu-comments-more[hidden] {
  display: none;
}

.detail-reply-box {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.detail-reply-box[hidden] {
  display: none;
}

.detail-reply-box textarea {
  width: 100%;
  min-height: 64px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--aniu-cmt-border);
  border-radius: 10px;
  background: #121218;
  color: var(--aniu-cmt-text);
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.detail-reply-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

@media (prefers-reduced-motion: reduce) {
  .aniu-cmt-spoiler-text,
  .aniu-composer-submit,
  .aniu-composer-box {
    transition: none;
  }
}

.detail-episodes-panel .detail-episodes {
  margin-top: 0;
}

.detail-trailer-dialog {
  width: min(920px, calc(100vw - 2rem));
  max-width: 100%;
  padding: 0;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: #0a0a0f;
  overflow: hidden;
}

.detail-trailer-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.detail-trailer-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.detail-trailer-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.detail-trailer-close {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.65rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
}

.detail-trailer-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

@media (max-width: 960px) {
  .detail-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .aniu-comments {
    padding: 1rem;
    border-radius: 14px;
  }

  .aniu-cmt-avatar-wrap,
  .aniu-cmt-avatar {
    width: 46px;
  }

  .aniu-cmt-avatar {
    height: 46px;
  }

  .aniu-cmt-rank {
    width: 44px;
    height: 44px;
  }

  .aniu-cmt-display-name {
    font-size: 0.98rem;
  }

  .aniu-cmt-footer {
    gap: 0.55rem;
  }

  .aniu-cmt-thread-body {
    padding-inline-start: 0.9rem;
  }

  .aniu-cmt-thread-body::before {
    inset-inline-start: 0.15rem;
  }

  .aniu-comments-head {
    flex-direction: column;
    gap: 0.75rem;
  }

  .aniu-composer-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .aniu-composer-submit {
    width: 100%;
  }

  .aniu-composer--guest {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-card {
    padding: 1rem;
  }

  .detail-tabs {
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* ---- Watch guide timeline ---- */
.aniu-watch-guide {
  --wg-series: #4f8cff;
  --wg-movie: #e57373;
  margin: 0 0 2.5rem;
  max-width: 42rem;
}

.aniu-wg-head {
  margin: 0 0 1.25rem;
}

.aniu-wg-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.aniu-wg-title-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.aniu-wg-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 56ch;
}

.aniu-wg-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.aniu-wg-picker-btn {
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.aniu-wg-picker-btn:hover,
.aniu-wg-picker-btn:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary-start) 55%, var(--outline));
}

.aniu-wg-picker-btn.is-active {
  color: var(--text);
  border-color: var(--primary-start);
  background: color-mix(in srgb, var(--primary-start) 12%, transparent);
}

.aniu-wg-guide-intro {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin: 0 0 1.5rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--outline) 85%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.aniu-wg-cover-link {
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.aniu-wg-cover {
  width: 56px;
  height: 78px;
  object-fit: cover;
  display: block;
  background: color-mix(in srgb, var(--outline) 40%, transparent);
}

.aniu-wg-guide-copy {
  min-width: 0;
}

.aniu-wg-guide-name {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.aniu-wg-guide-name a {
  color: inherit;
  text-decoration: none;
}

.aniu-wg-guide-name a:hover,
.aniu-wg-guide-name a:focus-visible {
  color: var(--primary-start);
}

.aniu-wg-guide-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.aniu-wg-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.aniu-wg-step {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.aniu-wg-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 0.35rem 0;
}

.aniu-wg-step-num {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--outline);
}

.aniu-wg-step--series .aniu-wg-step-num {
  border-color: color-mix(in srgb, var(--wg-series) 55%, var(--outline));
  color: color-mix(in srgb, var(--wg-series) 85%, var(--text));
}

.aniu-wg-step--movie .aniu-wg-step-num {
  border-color: color-mix(in srgb, var(--wg-movie) 55%, var(--outline));
  color: color-mix(in srgb, var(--wg-movie) 85%, var(--text));
}

.aniu-wg-connector {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 1.25rem;
  margin-block: 0.35rem 0.15rem;
  color: var(--text-muted);
}

.aniu-wg-connector-line {
  flex: 1 1 auto;
  width: 1px;
  min-height: 0.75rem;
  background: color-mix(in srgb, var(--outline) 90%, transparent);
}

.aniu-wg-connector-arrow {
  flex-shrink: 0;
  margin-block-start: 0.15rem;
  opacity: 0.7;
}

.aniu-wg-card {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  min-height: 6.25rem;
  margin-block-end: 0.85rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--outline) 88%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.aniu-wg-step--series .aniu-wg-card {
  border-inline-start: 3px solid color-mix(in srgb, var(--wg-series) 70%, transparent);
}

.aniu-wg-step--movie .aniu-wg-card {
  border-inline-start: 3px solid color-mix(in srgb, var(--wg-movie) 70%, transparent);
}

.aniu-wg-card:hover,
.aniu-wg-card:focus-visible {
  background: color-mix(in srgb, var(--surface-variant) 35%, var(--surface));
  border-color: color-mix(in srgb, var(--outline) 70%, var(--text-muted));
}

.aniu-wg-step--series .aniu-wg-card:hover,
.aniu-wg-step--series .aniu-wg-card:focus-visible {
  border-color: color-mix(in srgb, var(--wg-series) 35%, var(--outline));
}

.aniu-wg-step--movie .aniu-wg-card:hover,
.aniu-wg-step--movie .aniu-wg-card:focus-visible {
  border-color: color-mix(in srgb, var(--wg-movie) 35%, var(--outline));
}

.aniu-wg-card-thumb,
.aniu-wg-card-thumb img,
.aniu-wg-card-thumb-fallback {
  width: 64px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: color-mix(in srgb, var(--outline) 45%, transparent);
}

.aniu-wg-card-thumb {
  flex-shrink: 0;
  overflow: hidden;
}

.aniu-wg-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.aniu-wg-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

html[lang="fa"] .aniu-wg-kind,
html[dir="rtl"] .aniu-wg-kind {
  letter-spacing: 0;
  text-transform: none;
}

.aniu-wg-kind-icon {
  flex-shrink: 0;
}

.aniu-wg-kind--series {
  color: color-mix(in srgb, var(--wg-series) 92%, var(--text));
  background: color-mix(in srgb, var(--wg-series) 14%, transparent);
}

.aniu-wg-kind--movie {
  color: color-mix(in srgb, var(--wg-movie) 92%, var(--text));
  background: color-mix(in srgb, var(--wg-movie) 14%, transparent);
}

.aniu-wg-card-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
}

.aniu-wg-card-range {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.35;
  color: color-mix(in srgb, var(--wg-series) 78%, var(--text));
}

.aniu-wg-step--movie .aniu-wg-card-range {
  color: color-mix(in srgb, var(--wg-movie) 78%, var(--text));
}

.aniu-wg-card-range-sep {
  opacity: 0.55;
}

.aniu-wg-card-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 899px) {
  .aniu-watch-guide {
    max-width: none;
  }

  .aniu-wg-step {
    grid-template-columns: 1.85rem minmax(0, 1fr);
    gap: 0.55rem;
  }

  .aniu-wg-step-num {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.75rem;
  }

  .aniu-wg-card {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 0.65rem;
    min-height: 0;
    padding: 0.65rem;
    margin-block-end: 0.7rem;
  }

  .aniu-wg-card-thumb,
  .aniu-wg-card-thumb img,
  .aniu-wg-card-thumb-fallback {
    width: 52px;
    height: 74px;
  }

  .aniu-wg-card-title {
    font-size: 0.94rem;
  }

  .aniu-wg-card-range {
    font-size: 0.86rem;
  }

  .aniu-wg-guide-intro {
    padding: 0.65rem;
  }

  .aniu-wg-cover {
    width: 48px;
    height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-genre-chip,
  .detail-trailer-btn,
  .aniu-wg-picker-btn,
  .aniu-wg-card {
    transition: none;
  }
}
