/* Otaku Feed layout. Legacy pages continue to use the shared Prism shell. */
.ys-feed-page .ya-story-card-self .ya-story-footer strong { color: #f9f5ff !important; }

.ys-feed-page .ys-app-stage > #main-content {
  max-width: 1580px !important;
  padding: clamp(24px, 2.4vw, 44px) clamp(24px, 2.7vw, 52px) 48px !important;
}

.ys-feed-page .ya-feed-layout {
  grid-template-columns: minmax(0, 1fr) clamp(280px, 24%, 340px) !important;
  gap: clamp(20px, 2vw, 36px) !important;
  margin: 0;
}

.ys-feed-page .ya-feed-main { gap: 27px; padding: 0 !important; }
.ys-feed-page .ya-feed-sidebar { min-width: 0; gap: 14px !important; position: static !important; }

.ys-feed-hero {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  min-height: 250px;
  min-height: clamp(250px, 20vw, 340px);
  display: grid;
  align-items: center;
  border: 1px solid #474162;
  border-radius: 24px;
  background: radial-gradient(ellipse at 81% 32%, #674399 0, #2d214d 45%, transparent 76%),
              linear-gradient(125deg, #15152c 12%, #211737 64%, #282045);
  color: #f9f5ff;
  box-shadow: 0 16px 38px #0506133b;
}

.ys-feed-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #14142a 4%, #14142af5 30%, #16152c83 51%, #16152c00 79%),
              linear-gradient(0deg, #14142aa8, transparent 34%);
}

.ys-feed-hero-art {
  position: absolute;
  z-index: -2;
  inset: -15% -3% -18% 44%;
  display: flex;
  gap: clamp(8px, 1.1vw, 16px);
  align-items: center;
  transform: rotate(-13deg) scale(1.09);
  pointer-events: none;
}

.ys-feed-hero-art img {
  min-width: 0;
  width: 33.333%;
  height: 87%;
  object-fit: cover;
  border: 1px solid #ffffff3d;
  border-radius: 17px;
  opacity: .88;
  box-shadow: 0 12px 30px #0f09286b;
}
.ys-feed-hero-art img:first-child { transform: translateY(18%); }
.ys-feed-hero-art img:last-child { transform: translateY(-18%); }

.ys-feed-hero-copy { padding: clamp(24px, 3vw, 48px); position: relative; }
.ys-feed-page .ys-feed-hero h1 {
  margin: 0 0 10px;
  max-width: 14ch;
  font-size: clamp(2.5rem, 4.1vw, 4.65rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.065em;
  color: #fff;
}
.ys-feed-hero p { color: #dfd6ee; max-width: 30ch; margin: 0 0 23px; font-size: 1.02rem; line-height: 1.5; }
.ys-feed-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ys-feed-hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1px solid #ffffff2b;
  font-size: .875rem;
  font-weight: 750;
  text-decoration: none;
}
.ys-feed-hero-actions svg,
.ys-feed-section-head svg,
.ys-widget-icon svg,
.ys-feed-page .ya-feed-tabs svg,
.ys-feed-page .ya-sidebar-more svg { width: 17px; height: 17px; flex: 0 0 auto; vertical-align: middle; }
.ys-feed-page :is(.ys-feed-section-head, .ys-widget-icon, .ya-sidebar-more) svg.yf-icon {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ys-ui-link) !important;
  box-shadow: none !important;
}
.ys-feed-primary { background: #e8dcff; color: #23173d !important; }
.ys-feed-primary:hover { background: #fff; }
.ys-feed-secondary { background: #18162fbe; color: #fff !important; }
.ys-feed-secondary:hover { background: #3c305c; }

.ys-feed-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
}
.ys-feed-page .ys-feed-section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ys-ui-text);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.2;
}
.ys-feed-section-head svg { color: var(--ys-ui-link); stroke: var(--ys-ui-link); }
.ys-feed-text-link { color: var(--ys-ui-link) !important; font-size: .875rem; font-weight: 700; text-decoration: none; }
.ys-feed-text-link:hover, .ys-feed-page .ya-sidebar-more:hover { text-decoration: underline; }

.ys-feed-page .ya-stories-carousel {
  margin: 0;
  padding: 3px 4px 7px;
  scrollbar-color: var(--ys-ui-border) transparent;
  scroll-snap-type: x proximity;
}
.ys-feed-page .ya-stories-track { gap: 11px; }
.ys-feed-page .ya-story-card {
  flex: 0 0 clamp(114px, 10.1vw, 150px);
  box-sizing: border-box;
  min-width: 0;
  height: clamp(160px, 12.4vw, 204px);
  padding: 11px;
  border-radius: 15px !important;
  scroll-snap-align: start;
}
.ys-feed-page .ya-story-overlay {
  background: linear-gradient(180deg, #0b0b250c 25%, #0c0d19be 71%, #0a0b15 100%) !important;
}
.ys-feed-page .ya-story-footer strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: .875rem;
  letter-spacing: -.01em;
}
.ys-feed-page .ya-story-tag { color: #cfd3ed; font-size: .7rem; font-weight: 650; }
.ys-feed-page .ya-story-badge-ring { border-radius: 8px !important; font-size: .75rem !important; }
.ys-feed-page .ya-story-card-self {
  flex: 0 0 clamp(114px, 10.1vw, 150px) !important;
  height: clamp(160px, 12.4vw, 204px) !important;
  align-items: center;
  justify-content: center !important;
  gap: 12px;
  text-align: center;
  background: radial-gradient(ellipse at top, #473666, #211933 78%) !important;
  border-color: #675382 !important;
}
.ys-story-create-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid #bca3f27d;
  border-radius: 14px;
  color: #ecddff;
  background: #ffffff19;
}
.ys-story-create-icon svg { width: 20px; height: 20px; }

.ys-feed-page .ya-feed-tabs {
  gap: 7px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1px solid var(--ys-ui-border);
  border-radius: 14px;
  background: var(--ys-ui-panel);
}
html body.ys-feed-page .ya-feed-tabs a {
  min-height: 38px;
  gap: 7px;
  padding: 7px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--ys-ui-text) !important;
  box-shadow: none !important;
}
html body.ys-feed-page .ya-feed-tabs a:hover { background: var(--ys-ui-raised) !important; }
html body.ys-feed-page .ya-feed-tabs a.is-active {
  background: color-mix(in srgb, var(--ys-ui-accent) 17%, var(--ys-ui-panel)) !important;
  border-color: color-mix(in srgb, var(--ys-ui-accent) 37%, var(--ys-ui-border)) !important;
  color: var(--ys-ui-link) !important;
}

.ys-feed-page .nx-card.ya-composer-guest,
.ys-feed-page .nx-card.ya-composer-card,
.ys-feed-page .nx-card.ya-sidebar-card,
.ys-feed-page article.ya-post-card {
  border: 1px solid var(--ys-ui-border) !important;
  border-radius: 17px !important;
  background: var(--ys-ui-panel) !important;
  color: var(--ys-ui-text) !important;
  box-shadow: 0 8px 22px #080b1612 !important;
}
.ys-feed-page .ya-composer-card,
.ys-feed-page .ya-composer-guest { margin: 0 0 14px !important; scroll-margin-top: calc(var(--ys-topbar-h) + 18px); }
.ys-feed-page .ya-composer-guest { padding: 15px 19px !important; }
.ys-feed-page .ya-composer-guest p { margin: 0; color: var(--ys-ui-muted); font-size: .94rem; line-height: 1.5; }
.ys-feed-page .ya-composer-guest a,
.ys-feed-page .ya-post-ctx a { color: var(--ys-ui-link) !important; }
.ys-feed-page .ya-posts-stream { gap: 14px; }
.ys-feed-page article.ya-post-card { padding: clamp(14px, 1.6vw, 22px) !important; }
.ys-feed-page .ya-post-header { padding: 0 !important; margin: 0 0 12px !important; }
.ys-feed-page .ya-post-body { font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.ys-feed-page .ya-post-author .artist-monogram,
.ys-feed-page .ya-post-author img { border-radius: 13px !important; }
.ys-feed-page .ya-post-actions-bar { border-bottom: 0; padding-bottom: 0; }
.ys-feed-page .ya-post-time { color: var(--ys-ui-muted); opacity: 1; }

.ys-feed-page .nx-card.ya-sidebar-card { padding: 17px !important; margin: 0 !important; }
.ys-feed-page .ya-sidebar-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 13px;
  font-size: .98rem;
  line-height: 1.25;
}
.ys-feed-page .ya-card-header-flex { gap: 9px; margin-bottom: 13px; }
.ys-feed-page .ya-card-header-flex h3 { margin: 0; }
.ys-feed-page .ys-widget-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--ys-ui-link);
  background: color-mix(in srgb, var(--ys-ui-accent) 15%, var(--ys-ui-panel));
}
.ys-feed-page .ya-card-sublink,
.ys-feed-page .ya-sidebar-more { color: var(--ys-ui-link) !important; font-size: .85rem; text-decoration: none; }
.ys-feed-page .ya-sidebar-more { display: inline-flex; gap: 7px; align-items: center; margin-top: 10px; }
.ys-feed-page .ya-sidebar-list { gap: 6px; margin: 0; }
.ys-feed-page .ya-sidebar-list li a { min-width: 0; }
.ys-feed-page .ya-sidebar-list li a > div { min-width: 0; }
.ys-feed-page .ya-airing-timer-item a { width: 100%; border-color: var(--ys-ui-border); background: var(--ys-ui-raised); }
.ys-feed-page .ya-airing-info { flex: 1; justify-content: space-between; min-width: 0; gap: 6px; }
.ys-feed-page .ya-airing-info strong { color: var(--ys-ui-text); }
.ys-feed-page .ya-airing-clock {
  font-family: inherit;
  font-size: .75rem;
  color: var(--ys-ui-link);
  background: color-mix(in srgb, var(--ys-ui-accent) 9%, var(--ys-ui-panel));
  border-color: var(--ys-ui-border);
}
.ys-feed-page .ya-quick-arcade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.ys-feed-page .ya-qa-btn { min-height: 43px; border-radius: 10px; font-size: .82rem; background: var(--ys-ui-raised) !important; color: var(--ys-ui-text) !important; }
.ys-feed-page .ya-qotd-text { font-size: 1rem; line-height: 1.55; color: var(--ys-ui-text); }
.ys-feed-page .ya-qotd-by { color: var(--ys-ui-muted); }

.ys-feed-page :is(.ys-feed-hero, .ys-feed-shelf, .ya-feed-layout, .ys-left-rail) a:focus-visible {
  outline: 2px solid var(--ys-ui-link);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .ys-feed-page .ys-app-stage > #main-content { padding: 16px 16px 88px !important; }
  .ys-feed-page .ya-feed-layout { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 600px) {
  .ys-feed-page .ys-app-stage > #main-content { padding-inline: 12px !important; }
  .ys-feed-hero { min-height: 220px; border-radius: 18px; }
  .ys-feed-hero-copy { padding: 21px 17px; }
  .ys-feed-hero::after { background: linear-gradient(90deg, #14142af7 8%, #17142bd1 48%, #251f43a3 100%); }
  .ys-feed-hero-art { inset-inline-start: 39%; }
  .ys-feed-hero p { max-width: 25ch; font-size: .95rem; }
  .ys-feed-hero-actions { gap: 7px; }
  .ys-feed-hero-actions a { padding-inline: 10px; }
  .ys-feed-page .ya-action-btn { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .ys-feed-page .ya-story-card,
  .ys-feed-page .ya-story-poster { transition: none !important; }
}

.ys-feed-page .ys-feed-hero {
  min-height: clamp(210px, 17.8vw, 284px);
}
.ys-feed-page .ys-feed-hero p { max-width: 33ch; }
.ys-feed-page #ys-broadcast-title { scroll-margin-top: calc(var(--ys-topbar-h) + 18px); }
.ys-feed-page .ya-post-actions-bar { flex-wrap: wrap; }
@media (max-width: 600px) {
  .ys-feed-page .ys-feed-hero p { max-width: 25ch; }
}
