html, body {
  margin: 0;
  background: #e5ebef;
  color: #000;
  overscroll-behavior: none;
  touch-action: manipulation;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  html, body {
    background: #111;
    color: #fff;
  }
}

#feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 0 calc(48px + var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px));
}

#status {
  margin: 24px 16px;
  text-align: center;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #000;
  opacity: 1;
  transition: opacity 0.2s ease;
}

#boot img {
  display: block;
  width: clamp(240px, 76vw, 380px);
  height: auto;
  max-width: 90vw;
}

#boot.is-done {
  opacity: 0;
  pointer-events: none;
}

.post {
  position: relative;
  display: block;
  width: 100%;
}

.post-widget {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.post.is-pending {
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.post-frame {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  border: 0;
  display: block;
  height: 0;
}

#modes {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: calc(var(--tg-safe-area-inset-top, 0px) + 16px) 0 8px;
  background: inherit;
}

#modes button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  opacity: 0.55;
  padding: 4px 10px;
}

#modes button.is-on {
  opacity: 1;
  font-weight: 600;
}

body.mode-reels {
  height: 100dvh;
  overflow: hidden;
  background: #000;
  color: #fff;
}



@media (min-width: 800px) {
  #feed {
    width: min(860px, 100%);
    margin: 0 auto;
  }
}

body.mode-reels #modes {
  background: transparent;
}

body.mode-reels.is-reel-sheet #modes {
  visibility: hidden;
  pointer-events: none;
}

body.mode-reels #modes button {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

#feed {
  --reel-open-height: 40px;
  --reel-open-bottom: var(--tg-safe-area-inset-bottom, 0px);
  --reel-bar: calc(var(--reel-open-height) + var(--reel-open-bottom) + 10px);
  display: block;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
  gap: 0;
  padding: 0;
  background: #000;
  overscroll-behavior: contain;
}

#feed::-webkit-scrollbar,
.reel-sheet::-webkit-scrollbar {
  display: none;
}

#feed.is-locked {
  overflow: hidden;
  touch-action: none;
}

.reel {
  position: relative;
  width: 100%;
  background: #000;
}

/* Layers are established before publication, never promoted/demoted on focus. */
.reel-loading-placeholder { transform:translateZ(0); }
/* Keep the complete information layer painted together above native video. */
.reel-ui { position: absolute; inset: 0; z-index: 6; pointer-events: none; transform: translateZ(0); }
.reel-ui .reel-rail, .reel-ui .reel-open { pointer-events: auto; }

.reel.is-pending {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.reel-ui::before,
.reel-ui::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}

.reel-ui::before {
  top: 0;
  height: 120px;
  background: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0));
}

.reel-ui::after {
  bottom: var(--reel-bar);
  height: 120px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.35));
}

.reel.is-caption .reel-ui::before,
.reel.is-caption .reel-ui::after {
  display: none;
}

.reel.is-shown {
  flex: 0 0 100dvh;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.reel-stage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--reel-bar);
  width: auto;
  height: auto;
  background: #000;
  overflow: hidden;
  border-radius: 0.01px;
  transform: none;
  -webkit-transform: none;
  touch-action: pan-y;
  /* Sheet/zoom gestures own their animations. A normal media/layout update
     must not introduce another 360ms motion after native paging settles. */
  transition: none;
}

.reel.is-caption .reel-stage {
  z-index: 5;
  touch-action: none;
}

.reel-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  background: #000;
  display: block;
}

.reel-controls {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  transform: translateZ(0);
}
.reel-controls .reel-sound { pointer-events: auto; }

.reel-play {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 0;
  background: rgba(45, 45, 45, 0.88);
  box-shadow: none;
  z-index: 3;
  pointer-events: none;
  align-items: center;
  justify-content: center;
}

.reel-play svg {
  display: block;
  width: 16px;
  height: 19px;
  margin-left: 2px;
  filter: none;
}

.reel.is-paused .reel-play {
  display: flex;
}

.reel-buffer {
  display: none;
  position: absolute;
  left: 50%;
  top: var(--reel-media-mid, 50%);
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  margin: -18px 0 0 -18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  z-index: 6;
  pointer-events: none;
  animation: reel-spin 0.8s linear infinite;
}

.reel.is-buffering:not(.is-paused) .reel-buffer {
  display: block;
}
.reel.is-caption .reel-buffer { top: var(--reel-caption-media-mid, 50%); }
.reel:is(.is-dragging, .is-sheet-moving, .is-sheet-closing) .reel-buffer { visibility: hidden; }

@keyframes reel-spin {
  to { transform: rotate(360deg); }
}

.reel.is-caption .reel-play,
.reel.is-sheet-closing .reel-play {
  display: none;
}

.reel-sound {
  display: none;
  position: absolute;
  z-index: 4;
  width: 32.4px;
  height: 32.4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  left: 50%;
  top: calc(50% - 70px);
  margin-left: -16.2px;
}

.reel-sound svg {
  display: block;
}

.reel.is-muted .reel-sound-on,
.reel:not(.is-muted) .reel-sound-off {
  display: none;
}

.reel.is-paused .reel-sound,
.reel.is-caption .reel-sound {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel.is-paused .reel-sound {
  background: rgba(45, 45, 45, 0.8);
}

.reel.is-caption .reel-sound {
  top: auto;
  left: auto;
  right: 8px;
  bottom: 8px;
  margin: 0;
  width: 25px;
  height: 25px;
  background: rgba(0, 0, 0, 0.82);
}

.reel.is-caption .reel-sound svg,
.reel-overlay-sound svg {
  width: 18px;
  height: 18px;
}

.reel.is-caption .reel-sound::before,
.reel-overlay-sound::before {
  content: "";
  position: absolute;
  inset: -9px;
}

.reel.is-caption .reel-sound,
.reel.is-caption .reel-stage > .reel-nosound {
  animation: reel-sound-reveal 0.12s ease-out 0.36s both;
}

@keyframes reel-sound-reveal {
  from { opacity: 0; visibility: hidden; }
  to { opacity: 1; visibility: visible; }
}

.reel.is-sheet-closing .reel-sound,
.reel.is-sheet-closing .reel-nosound {
  visibility: hidden;
}

.reel-nosound {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 16px);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.reel.is-silent .reel-nosound {
  display: flex;
}

.reel-stage > .reel-nosound {
  left: 10px;
  bottom: 10px;
  z-index: 4;
}

.reel.is-silent .reel-sound {
  display: none;
}

.reel-seek {
  --seek-below: 10px;
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--reel-bar) - var(--seek-below));
  z-index: 5;
  height: 44px;
  padding: 0;
  touch-action: none;
}

.reel.is-caption .reel-seek {
  display: none;
}

.reel.is-seeking .reel-meta {
  opacity: 0;
}

.reel-seek-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--seek-below);
  height: 2px;
  border-radius: 2px;
  background: #2c3036;
  overflow: hidden;
  transition: height 0.14s ease, background 0.14s ease;
}

.reel.is-seeking .reel-seek-track {
  height: 8px;
  background: #2c3036;
}

.reel-seek-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: #fff;
}

.reel-seek-knob {
  position: absolute;
  bottom: var(--seek-below);
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  transform: scale(0);
  transition: transform 0.14s ease;
  pointer-events: none;
}

.reel.is-seeking .reel-seek-knob {
  transform: scale(1);
}

.reel-seek-frame {
  display: none;
  position: absolute;
  bottom: calc(var(--seek-below) + 52px);
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  background: #000;
  pointer-events: none;
}

.reel.is-seeking .reel-seek-frame.is-on {
  display: block;
}

.reel-seek-time {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--seek-below) + 22px);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.reel.is-seeking .reel-seek-time {
  display: block;
}

