.feedscreen {
  position: relative;
  height: 100%;
  background: black;
  overflow: hidden;
}

.feedscroll {
  scroll-snap-type: y mandatory; overflow-y: scroll;
  height: 100%;
  scrollbar-width: none; -ms-overflow-style: none;
}

.feedscroll::-webkit-scrollbar {
  display: none;
}

.feeditem {
  scroll-snap-align: start;
  height: 100%;
  position: relative;
  background: black;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.feedmediawrap {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
}

.feedmedia {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transition: filter 0.2s;
}

.mediablurred .feedmedia {
  filter: blur(28px);
}
.mediablurred:hover .feedmedia,
.mediablurred:focus-within .feedmedia {
  filter: none;
}

.feedgradienttop {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}

.feedgradientbottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 14rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.3) 50%, transparent);
  pointer-events: none;
}

/*//////////////////////////////////////////////////////////////////////*/

.feedtopnav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: 0.875rem 1rem;
  pointer-events: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}

.feedtopnav .iconbtn,
.feedtopnav .feedtabs {
  pointer-events: auto;
}

.feedtopnav > .iconbtn:first-child {
  grid-column: 1; justify-self: start;
}
.feedtopnav > .iconbtn:last-child {
  grid-column: 3; justify-self: end;
}

.feedtabs {
  grid-column: 2; display: flex; gap: 1.25rem; justify-content: center;
}

.feedtab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem; font-weight: 600;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.15s;
}

.feedtab.active {
  color: white;
}

.feedtab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 1.25rem; height: 2px;
  background: white;
  border-radius: 1px;
}

.iconbtn {
  width: 2.5rem; height: 2.5rem;
  border-radius: 999px;
  background: rgba(4, 4, 4, 0.7);
  border: none;
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}

.iconbtn:hover {
  background: rgba(4, 4, 4, 0.9);
}
/*//////////////////////////////////////////////////////////////////////*/

.postactions {
  position: absolute;
  right: 0.625rem; bottom: calc(var(--bottomnavh) + 1.5rem);
  display: flex; flex-direction: column; gap: 1rem; align-items: center;
  z-index: 10;
}

.actionbtn {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  background: none;
  border: none;
  color: white;
}

.actioncircle {
  width: 2.875rem; height: 2.875rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.actioncircle.liked {
  background: var(--primary); color: white;
  border-color: var(--primary);
}

.actioncircle.bookmarked {
  background: var(--accent); color: #0a0a0a;
  border-color: var(--accent);
}

.actioncircle.liked .ms,
.actioncircle.bookmarked .ms {
  font-variation-settings: 'FILL' 1;
}

.actionlabel {
  font-size: 0.625rem; font-weight: 700;
  color: white; background: rgba(0,0,0,0.5);
  padding: 0.0625rem 0.375rem;
  border-radius: 999px;
  line-height: 1.3;
}

/*//////////////////////////////////////////////////////////////////////*/

/* Staircase: every row hugs its own content width so the dark overlays
   only cover what they need to, leaving as much of the image visible as
   possible. Lines stack vertically via `display: block` on the wrappers
   plus `display: inline-flex` on the chip itself. */
.postinfo {
  position: absolute;
  bottom: calc(var(--bottomnavh) + 1rem); left: 1rem; right: 5rem;
  z-index: 10;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem;
}

.postuploader {
  display: inline-flex;
  max-width: 100%;
  font-size: 0.95rem; font-weight: 700;
  color: white;
  padding: 0.125rem 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0.375rem;
}
.postuploadername {
  cursor: pointer;
  color: var(--primary);
}
.postuploadername:hover {
  color: var(--primarypale);
  text-decoration: underline;
}
.postuploadersep {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.postdesc {
  display: -webkit-box;
  max-width: 100%; color: white;
  font-size: 0.8rem; line-height: 1.4;
  cursor: pointer; padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0.375rem;
  -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.posttags {
  display: flex; flex-wrap: wrap; gap: 0.375rem;
  max-width: 100%;
}

/*//////////////////////////////////////////////////////////////////////*/

.posttag {
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(4, 4, 4, 0.75); color: var(--taggeneral);
  font-size: 0.625rem; font-weight: 600;
  border: none;
  transition: filter 0.15s;
}
.posttag.tagartist {color: var(--tagartist)}
.posttag.tagcharacter {color: var(--tagcharacter)}
.posttag.tagcopyright {color: var(--tagcopyright)}
.posttag.tagspecies {color: var(--tagspecies)}
.posttag.taggeneral {color: var(--taggeneral)}
.posttag.tagmeta {color: var(--tagmeta)}
.posttag.taglore {color: var(--taglore)}
.posttagmore {color: rgba(255, 255, 255, 0.85)}
.posttag:hover {filter: brightness(1.25)}

.playpulse {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  animation: playpulse 0.6s ease-out;
}

.playpulse .playcircle {
  width: 4rem; height: 4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  color: white;
}

@keyframes playpulse {
  from {opacity: 1; transform: scale(0.5)}
  to   {opacity: 0; transform: scale(1.2)}
}

.feedloader {
  height: 5rem;
  display: flex; align-items: center; justify-content: center;
}

.feedempty {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  flex-direction: column; gap: 0.75rem;
  text-align: center;
}

.feedempty p {
  color: var(--mutedfg);
  margin: 0;
}

.feedempty .link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.875rem;
}

.bottomnav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--bottomnavh);
  background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 0.5rem;
  z-index: 30;
}

.bnitem {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; gap: 0.125rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  height: 100%;
  padding: 0;
  transition: color 0.15s;
}

.bnitem.active {color: white}
.bnitem:hover {color: rgba(255, 255, 255, 0.85)}

.bnicon {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  width: 22px; height: 22px;
  line-height: 22px;
}
.bnlabel {font-size: 0.625rem; font-weight: 600}

.feedend {
  background: var(--bg);
  scroll-snap-align: start;
  height: 100%; padding: 2rem;
  display: flex; align-items: center; 
  justify-content: center;
}

.feedendinner {
  display: flex; flex-direction: column; 
  align-items: center; gap: 0.75rem;
  max-width: 22rem;
  text-align: center;
}

.feedendicon {
  width: 4rem; height: 4rem;
  border-radius: 999px;
  background: var(--primarysoft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.5rem;
}

.feedendtitle {
  font-size: 1.25rem; font-weight: 700;
  margin: 0;
}

.feedendmsg {
  color: var(--mutedfg);
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
