body.kanews-reels-page {
  overflow: hidden;
  height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
  max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
  background: #000;
  padding-bottom: 0 !important;
  --kan-tab-bar-h: 0px;
}

body.kanews-reels-page #kanews-tab-bar,
body.kanews-reels-page #header-stream,
body.kanews-reels-page .kanews-banner-header-below,
body.kanews-reels-page .screen-stream,
body.kanews-reels-page .screen-cover,
body.kanews-reels-page .kanews-banner-left-side,
body.kanews-reels-page .kanews-banner-right-side,
body.kanews-reels-page .kanews-floating-audio,
body.kanews-reels-page .site-head,
body.kanews-reels-page #header,
body.kanews-reels-page #footer,
body.kanews-reels-page .site-footer {
  display: none !important;
}

body.kanews-reels-page .site-wrapper,
.kanews-reels-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body.kanews-reels-page .site-wrapper {
  max-height: 100%;
}

body.kanews-reels-page .kanews-reels-main {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  position: relative;
  z-index: 1;
}

.kanews-reels-shell {
  position: relative;
  width: 100%;
}

.kanews-reels__backdrop {
  display: none;
}

.kanews-reels {
  flex: 1 1 0%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none;
}

.kanews-reels:focus {
  outline: none;
}

.kanews-reels::-webkit-scrollbar {
  display: none;
}

.kanews-reels__item {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0 8px 12px;
  box-sizing: border-box;
  overflow: hidden;
  background: #000;
  position: relative;
  container-type: size;
}

.kanews-reels__card {
  position: relative;
  width: min(420px, 100%);
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  background: #111;
  border-radius: 16px;
}

.kanews-reels__media,
.kanews-reels__overlay,
.kanews-reels__hit {
  position: absolute;
  inset: 0;
}

.kanews-reels__media img,
.kanews-reels__media video,
.kanews-reels__media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kanews-reels__media iframe {
  border: 0;
  pointer-events: none;
}

.kanews-reels__overlay,
.kanews-reels__hit {
  z-index: 2;
}

.kanews-reels__overlay {
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.7) 22%, rgba(0, 0, 0, 0.38) 42%, rgba(0, 0, 0, 0.12) 58%, rgba(0, 0, 0, 0) 72%);
}

.kanews-reels__top {
  position: relative;
  flex: 0 0 auto;
  width: min(420px, calc(100% - 16px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 4px 8px;
  z-index: 5;
}

.kanews-reels__logo {
  display: flex;
  align-items: center;
  max-width: min(58%, 180px);
  min-width: 0;
  color: #fff;
  text-decoration: none;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.55));
}

.kanews-reels__logo img {
  display: block;
  max-width: 100%;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.kanews-reels__logo span {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanews-reels__icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
}

.kanews-reels__icon-btn > svg {
  width: 22px;
  height: 22px;
}

.kanews-reels__icon-mute {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 0;
}

.kanews-reels__icon-mute-speaker {
  width: 14px;
  height: 22px;
}

.kanews-reels__icon-mute-x {
  width: 10px;
  height: 10px;
  margin-top: 1px;
}

.kanews-reels__icon-btn .kanews-reels__icon-volume,
.kanews-reels-shell.is-unmuted .kanews-reels__icon-mute {
  display: none;
}

.kanews-reels-shell.is-unmuted .kanews-reels__icon-volume {
  display: block;
}

.kanews-reels__mute {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
}

.kanews-reels__rail {
  position: absolute;
  right: 8px;
  bottom: 72px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.kanews-reels__avatar {
  position: relative;
  width: 40px;
  height: 40px;
  padding-bottom: 10px;
  box-sizing: content-box;
}

.kanews-reels__avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  display: block;
}

.kanews-reels__avatar .kanews-reels__follow {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--kan-theme-color, #ff3040);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanews-reels__follow:not(.category-subscribed)::before {
  content: "+";
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.kanews-reels__follow .check,
.kanews-reels__follow svg,
.kanews-reels__follow .kanews-loader-slot {
  display: none;
}

.kanews-reels__follow.category-subscribed::before {
  content: none;
}

.kanews-reels__follow.category-subscribed .check {
  display: block;
  width: 10px;
  height: 6px;
  border: 0;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  margin-top: -2px;
}

.kanews-reels__action,
.kanews-reels__rail .kanews-like-wrapper,
.kanews-reels__rail .kanews-like-button,
.kanews-reels__rail .kanews-add-bookmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
}

.kanews-reels__action svg,
.kanews-reels__rail .kanews-like-button svg,
.kanews-reels__rail .kanews-add-bookmark svg {
  width: 24px;
  height: 24px;
}

.kanews-reels__rail .kanews-label {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  gap: 4px;
}

.kanews-reels__rail .kanews-label:hover,
.kanews-reels__rail .kanews-like-button:hover,
.kanews-reels__rail .kanews-add-bookmark:hover {
  background: transparent;
  border-color: transparent;
  color: #fff;
}

.kanews-reels__rail .kanews-like-button.liked,
.kanews-reels__rail .kanews-like-button.liked:hover {
  background: transparent;
  border: 0;
  color: #ff3040;
}

.kanews-reels__meta {
  position: absolute;
  left: 14px;
  right: 72px;
  bottom: 44px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.kanews-reels__meta a {
  pointer-events: auto;
}

.kanews-reels__place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.kanews-reels__place svg {
  width: 14px;
  height: 14px;
  color: #2ecc71;
  flex: 0 0 auto;
}

.kanews-reels__place span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanews-reels__byline,
.kanews-reels__title {
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.kanews-reels__title {
  line-height: 1.35;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanews-reels__sound {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: 18px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  line-height: 18px;
}

.kanews-reels__sound svg {
  flex: 0 0 auto;
}

.kanews-reels__sound-track {
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
  mask-image: linear-gradient(90deg, #000 70%, transparent);
}

.kanews-reels__sound-track span {
  display: inline-block;
  white-space: nowrap;
  animation: kanews-reels-marquee 14s linear infinite;
}

.kanews-reels-page a.kanews-btn.kanews-reels__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  line-height: 28px;
  padding: 0 14px;
  margin: 2px 0 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  white-space: nowrap;
  text-shadow: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

@keyframes kanews-reels-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.kanews-reels__progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.kanews-reels__tts {
  display: none;
}

.kanews-reels__progress i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--kan-theme-color, #ff3040);
  transform: scaleX(0);
  transform-origin: left center;
}

.kanews-reels-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 24px;
  text-align: center;
}

.kanews-reels-empty p {
  margin: 0;
  font-size: 16px;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .kanews-reels,
  .kanews-reels__item {
    background: transparent;
  }

  .kanews-reels__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #000;
  }

  .kanews-reels__backdrop img,
  .kanews-reels__backdrop video {
    position: absolute;
    inset: -48px;
    width: calc(100% + 96px);
    height: calc(100% + 96px);
    object-fit: cover;
    filter: blur(42px);
  }

  .kanews-reels__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
  }

  .kanews-reels {
    position: relative;
    z-index: 1;
  }

  .kanews-reels__item {
    align-items: center;
  }

  .kanews-reels__top {
    width: min(420px, 92vw);
  }

  .kanews-reels__card {
    width: min(420px, 92vw, 100cqi, calc(100cqh * 9 / 16));
    height: auto;
    aspect-ratio: 9 / 16;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  }
}