.reel-rate {
  display: none;
  position: absolute;
  left: auto;
  right: 28px;
  top: 22%;
  z-index: 4;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-align: right;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.reel.is-fast .reel-rate {
  display: block;
}

.reel-rail {
  position: absolute;
  right: 12px;
  bottom: calc(var(--reel-bar) + 120px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0;
  background: transparent;
}

.reel-like {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reel-like-count {
  margin-top: 2px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.reel.is-caption .reel-rail {
  opacity: 0;
  pointer-events: none;
}

.reel-react,
.reel-share {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.reel-glyph {
  display: block;
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.65));
}

.reel-emoji {
  width: 36px;
  height: 36px;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.reel-react[data-kind="1"] .reel-emoji {
  width: 40.5px;
  height: 40.5px;
}

.reel-share .reel-emoji {
  width: 42px;
  height: 42px;
}

.reel-react[data-kind="1"].is-on {
  color: #ff405c;
}

.reel-react .reel-icon-outline {
  fill: transparent;
}

.reel-react[data-kind="1"].is-on .reel-icon-outline {
  fill: currentColor;
}

.reel-react .reel-glyph {
  position: relative;
}

/* Inline frame 0 of custom emoji 5458772252029887718, available before Lottie loads. */
.reel-react[data-kind="-1"] .reel-glyph::after {
  content: "";
  position: absolute;
  inset: 0;
  visibility: hidden;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20height%3D%22512%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%3E%3Cdefs%3E%3CclipPath%20id%3D%22__lottie_element_2%22%3E%3Crect%20width%3D%22512%22%20height%3D%22512%22%20x%3D%220%22%20y%3D%220%22%3E%3C%2Frect%3E%3C%2FclipPath%3E%3Cg%20id%3D%22__lottie_element_6%22%3E%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C256%2C256)%22%20opacity%3D%221%22%3E%3Cg%20opacity%3D%221%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20fill%3D%22rgb(0%2C0%2C0)%22%20fill-opacity%3D%221%22%20d%3D%22%20M-230.232%2C216.468%20C-230.232%2C216.468%20-140.622%2C216.968%20-140.622%2C216.968%20C-140.622%2C216.968%20-140.622%2C150.845%20-140.622%2C150.845%20C-140.622%2C150.845%20-81.918%2C216.734%20-81.918%2C216.734%20C-81.918%2C216.734%20-0.89%2C217.984%20-0.89%2C217.984%20C-0.89%2C217.984%20-4.605%2C148.996%20-4.462%2C114.502%20C-4.318%2C79.591%20-0.029%2C9.767%20-0.029%2C9.767%20C-0.029%2C9.767%20-95.889%2C10.534%20-95.889%2C10.534%20C-95.889%2C10.534%20-95.249%2C78.156%20-95.249%2C78.156%20C-95.249%2C78.156%20-155.203%2C11.267%20-155.203%2C11.267%20C-155.203%2C11.267%20-229.482%2C11.284%20-229.482%2C11.284%20C-229.482%2C11.284%20-230.232%2C216.468%20-230.232%2C216.468z%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3CclipPath%20id%3D%22__lottie_element_10%22%3E%3Cpath%20d%3D%22M0%2C0%20L512%2C0%20L512%2C512%20L0%2C512z%22%3E%3C%2Fpath%3E%3C%2FclipPath%3E%3Cfilter%20id%3D%22__lottie_element_23%22%20filterUnits%3D%22objectBoundingBox%22%20x%3D%220%25%22%20y%3D%220%25%22%20width%3D%22100%25%22%20height%3D%22100%25%22%3E%3CfeComponentTransfer%20in%3D%22SourceGraphic%22%3E%3CfeFuncA%20type%3D%22table%22%20tableValues%3D%221%200%22%3E%3C%2FfeFuncA%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Cmask%20id%3D%22__lottie_element_6_2%22%20mask-type%3D%22alpha%22%3E%3Cg%20filter%3D%22url(%23__lottie_element_23)%22%3E%3Crect%20width%3D%22512%22%20height%3D%22512%22%20x%3D%220%22%20y%3D%220%22%20fill%3D%22%23ffffff%22%20opacity%3D%220%22%3E%3C%2Frect%3E%3Cuse%20xlink%3Ahref%3D%22%23__lottie_element_6%22%3E%3C%2Fuse%3E%3C%2Fg%3E%3C%2Fmask%3E%3C%2Fdefs%3E%3Cg%20clip-path%3D%22url(%23__lottie_element_2)%22%3E%3Cg%20mask%3D%22url(%23__lottie_element_6_2)%22%3E%3Cg%20clip-path%3D%22url(%23__lottie_element_10)%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%20opacity%3D%221%22%3E%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C256%2C256)%22%20opacity%3D%221%22%3E%3Cg%20opacity%3D%221%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20fill-opacity%3D%220%22%20stroke%3D%22rgb(0%2C0%2C0)%22%20stroke-opacity%3D%221%22%20stroke-width%3D%2225.001%22%20d%3D%22%20M-187.9%2C-4.483%20C-185.455%2C-106.144%20-102.279%2C-187.804%20-0.029%2C-187.804%20C-0.029%2C-187.804%20-0.029%2C-187.804%20-0.029%2C-187.804%20C103.76%2C-187.804%20187.898%2C-103.667%20187.898%2C0.122%20C187.898%2C3.647%20187.801%2C7.15%20187.609%2C10.627%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C256%2C248)%22%20opacity%3D%221%22%3E%3Cg%20opacity%3D%221%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20stroke-linecap%3D%22butt%22%20stroke-linejoin%3D%22miter%22%20fill-opacity%3D%220%22%20stroke-miterlimit%3D%2221.23%22%20stroke%3D%22rgb(0%2C0%2C0)%22%20stroke-opacity%3D%221%22%20stroke-width%3D%2228.021%22%20d%3D%22%20M-63.495%2C-93.478%20C-63.495%2C-93.478%200.74%2C-59.528%200.74%2C-59.528%20C0.74%2C-59.528%2066.306%2C-92.261%2066.306%2C-92.261%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cg%20opacity%3D%220%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20fill%3D%22rgb(0%2C0%2C0)%22%20fill-opacity%3D%221%22%20d%3D%22%20M-41.573%2C60.948%20C-41.573%2C60.948%20-6.646%2C37.315%200.67%2C37.258%20C5.609%2C37.23%2039.021%2C61.514%2039.021%2C61.514%20C39.021%2C61.514%2056.357%2C39.508%2056.357%2C39.508%20C56.357%2C39.508%2020.496%2C8.869%200.811%2C9.265%20C-20.643%2C9.675%20-57.537%2C37.951%20-57.537%2C37.951%20C-57.537%2C37.951%20-41.573%2C60.948%20-41.573%2C60.948z%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cg%20opacity%3D%221%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20fill%3D%22rgb(0%2C0%2C0)%22%20fill-opacity%3D%221%22%20d%3D%22%20M61.477%2C-40.911%20C50.43%2C-40.911%2041.476%2C-31.956%2041.476%2C-20.909%20C41.476%2C-9.862%2050.43%2C-0.907%2061.477%2C-0.907%20C72.524%2C-0.907%2081.479%2C-9.862%2081.479%2C-20.909%20C81.479%2C-31.956%2072.524%2C-40.911%2061.477%2C-40.911z%22%3E%3C%2Fpath%3E%3Cpath%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%20fill-opacity%3D%220%22%20stroke-miterlimit%3D%2222.49%22%20stroke%3D%22rgb(0%2C0%2C0)%22%20stroke-opacity%3D%221%22%20stroke-width%3D%2218.142%22%20d%3D%22%20M61.477%2C-40.911%20C50.43%2C-40.911%2041.476%2C-31.956%2041.476%2C-20.909%20C41.476%2C-9.862%2050.43%2C-0.907%2061.477%2C-0.907%20C72.524%2C-0.907%2081.479%2C-9.862%2081.479%2C-20.909%20C81.479%2C-31.956%2072.524%2C-40.911%2061.477%2C-40.911z%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cg%20opacity%3D%221%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20fill%3D%22rgb(0%2C0%2C0)%22%20fill-opacity%3D%221%22%20d%3D%22%20M-60.61%2C-40.911%20C-71.657%2C-40.911%20-80.612%2C-31.956%20-80.612%2C-20.909%20C-80.612%2C-9.862%20-71.657%2C-0.907%20-60.61%2C-0.907%20C-49.563%2C-0.907%20-40.608%2C-9.862%20-40.608%2C-20.909%20C-40.608%2C-31.956%20-49.563%2C-40.911%20-60.61%2C-40.911z%22%3E%3C%2Fpath%3E%3Cpath%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%20fill-opacity%3D%220%22%20stroke-miterlimit%3D%2222.49%22%20stroke%3D%22rgb(0%2C0%2C0)%22%20stroke-opacity%3D%221%22%20stroke-width%3D%2218.142%22%20d%3D%22%20M-60.61%2C-40.911%20C-71.657%2C-40.911%20-80.612%2C-31.956%20-80.612%2C-20.909%20C-80.612%2C-9.862%20-71.657%2C-0.907%20-60.61%2C-0.907%20C-49.563%2C-0.907%20-40.608%2C-9.862%20-40.608%2C-20.909%20C-40.608%2C-31.956%20-49.563%2C-40.911%20-60.61%2C-40.911z%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C256%2C256)%22%20opacity%3D%221%22%3E%3Cg%20opacity%3D%221%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20fill%3D%22rgb(0%2C0%2C0)%22%20fill-opacity%3D%221%22%20d%3D%22%20M60.287%2C115.342%20C60.287%2C91.027%2081.727%2C72.278%20109.541%2C72.278%20C137.355%2C72.278%20158.795%2C91.027%20158.795%2C115.342%20C158.795%2C139.657%20137.355%2C158.4%20109.541%2C158.4%20C81.727%2C158.4%2060.287%2C139.657%2060.287%2C115.342z%20M-4.902%2C115.342%20C-4.902%2C167.264%2043.193%2C209.054%20109.541%2C209.054%20C175.889%2C209.054%20223.984%2C167.264%20223.984%2C115.342%20C223.984%2C63.414%20175.889%2C21.624%20109.541%2C21.624%20C43.193%2C21.624%20-4.902%2C63.414%20-4.902%2C115.342z%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C256%2C256)%22%20opacity%3D%221%22%3E%3Cg%20opacity%3D%221%22%20transform%3D%22matrix(1%2C0%2C0%2C1%2C0%2C0)%22%3E%3Cpath%20fill%3D%22rgb(0%2C0%2C0)%22%20fill-opacity%3D%221%22%20d%3D%22%20M-219.982%2C205.734%20C-219.982%2C205.734%20-151.872%2C205.734%20-151.872%2C205.734%20C-151.872%2C205.734%20-151.872%2C119.845%20-151.872%2C119.845%20C-151.872%2C119.845%20-73.168%2C205.734%20-73.168%2C205.734%20C-73.168%2C205.734%20-14.14%2C205.734%20-14.14%2C205.734%20C-14.14%2C205.734%20-14.14%2C26.267%20-14.14%2C26.267%20C-14.14%2C26.267%20-82.249%2C26.267%20-82.249%2C26.267%20C-82.249%2C26.267%20-82.249%2C112.156%20-82.249%2C112.156%20C-82.249%2C112.156%20-160.953%2C26.267%20-160.953%2C26.267%20C-160.953%2C26.267%20-219.982%2C26.267%20-219.982%2C26.267%20C-219.982%2C26.267%20-219.982%2C205.734%20-219.982%2C205.734z%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  filter: brightness(0) invert(1);
}

.reel-dislike-animation {
  position: absolute;
  inset: 0;
  visibility: hidden;
  filter: brightness(0) invert(1);
}

.reel-dislike-animation svg {
  display: block;
  width: 100%;
  height: 100%;
}

.reel-react[data-kind="-1"].is-on .reel-emoji {
  visibility: hidden;
}

.reel-react[data-kind="-1"].is-on:not(.is-ready) .reel-glyph::after,
.reel-react.is-on.is-ready .reel-dislike-animation {
  visibility: visible;
}

.reel-open {
  position: absolute;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  bottom: var(--reel-open-bottom, var(--tg-safe-area-inset-bottom, 0px));
  z-index: 6;
  height: var(--reel-open-height, 40px);
  padding: 0 14px;
  border: 0;
  border-radius: 20px;
  background: #242424;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
}

.reel-open .reel-avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.reel-author,
.reel-channel,
.reel-open {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.reel.is-caption .reel-open {
  display: none;
}

.reel-meta {
  position: absolute;
  left: 15px;
  right: 72px;
  bottom: calc(var(--reel-bar) + 20px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #f3f3f3;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  -webkit-font-smoothing: antialiased;
  transition: opacity 0.2s ease;
}

.reel.is-caption .reel-meta {
  opacity: 0;
  pointer-events: none;
}

.reel-sheet {
  box-sizing: border-box;
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  bottom: 0;
  z-index: 6;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  overflow-anchor: none;
  overscroll-behavior: contain;
  padding: 0 15px calc(28px + var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px));
  border-radius: 31px 31px 0 0;
  background: #181b20;
  color: #fff;
  pointer-events: none;
  -webkit-overflow-scrolling: touch;
  transition: top 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.reel:not(.is-caption):not(.is-sheet-closing) .reel-sheet {
  display: none;
}

.reel.is-caption .reel-sheet,
.reel.is-sheet-closing .reel-sheet {
  pointer-events: auto;
}

.reel.is-dragging .reel-sheet,
.reel.is-dragging .reel-stage,
.reel.is-dragging .reel-media {
  transition: none;
}

.reel-grab {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 100%;
  height: 32px;
  margin: 0 0 2px;
  padding-top: 13px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  background: #181b20;
  touch-action: none;
}

.reel-grab::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin: 0;
  border-radius: 2px;
  background: #adb5bd;
}

.reel-text a,
.reel-body a {
  color: #fff;
  font-weight: 600;
}

.reel-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.reel-author {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
}

.reel-button-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reel-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}

.reel-channel {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
}

.reel-text {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  display: block;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: auto;
}

.reel-body {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reel-date {
  display: block;
  margin: 12px 0 18px;
  color: #adb1b7;
  font-size: 13px;
  line-height: 18px;
}

.reel-overlay {
  display: block;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  background: #000;
}

.reel-overlay.is-on {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.reel-overlay-stage {
  position: absolute;
  left: 50%;
  top: calc(var(--chrome-top, 52px) + 10px);
  width: min(400px, calc(100% - 32px));
  height: max(72px, calc(var(--sheet-top, 40dvh) - var(--chrome-top, 52px) - 18px));
  transform: translateX(-50%);
  border-radius: 16px;
  overflow: hidden;
  clip-path: inset(0 round 16px);
  background: #000;
  touch-action: none;
}

.reel-overlay.is-dragging .reel-overlay-stage,
.reel-overlay.is-dragging .reel-overlay-sheet {
  transition: none;
}

.reel-overlay-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
  border-radius: 16px;
}

.reel-overlay-sound {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}

.reel-overlay-nosound {
  display: none;
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.reel-overlay-sound svg,
.reel-overlay-nosound svg {
  display: block;
  margin: 0 auto;
}

.reel-overlay.is-silent .reel-overlay-nosound {
  display: flex;
}

.reel-overlay.is-silent .reel-overlay-sound {
  display: none;
}

.reel-overlay.is-muted .reel-sound-on,
.reel-overlay:not(.is-muted) .reel-sound-off {
  display: none;
}

.reel-overlay-sheet {
  position: absolute;
  left: 0;
  right: 0;
  width: auto;
  box-sizing: border-box;
  top: var(--sheet-top, 40dvh);
  bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  background: #181b20;
  color: #fff;
  padding: 0 16px calc(28px + var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), top 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.reel-overlay.is-shown .reel-overlay-sheet {
  transform: translateY(0);
}

.reel-overlay .reel-grab {
  background: transparent;
  height: 22px;
  margin: 0;
}

.reel-overlay .reel-author span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.reel-overlay .reel-body {
  white-space: pre-wrap;
}

/* Posts: native continuous scrolling, independent of the full-screen video feed. */
[hidden] { display: none !important; }

body.mode-posts {
  height: 100dvh;
  overflow: hidden;
  background: #101010;
  color: #f5f5f5;
}
body.mode-posts #modes { background: transparent; }
body.mode-posts #status { display: none; }
#posts-feed {
  box-sizing: border-box;
  height: 100dvh;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--modes-height, 60px) 0 calc(24px + var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
  color-scheme: dark;
  font-size: 16px;
  line-height: 22px;
}
#posts-feed::-webkit-scrollbar { display: none; }
.thread-post {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 8px;
  padding: 14px 12px 6px 8px;
  border-bottom: 0.5px solid #303030;
  overflow-wrap: anywhere;
}
.thread-post.is-loading {
  min-height: 144px;
  background: linear-gradient(#242424, #242424) 60px 18px / 132px 12px no-repeat,
    linear-gradient(#202020, #202020) 60px 45px / calc(100% - 90px) 12px no-repeat,
    linear-gradient(#202020, #202020) 60px 68px / calc(100% - 132px) 12px no-repeat;
}
.thread-content { min-width: 0; }
.thread-avatar, .thread-author, .thread-open, .thread-more, .thread-unavailable {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}
.thread-avatar { width: 44px; height: 44px; border-radius: 50%; }
.thread-avatar .reel-button-label { display: none; }
.thread-avatar .reel-avatar { width: 44px; height: 44px; margin: 0; border-radius: 50%; object-fit: cover; }
.thread-header { display: flex; align-items: center; gap: 6px; height: 22px; min-width: 0; }
.thread-author { min-width: 0; font-size: 16px; font-weight: 600; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-author .reel-button-label { display: inline; }
.thread-age { color: #777; font-size: 14px; line-height: 20px; white-space: nowrap; flex-shrink: 0; }
.thread-open { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -7px -6px -7px auto; color: #888; }
.thread-open .thread-icon { width: 21px; height: 21px; }
.thread-text { margin-top: 4px; font-size: 16px; line-height: 22px; font-weight: 400; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.thread-text.is-expanded { display: block; }
.thread-text a { color: #80baff; text-decoration: none; }
.thread-more { display: block; font-size: 15px; line-height: 24px; min-height: 32px; color: #888; }
.thread-ad { display: block; font-size: 12px; color: #999; line-height: 18px; }
.thread-media { position: relative; overflow: hidden; border-radius: 16px; background: #1c1c1c; aspect-ratio: 4 / 3; margin-top: 10px; max-height: 72dvh; isolation: isolate; }
.thread-media > img, .thread-media > video, .thread-media > a, .thread-media > a > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.thread-media > a { color: #aaa; text-decoration: none; }
.thread-media.is-unavailable { display: grid; place-items: center; }
.thread-media.is-unavailable > video, .thread-media.is-unavailable > .thread-play, .thread-media.is-unavailable > .thread-sound { display: none; }
.thread-unavailable { padding: 12px; color: #aaa; text-align: center; }
.thread-play { position: absolute; inset: 0; border: 0; padding: 0; color: white; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.thread-play .reel-glyph { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none; padding: 12px; border-radius: 50%; background: rgba(35, 35, 35, 0.85); }
.thread-media.is-paused .thread-play .reel-glyph { display: block; }
.thread-media.is-buffering:not(.is-paused):not(.is-unavailable)::after { content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -13px 0 0 -13px; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; pointer-events: none; animation: thread-buffer 0.8s linear infinite; }
@keyframes thread-buffer { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .thread-media.is-buffering::after { animation: none !important; } }
.thread-sound { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(35, 35, 35, 0.85); color: white; -webkit-tap-highlight-color: transparent; }
.thread-sound .thread-icon { width: 19px; height: 19px; }
.thread-actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: clamp(8px, 3vw, 14px); row-gap: 0; min-height: 40px; margin-top: 6px; }
.thread-actions .thread-action { display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; gap: 6px; width: auto; min-width: 40px; height: 40px; padding: 0 5px; margin-left: -5px; border: 0; border-radius: 12px; background: none; color: #ccc; font: inherit; font-size: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.thread-actions .thread-action.is-on[data-kind="1"] { color: #ff405c; }
.thread-actions .thread-action .reel-glyph { width: 24px; height: 24px; flex-shrink: 0; filter: none; }
.thread-actions .thread-action .thread-icon { width: 24px; height: 24px; }
.thread-count { line-height: 20px; white-space: nowrap; }
.threads-status { text-align: center; color: #888; padding: 20px 16px; font-size: 14px; line-height: 20px; }
.threads-status:empty { padding: 0; }
.threads-status button { font: inherit; color: #80baff; background: none; border: 0; padding: 8px; }
body.needs-auth #status { display: block; position: fixed; top: var(--modes-height, 60px); left: 0; right: 0; }

.thread-media > .thread-photo { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: #aaa; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.thread-photo > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.thread-photo-error { padding: 16px; }
.thread-actions .thread-action .reel-emoji { width: 24px; height: 24px; }
.thread-media-placeholder { margin-top: 10px; background: transparent; }
.thread-viewer { box-sizing: border-box; position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; padding: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 48px) 0 calc(var(--tg-safe-area-inset-bottom, 0px) + 12px); background: #000; color: #fff; overflow: hidden; }
.thread-viewer:not([open]) { display: none; }
.thread-viewer[open] { display: flex; align-items: center; justify-content: center; }
.thread-viewer::backdrop { background: #000; }
.thread-viewer .thread-media { width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; background: #000; aspect-ratio: auto !important; }
.thread-viewer .thread-play, .thread-viewer .thread-sound { display: none; }
.thread-viewer-close { position: absolute; top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + 8px); right: 12px; z-index: 2; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #242424; color: #fff; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.thread-viewer-close .thread-icon { width: 24px; height: 24px; }

/* Shared media viewer: the original player moves here, its source is retained. */
.thread-viewer[open] { flex-direction: column; gap: 12px; align-items: stretch; padding-left: 12px; padding-right: 12px; }
.thread-viewer-stage { min-height: 0; flex: 1 1 auto; display: flex; justify-content: center; align-items: center; overflow: hidden; touch-action: pan-y; }
.thread-viewer .thread-media { flex: 0 0 auto; max-width: 100%; max-height: 100%; }
.thread-viewer-copy { flex: 0 0 auto; width: min(100%, 800px); margin: 0 auto; max-height: 35dvh; overflow-y: auto; font-size: 16px; line-height: 22px; }
.thread-viewer-author { display: flex; align-items: center; gap: 8px; border: 0; padding: 0; background: none; color: white; font: inherit; font-weight: 600; margin-bottom: 8px; }
.thread-viewer-author .reel-avatar { width: 28px; height: 28px; }
.thread-viewer-text { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.thread-viewer-text.is-expanded { display: block; }
.thread-viewer-text a { color: #80baff; text-decoration: none; }
.thread-viewer-footer { flex: 0 0 auto; display: flex; justify-content: center; padding: 6px 0 8px; }
.thread-viewer-post { display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; max-width: 100%; min-height: 40px; padding: 0 14px; border: 0; border-radius: 22px; background: #242424; color: white; font: inherit; font-size: 15px; font-weight: 600; }
.thread-viewer-post .reel-avatar { width: 24px; height: 24px; margin: 0; }

.thread-viewer-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; width: min(100%, 800px); margin: 0 auto; }
.thread-viewer-controls button { display: flex; align-items: center; justify-content: center; width: 36px; height: 40px; flex: 0 0 auto; padding: 0; border: 0; background: none; color: #eee; }
.thread-viewer-controls .thread-icon { width: 23px; height: 23px; }
.thread-viewer-controls input { flex: 1; min-width: 0; height: 32px; margin: 0; accent-color: #b8b8b8; cursor: pointer; }
.thread-text { display: block; -webkit-line-clamp: unset; max-height: none; }
.thread-text.is-expanded { max-height: none; }
.thread-viewer-text { display: block; -webkit-line-clamp: unset; max-height: 66px; }
.thread-viewer-text.is-expanded { max-height: none; }

.boot-logo { position: absolute; width: clamp(220px, 62vw, 320px); height: clamp(220px, 62vw, 320px); }
.boot-logo svg { width: 100%; height: 100%; }
.reel-dislike-animation { filter: none; }
.reel-react.is-on.is-ready .reel-glyph::after { visibility: hidden; }
.reel-seek-bar { background: #c5c5c5; }
.reel.is-seeking .reel-seek-bar { background: #d5d5d5; }
.reel-seek-knob { background: #fff; }
.reel-text { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.reel::after { background: linear-gradient(transparent, rgba(0,0,0,.5)); }
.is-desktop #feed { --reel-open-bottom: max(12px, var(--tg-safe-area-inset-bottom, 0px)); }
.threads-status { font-size: 16px; line-height: 22px; }
.threads-status button { padding: 4px 0; }
.thread-actions .thread-action .comment-icon { width: 23px; height: 23px; }
.thread-actions .thread-action[data-icon="share"] .reel-glyph { width: 25.5px; height: 25.5px; }
.thread-actions .thread-action[data-icon="share"] .reel-emoji { width: 25.5px; height: 25.5px; }
#posts-feed { touch-action: pan-y; }
#feed { touch-action: pan-y; }
@media (min-width: 800px) { #posts-feed { max-width: 860px; } }

.is-desktop #posts-feed .thread-media { max-height: none; }

.thread-photo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Match the visible contour, since the icon viewBoxes have different padding. */
.reel-share .comment-icon { width: 32px; height: 32px; }
.thread-actions .thread-action .comment-icon, .thread-actions .thread-comments .reel-glyph { width: 25.5px; height: 25.5px; }

/* The initial content starts below the tabs; scrolled content continues behind
   the fading header mask without changing geometry when the viewer closes. */
body.mode-reels, body.mode-posts, #feed { height: var(--app-height, 100dvh); }
.reel.is-shown { flex-basis: var(--app-height, 100dvh); height: var(--app-height, 100dvh); min-height: var(--app-height, 100dvh); max-height: var(--app-height, 100dvh); }
#posts-feed { position: fixed; inset: 0 0 auto; height: var(--app-height, 100dvh); padding-top: var(--modes-height, 60px); }
.is-desktop #posts-feed :is(.thread-media,.thread-media-placeholder) { --post-media-height:70dvh; }
.thread-post.is-loading { background: none; }
.thread-skeleton-avatar { width: 44px; height: 44px; border-radius: 50%; background: #191919; }
.thread-skeleton-copy { padding-top: 3px; }
.thread-skeleton-copy i { display: block; height: 12px; border-radius: 4px; background: #191919; margin-bottom: 10px; width: 100%; }
.thread-skeleton-copy i:first-child { width: 36%; }
.thread-skeleton-copy i:last-child { width: 78%; }
.threads-status.is-loading::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 9px; vertical-align: -3px; border: 2px solid #ffffff20; border-top-color: #aaa; border-radius: 50%; animation: thread-buffer .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .threads-status.is-loading::before { animation: none; } }

.reel-dislike-animation img, .dislike-lottie { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.reel-dislike-animation img[hidden] { display: none; }
.reel-react[data-kind="-1"].is-on:not(.is-ready) .reel-glyph::after { visibility: hidden; }
.thread-reply { display: block; width: 100%; padding: 7px 10px; margin: 8px 0; border: 0; border-left: 3px solid #80baff; border-radius: 4px; background: #80baff0c; color: #ccc; font: inherit; text-align: left; cursor: pointer; }
.thread-reply strong { display: block; color: #80baff; font-size: 14px; font-weight: 600; }
.thread-reply span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 20px; }
.thread-views { margin-left: auto; color: #777; font-size: 14px; line-height: 20px; display: flex; align-items: center; flex-shrink: 0; gap: 4px; white-space: nowrap; }
.thread-views svg { width: 18px; height: 18px; }
@media (max-width: 380px) { .thread-actions { column-gap: 10px; } }

/* One scroll-driven sheet for both photos and videos. */
.thread-viewer[open] { display: block; padding-left: 0; padding-right: 0; height: var(--app-height, 100dvh); }
.thread-viewer { transition: background .25s ease; }
.thread-viewer::backdrop { transition: background .25s ease; }
.thread-viewer-stage { position: absolute; left: 0; right: 0; display: block; overflow: visible; touch-action: none; }
.thread-viewer .thread-media { position: absolute; top: 0; left: 0; max-width: none; max-height: none; transform-origin: 0 0; will-change: transform; }
.thread-viewer-caption { position:absolute;left:0;right:0;z-index:2;overflow:hidden;border-radius:20px 20px 0 0; }
.thread-viewer-scroll { position: absolute; inset:0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; }
.thread-viewer-spacer { pointer-events: none; }
.thread-viewer-copy { box-sizing: border-box; max-height: none; overflow: visible; width: min(100%, 800px); padding: 14px 16px 22px; border-radius: 20px 20px 0 0; background: #181b20; }
.thread-viewer-text, .thread-viewer-text.is-expanded { display: block; max-height: none; overflow: visible; }
.thread-viewer-footer { position: absolute; left: 0; right: 0; bottom: calc(var(--tg-safe-area-inset-bottom, 0px) + 12px); height: 44px; padding: 0; z-index: 4; }
.thread-viewer-controls { position: absolute; left: 12px; right: 12px; bottom: calc(var(--tg-safe-area-inset-bottom, 0px) + 60px); width: auto; height: 44px; z-index: 4; }
.thread-viewer-controls input { height: 44px; touch-action: none; -webkit-appearance: none; appearance: none; background: transparent; }
.thread-viewer-controls input::-webkit-slider-runnable-track { height: 3px; background: #777; border-radius: 3px; }
.thread-viewer-controls input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #c5c5c5; }
.thread-viewer-controls input::-moz-range-track { height: 3px; background: #777; }
.thread-viewer-controls input::-moz-range-thumb { width: 12px; height: 12px; border: 0; background: #c5c5c5; }
.thread-viewer-close { z-index: 5; }
.thread-viewer.is-closing, .thread-viewer.is-closing::backdrop { background: transparent; }
.thread-viewer.is-closing .thread-viewer-scroll, .thread-viewer.is-closing .thread-viewer-footer, .thread-viewer.is-closing .thread-viewer-controls, .thread-viewer.is-closing .thread-viewer-close { opacity: 0; transition: opacity .16s ease; }
@media (prefers-reduced-motion: reduce) { .thread-viewer, .thread-viewer::backdrop { transition: none; } }

#feed-pager { position: fixed; inset: 0; overflow-x: auto; overflow-y: hidden; height: var(--app-height, 100dvh); scroll-snap-type: x mandatory; overscroll-behavior: none; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
#feed-pager::-webkit-scrollbar { display: none; }
#feed-pager:has(.reel.is-caption, .reel.is-fast, .reel.is-zoomed) { overflow-x: hidden; }
#feed-track { position: relative; width: 200%; height: 100%; display: flex; }
.feed-pane { position: relative; flex: 0 0 50%; min-width: 0; height: 100%; overflow: hidden; isolation: isolate; scroll-snap-align: start; scroll-snap-stop: always; }
.posts-pane { background: #101010; }
.posts-pane::after { content:"";position:absolute;left:0;right:0;top:0;height:var(--modes-height,60px);background:#101010;z-index:20;pointer-events:none; }
#modes { background:transparent; }
.reels-pane { background: #000; }
.is-mode-sliding .reel-stage { transition: none; }
/* Native scrolling owns the track; no transform or second JS snap. */
.reel-track { position: relative; min-height: 100%; }
#feed .reel-stage { touch-action: pan-x pan-y; }
#feed, #posts-feed { touch-action: pan-x pan-y; overscroll-behavior-x: auto; overscroll-behavior-y: contain; }
#feed :is(.is-fast, .is-zoomed) .reel-stage { touch-action: none; }
#feed :is(.reel.is-shown, .reel-loading-placeholder) { scroll-snap-align: start; scroll-snap-stop: always; }
#feed { position: absolute; inset: 0; }
#posts-feed { position: absolute; }

.thread-media-placeholder { background: transparent; }
.thread-viewer-scroll::-webkit-scrollbar { display: none; }

.thread-viewer:focus { outline: none; }

.thread-viewer-copy { background: #000; }
.thread-viewer-controls { bottom: calc(var(--tg-safe-area-inset-bottom, 0px) + 64px); }
.reel-poster { z-index: 1; pointer-events: none; transition: opacity .1s linear; }
.reel-prepared { transition: none; will-change: opacity; }
.reel-freeze { z-index: 1; pointer-events: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .reel-poster { transition: none; } }

/* Metadata and the first decoded frame share one layout; only sheets animate it. */
.reel:not(.is-caption) .reel-stage { transition: none; }
.thread-viewer.is-closing .thread-viewer-scroll { visibility: hidden; }
.thread-viewer.is-fast .reel-rate { display: block; }
.thread-viewer-stage { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
:is(.thread-text, .thread-viewer-text, .reel-body, .reel-text) blockquote { position: relative; margin: 22px 0; padding: 6px 34px 6px 13px; border: 0; border-radius: 6px; background: linear-gradient(#69c990 0 0) left / 3px 100% no-repeat, #69c99014; font: inherit; font-size: calc(1em - 1px); color: inherit; white-space: pre-wrap; }
:is(.thread-text, .thread-viewer-text, .reel-body, .reel-text) blockquote::after { --quote-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 366.3018'%3E%3Cpath d='M3 101q0-18 9-33t24-23.5T68.5 36t32.5 8.5T125 68t9 33v19q0 54-24 102l-12 24q-6 12-19 16t-25-2-16.5-18.5T39 217l12-24q7-13 11-27-25-3-42-21.5T3 101zm163 0q0-18 9-33t24-23.5 32.5-8.5 32.5 8.5T288 68t9 33v19q0 54-24 102l-12 24q-6 12-19 16t-25-2-16.5-18.5T202 217l12-24q7-13 11-27-25-3-42-21.5T166 101z'/%3E%3C/svg%3E"); content: ""; position: absolute; top: 6px; right: 4px; width: 12px; height: 12px; background: #69c990; -webkit-mask: var(--quote-mark) no-repeat; mask: var(--quote-mark) no-repeat; pointer-events: none; }
.thread-viewer-pause[data-paused="false"] .thread-icon { stroke-width: 3; }
:is(.thread-text, .thread-viewer-text, .reel-body, .reel-text) > blockquote:first-child { margin-top: 0; }
:is(.thread-text, .thread-viewer-text, .reel-body, .reel-text) > blockquote:last-child { margin-bottom: 0; }
.thread-text.has-quotes { max-height: none; display: block; -webkit-line-clamp: unset; overflow: visible; }
.thread-media.is-round, .thread-viewer .thread-media.is-round { background: transparent; }
.thread-media.is-round video { clip-path: circle(50%); }
.thread-viewer, .thread-viewer::backdrop { transition: background .38s cubic-bezier(.22,1,.36,1); }
.thread-viewer.is-opening, .thread-viewer.is-opening::backdrop { background: #000; transition: none; }
.thread-viewer-copy, .thread-viewer-controls, .thread-viewer-footer, .thread-viewer-close { transition: opacity .28s ease, transform .38s cubic-bezier(.22,1,.36,1); }
.thread-viewer.is-opening :is(.thread-viewer-copy, .thread-viewer-controls, .thread-viewer-footer, .thread-viewer-close) { opacity: 0; transform: translateY(8px); }
.thread-viewer.is-immersive .thread-viewer-controls { bottom: auto; padding: 0 6px; box-sizing: border-box; background: linear-gradient(transparent, #000a); border-radius: 0; }
@media (prefers-reduced-motion: reduce) {
  .thread-viewer, .thread-viewer::backdrop, .thread-viewer-copy, .thread-viewer-controls, .thread-viewer-footer, .thread-viewer-close { transition: none; }
}
.reel-text a { color: inherit; text-decoration: none; }

.thread-viewer-content { position: absolute; inset: 0; transform: translate3d(0,0,0); will-change: transform; }

.thread-media-placeholder.is-video-placeholder:not(.is-round) { background: transparent; }
.thread-viewer.is-closing, .thread-viewer.is-closing::backdrop { transition-duration: .28s; }
.thread-unavailable { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.thread-unavailable button, .thread-unavailable-link { border: 0; border-radius: 20px; padding: 10px 16px; background: #303030; color: #eee; font: inherit; cursor: pointer; }
.thread-unavailable-link { background: none; color: #aaa; padding: 0; }
.thread-media .thread-video-poster { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .1s linear; }
.thread-media.is-round .thread-video-poster { clip-path: circle(50%); }
.thread-media.is-unavailable .thread-video-poster { display: none; }
.thread-play, .thread-sound, .thread-media::after { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .thread-video-poster { transition: none; } }

/* One real loading slot. A complete staged page replaces it at the same offset. */
#feed { position: relative; }
.reel-loading-placeholder { position: relative; height: var(--app-height, 100dvh); min-height: var(--app-height, 100dvh); background: #000; }
.reel-loading-placeholder[hidden] { display: none; }
.reel-loading-transition { position:absolute;inset:0;z-index:10;pointer-events:none;background:#000; }
#feed.is-loading-slot { overscroll-behavior-y:none; }
.reel-staging { position: absolute; top: 0; left: 0; right: 0; height: var(--app-height, 100dvh); overflow: hidden; opacity: 0; pointer-events: none; contain: layout style; --reel-open-height: 40px; --reel-open-bottom: var(--tg-safe-area-inset-bottom, 0px); --reel-bar: calc(var(--reel-open-height) + var(--reel-open-bottom) + 10px); }
.reel.is-staged { height: var(--app-height, 100dvh); min-height: var(--app-height, 100dvh); max-height: var(--app-height, 100dvh); visibility: visible; }
@media (min-width: 800px) { .reel-staging { width: min(860px, 100%); margin: 0 auto; } }
.is-desktop .reel-staging { --reel-open-bottom: max(12px, var(--tg-safe-area-inset-bottom, 0px)); }
.reel-loading-message, .reel-loading-retry { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #eee; text-align: center; }
.reel-loading-message { top: 46%; width: 90%; display: none; }
.reel-loading-retry { top: 54%; border: 0; border-radius: 20px; background: #444; padding: 10px 20px; cursor: pointer; }
.reel-loading-placeholder.is-failed .reel-loading-message { display: block; }
.reel-loading-placeholder.is-failed .reel-loading-copy { animation: none; }
.reel-loading-stage { position: absolute; inset: 0 0 var(--reel-bar); overflow: hidden; }
.reel-loading-surface { position: absolute; inset: 0; background: #282d34; }
.reel-loading-copy { position: absolute; bottom: 0; left: 3.73%; width: 56%; padding-bottom: 3.73%; animation: reel-loading-pulse 1.6s ease-in-out infinite; }
.reel-loading-copy i, .reel-loading-copy span, .reel-loading-copy b { display: block; background: #48535e; border-radius: 2px; }
.reel-loading-author { display: flex; align-items: center; gap: 3.32%; margin-bottom: 0; }
.reel-loading-author i { flex: 0 0 13.31%; height: auto; aspect-ratio: 1; border-radius: 50%; }
.reel-loading-author span { width: 83%; height: auto; aspect-ratio: 548 / 33; }
.reel-loading-copy b { width: 93.45%; height: auto; aspect-ratio: 618 / 33; margin-top: 3.33%; }
.reel-loading-copy b:last-child { width: 53.83%; aspect-ratio: 356 / 33; }
@keyframes reel-loading-pulse { 0%, 100% { opacity: .5; } 50% { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .reel-loading-copy { animation: none; } }

/* One compositor overlay morphs between the button indicator and its toast. */
.feed-notice { --feed-notice-width:min(236px,calc(100vw - 40px));position:fixed;z-index:61;left:50%;top:calc(var(--app-height,100dvh) - 114px - var(--tg-safe-area-inset-bottom,0px));transform:translateX(-50%);width:var(--feed-notice-width);height:42px;pointer-events:none; }
.feed-notice[hidden] { display:none; }
.feed-notice-surface { display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;padding:0 12px;border-radius:22px;background:rgba(15,17,21,.96);color:#fff;border:1px solid #ffffff16;box-shadow:0 5px 20px #0006,0 1px 3px #0008;font:15px/20px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.feed-notice { opacity:0; }
.feed-progress-label { white-space:nowrap; }
.feed-notice-surface { position:relative;clip-path:inset(0 0% round 22px); }
.feed-notice-content { position:absolute;inset:0;width:100%; }
.feed-progress-label { position:absolute;top:10px;left:50%;transform:translateX(calc(-50% + 14.5px));width:max-content; }
.feed-progress-mark { position:absolute;left:0;top:10px;display:block;width:20px;height:20px; }
.feed-notice:not(.is-loading):not(.is-ready) .feed-progress-mark { display:none; }
.feed-progress-mark i { position:absolute;left:9px;top:1px;width:2px;height:5px;border-radius:2px;background:#e2e2e2;transform-origin:1px 9px;transform:rotate(calc(var(--i)*30deg));opacity:.25; }
.feed-notice.is-loading .feed-progress-mark i { animation:feed-progress-bars 1s linear infinite;animation-delay:calc(var(--i)*-83.333ms); }
.feed-progress-mark svg { position:absolute;inset:0;fill:none;stroke:#eee;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:scale(.6);transition:opacity .16s ease,transform .16s ease; }
.is-ready .feed-progress-mark svg { opacity:1;transform:scale(1); }
.is-ready .feed-progress-mark i { animation:none;opacity:0;transition:opacity .16s ease; }
@keyframes feed-progress-bars { 0% { opacity:1; } 100% { opacity:.15; } }
@media (prefers-reduced-motion: reduce) { .feed-progress-mark svg { transition:none; } .feed-notice.is-loading .feed-progress-mark i { animation:none; } }

/* Hold feedback is the experiment's only eagerly loaded visual. */
.basketball-enabled .thread-avatar .reel-avatar, .basketball-enabled .reel-author .reel-avatar, .avatar-game-enabled .thread-avatar .reel-avatar, .avatar-game-enabled .reel-author .reel-avatar { touch-action:pan-y; }
.avatar-game-hold { position:fixed;z-index:80;pointer-events:none; }
.avatar-game-hold svg { display:block;width:100%;height:100%;overflow:visible;transform:rotate(-90deg); }
.avatar-game-hold circle { fill:none;stroke:rgba(255,255,255,.85);stroke-width:1.8;stroke-linecap:round;stroke-dasharray:138.23;stroke-dashoffset:138.23;animation:avatar-game-hold 1s linear forwards; }
@keyframes avatar-game-hold { to { stroke-dashoffset:0; } }

/* Intrinsic video dimensions must not participate in the card's reserved layout. */
.thread-media > video { position:absolute;inset:0; }
.thread-viewer.is-controls-hidden :is(.thread-viewer-controls,.thread-viewer-close) { opacity:0;pointer-events:none; }
.thread-viewer.is-zoomed :is(.thread-media,.thread-photo) { overflow:visible; }
.thread-viewer-stage { isolation:isolate;overflow:hidden;z-index:0; }
.media-zoom-surface { position:absolute;inset:0;transform-origin:50% 50%; }
.thread-media .media-zoom-surface > :is(video,img) { display:block;width:100%;height:100%;object-fit:contain; }
.thread-media .media-zoom-surface > video { position:absolute;inset:0; }
.thread-viewer-controls,.thread-viewer-footer { transform:translate3d(0,0,0);-webkit-tap-highlight-color:transparent; }
.thread-viewer-controls button { -webkit-tap-highlight-color:transparent; }
.thread-viewer-footer { isolation:isolate;background:#000; }
.thread-viewer-footer::before { content:"";position:absolute;inset:-8px 0 calc(-12px - var(--tg-safe-area-inset-bottom,0px));background:#000;z-index:-1;pointer-events:none; }
.thread-viewer.is-opening .thread-viewer-copy,.thread-viewer.is-opening .thread-viewer-footer { opacity:1;transform:translate3d(0,0,0); }
.thread-viewer-copy-content,.thread-viewer-post { transition:opacity .28s ease,transform .38s cubic-bezier(.22,1,.36,1); }
.thread-viewer.is-opening :is(.thread-viewer-copy-content,.thread-viewer-post) { opacity:0;transform:translateY(8px); }
.thread-viewer.is-closing .thread-viewer-stage { clip-path:none !important;overflow:visible; }
.is-reel-peeking #modes,.reel.is-peeking :is(.reel-meta,.reel-rail,.reel-play,.reel-sound,.reel-nosound,.reel-rate,.reel-buffer) { opacity:0;pointer-events:none; }
@media(prefers-reduced-motion:reduce) { .thread-viewer-copy-content,.thread-viewer-post { transition:none; } }

.avatar-game-grabbing { animation:avatar-game-grow 1s cubic-bezier(.2,.65,.3,1) forwards; }
.avatar-game-hold { animation:avatar-game-grow 1s cubic-bezier(.2,.65,.3,1) forwards; }
@keyframes avatar-game-grow { from {transform:scale(1);} to {transform:scale(1.18);} }

/* Stable, inexpensive video feedback: opacity stays on composited UI layers. */
#modes,.reel-meta,.reel-rail,.reel-play,.reel-sound,.reel-nosound,.reel-rate,.reel-buffer { transition:opacity .18s ease; }
.reel-retry { position:absolute;z-index:8;top:48%;left:50%;transform:translate(-50%,-50%);padding:12px 18px;border:1px solid #ffffff22;border-radius:24px;background:#242424eb;color:#fff;font:inherit;cursor:pointer; }
button.thread-views { padding:0;border:0;background:none;font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent; }
.thread-viewer.is-zoomed.is-immersive .thread-viewer-controls { left:0 !important;right:0 !important;width:100% !important; }
/* Paint the shade across the viewport, independently of fractional video edges.
   The controls keep their media-relative hit targets while zooming/resizing. */
.thread-viewer.is-immersive .thread-viewer-controls { background:none;isolation:isolate; }
.thread-viewer.is-immersive .thread-viewer-controls::before { content:"";position:absolute;inset:-12px calc(50% - 50vw) -1px;background:linear-gradient(transparent,#000a);z-index:-1;pointer-events:none; }
@media(prefers-reduced-motion:reduce){#modes,.reel-meta,.reel-rail,.reel-play,.reel-sound,.reel-nosound,.reel-rate,.reel-buffer{transition:none;}}

/* Threads-sized rows; the viewer and game retain their independent geometry. */
.thread-post { grid-template-columns:40px minmax(0,1fr);padding:13px 10px 6px 7px; }
.thread-avatar,.thread-avatar .reel-avatar { width:40px;height:40px; }
.thread-author { font-size:15px;line-height:20px; }
.thread-header { height:20px;gap:5px; }
.thread-text { font-size:15.5px;line-height:20.5px;margin-top:3px; }
.thread-viewer-text { font-size:16.5px;line-height:22.5px; }
.thread-age { font-size:13px;line-height:20px; }
.thread-more { font-size:14px;line-height:22px;min-height:30px; }
/* Limit both dimensions together. Capping only height changes the viewport
   aspect ratio and produces side bars despite correct video metadata. */
.thread-content > :is(.thread-media,.thread-media-placeholder) { --post-media-height:min(62dvh,480px);max-height:none;width:min(100%,calc(var(--post-media-height) * var(--media-ratio,1.333333)));margin-top:9px; }
/* Preview and native frames share the same fit in the feed and viewer.
   An explicit encoded-frame crop keeps its inline fill geometry on both. */
.thread-content .thread-media .media-zoom-surface > :is(video,.thread-video-poster) { object-fit:cover; }
.thread-content .thread-video-poster { transition:none; }
.thread-actions { column-gap:clamp(6px,2.5vw,12px);margin-top:5px; }
.thread-actions .thread-action { min-width:35px;gap:5px;font-size:13px; }
.thread-actions .thread-action :is(.reel-glyph,.reel-emoji,.thread-icon) { width:22px;height:22px; }
.thread-actions .thread-action[data-icon="share"] :is(.reel-glyph,.reel-emoji),.thread-actions .thread-action :is(.comment-icon),.thread-actions .thread-comments .reel-glyph { width:23.5px;height:23.5px; }
.thread-views { font-size:13px;gap:3px; }
.thread-views svg { width:17px;height:17px; }
.thread-reply { padding:4px 7px;margin:6px 0;border-radius:5px;min-height:38px;overflow:hidden; }
.thread-reply strong,.thread-reply span { font-size:13px;line-height:18px; }
.thread-reply-thumb { float:left;width:34px;height:34px;object-fit:cover;border-radius:3px;margin-right:6px; }
.thread-post.is-preparing > :is(.thread-avatar,.thread-content) { visibility:hidden; }
.thread-text blockquote { font-size:inherit; }
.thread-preparation-retry,.thread-card-retry { grid-column:1/-1;z-index:1;margin:12px;border:0;background:#242424;color:#ccc;padding:12px;border-radius:12px;font:inherit;cursor:pointer; }
.thread-post.has-thread-reply { border-bottom:0;padding-bottom:0; }
.thread-post.has-thread-reply::before { content:"";position:absolute;left:26px;top:58px;bottom:-4px;width:2px;background:#303030; }
.thread-post.is-thread-reply { padding-left:55px;grid-template-columns:24px minmax(0,1fr); }
.thread-post.is-thread-reply::after { content:"";position:absolute;left:26px;top:0;width:16px;height:27px;border-left:2px solid #303030;border-bottom:2px solid #303030;border-bottom-left-radius:18px; }
.thread-post.is-thread-reply :is(.thread-avatar,.thread-avatar .reel-avatar) { width:24px;height:24px; }
.thread-post.is-thread-reply .thread-content > :not(.thread-header) { margin-left:-32px; }
.thread-viewer.is-opening .thread-viewer-stage { overflow:hidden; }
.thread-viewer.is-opening :is(.thread-viewer-copy,.thread-viewer-copy-content,.thread-viewer-controls,.thread-viewer-footer,.thread-viewer-post,.thread-viewer-close) { opacity:1;transform:none;transition:none; }

/* v268: previews are staged off-flow; a skeleton remains until their paint commit. */
.threads-list { position:relative; }
.thread-post.is-preparing { position:absolute;left:0;right:0;top:0;visibility:hidden;pointer-events:none; }
.thread-reply { appearance:none;-webkit-appearance:none;outline:none;background:#171a1f;background-clip:padding-box;clip-path:inset(0 round 5px); }
.thread-reply span { -webkit-line-clamp:1; }
:is(.thread-text,.thread-viewer-text) blockquote { font-size:calc(1em - .7px);background:linear-gradient(#69c990 0 0) left / 3px 100% no-repeat,#17201a;background-clip:padding-box;clip-path:inset(0 round 6px); }
.reel-ui::before { display:none; }
/* Keep layout and hit targets fixed. Reveal the header only after the viewer closes. */
#modes,.posts-pane::after { transition:opacity var(--post-header-fade-ms,0ms) cubic-bezier(.45,0,.35,1) var(--post-header-delay-ms,0ms),visibility 0s linear var(--post-header-delay-ms,0ms); }
body.has-post-viewer #modes,body.has-post-viewer .posts-pane::after { opacity:0;visibility:hidden;pointer-events:none; }
@media(prefers-reduced-motion:reduce){#modes,.posts-pane::after{transition:none;}}
/* The sound affordance is not part of video buffering/paused animation. */
.thread-media > .media-zoom-surface { z-index:0; }
.thread-media > .thread-photo { position:absolute;inset:0; }
.thread-photo .media-zoom-surface > img { object-fit:cover; }
.thread-media:not(.is-unavailable) > .thread-sound { z-index:3;opacity:1;transform:translateZ(0); }
.thread-sound > .reel-glyph { display:block;width:19px;height:19px; }
.thread-sound .thread-icon { display:block;width:100%;height:100%; }
/* The native video/zoom plane must not cover recovery actions or occupy a grid
   cell that pushes them outside the clipped media viewport. */
.thread-media.is-unavailable > .media-zoom-surface { visibility:hidden;pointer-events:none; }
.thread-media > .thread-unavailable { position:absolute;inset:0;z-index:4;box-sizing:border-box; }

/* Failed previews recover outside the published list, with no scroll geometry. */
.posts-recovery-bin { position:absolute;inset:0;visibility:hidden;pointer-events:none;overflow:hidden;contain:strict; }

/* Only actual media intercepts gestures above the fixed caption viewport. */
.thread-viewer-scroll { pointer-events:auto; }
.thread-viewer-stage { z-index:3;pointer-events:none; }
.thread-viewer-stage .thread-media { pointer-events:auto; }
.thread-viewer-caption { -webkit-mask-image:linear-gradient(#000 calc(100% - var(--caption-edge-cut,0px)),transparent 0);mask-image:linear-gradient(#000 calc(100% - var(--caption-edge-cut,0px)),transparent 0); }
.thread-text blockquote { font-size:14.3px; }
.thread-viewer-text blockquote { font-size:15.3px; }
.thread-forwarded { display:block;max-width:100%;margin:4px 0;padding:0;border:0;background:none;color:#80baff;font:inherit;font-size:13px;line-height:18px;text-align:left;overflow-wrap:anywhere; }
button.thread-forwarded { cursor:pointer; }
.thread-forwarded strong { font-weight:600; }
.thread-viewer-controls input::-webkit-slider-runnable-track { background:linear-gradient(to right,#e4e4e4 var(--post-progress,0%),#999 var(--post-progress,0%)); }
.thread-viewer-controls input::-webkit-slider-thumb { background:#e4e4e4; }
.thread-viewer-controls input::-moz-range-track { background:#999; }
.thread-viewer-controls input::-moz-range-progress { background:#e4e4e4;height:3px; }

.thread-avatar { position:relative; }
.thread-avatar .thread-avatar-fallback { position:absolute;inset:0;pointer-events:none; }
