.sabelwe-open-thread { cursor: pointer; }
.sabelwe-open-thread:focus-visible { outline: 3px solid #1267c8; outline-offset: 3px; border-radius: 4px; }
.sabelwe-thread-backdrop {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center;
  justify-content: center; padding: 16px; background: rgb(7 12 21 / 72%);
}
.sabelwe-thread {
  display: flex; flex-direction: column; width: min(100%, 700px); max-height: min(94dvh, 960px);
  overflow: hidden; border-radius: 16px; background: #fff; color: #111827;
  box-shadow: 0 20px 65px rgb(0 0 0 / 30%);
}
.sabelwe-thread-bar {
  display: flex; align-items: center; gap: 18px; flex: 0 0 auto; padding: 12px 16px;
  border-bottom: 1px solid #e2e5e9; background: #fff;
}
.sabelwe-thread-bar h2 { margin: 0; font: 750 1.1rem/1.3 system-ui, sans-serif; }
.sabelwe-thread-back {
  min-height: 44px; border: 0; padding: 8px 10px; background: transparent;
  color: #111827; font: 700 1rem system-ui, sans-serif; cursor: pointer;
}
.sabelwe-thread-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sabelwe-thread-original { padding: 20px; border-bottom: 1px solid #e2e5e9; }
.sabelwe-thread-author { display: flex; align-items: center; gap: 11px; }
.sabelwe-thread-author img {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; object-fit: cover;
}
.sabelwe-thread-author strong, .sabelwe-thread-author span { display: block; }
.sabelwe-thread-author strong { font: 750 1rem/1.25 system-ui, sans-serif; }
.sabelwe-thread-author span { margin-top: 2px; color: #667085; font: .9rem/1.3 system-ui, sans-serif; }
.sabelwe-thread-headline { margin: 16px 0 10px; font: 750 1.25rem/1.3 system-ui, sans-serif; }
.sabelwe-thread-caption { margin: 0; white-space: pre-wrap; font: 1rem/1.55 system-ui, sans-serif; }
.sabelwe-thread-story-photo {
  display: block; width: 100%; max-height: 280px; margin-top: 16px; border-radius: 12px;
  object-fit: contain; background: #f3f4f6;
}
.sabelwe-thread-replies { padding: 18px 20px 24px; }
.sabelwe-thread-replies > h3 { margin: 0 0 15px; font: 750 1.1rem/1.3 system-ui, sans-serif; }
.sabelwe-thread-reply { padding: 16px; border: 1px solid #e2e5e9; border-radius: 12px; background: #f8f9fb; }
.sabelwe-thread-reply video {
  display: block; width: min(100%, 430px); max-height: 65dvh; margin: 14px auto 0;
  border-radius: 10px; background: #111; object-fit: contain;
}
@media (max-width: 640px) {
  .sabelwe-thread-backdrop { align-items: stretch; padding: 0; }
  .sabelwe-thread { width: 100%; min-height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .sabelwe-thread-bar { padding-top: max(12px, env(safe-area-inset-top)); }
  .sabelwe-thread-original { padding: 16px; border-bottom: 0; }
  .sabelwe-thread-story-photo {
    width: calc(100% + 32px); max-width: none; height: auto; max-height: none;
    aspect-ratio: 1600 / 1591;
    margin: 16px -16px 0; border-radius: 0; background: transparent;
  }
  .sabelwe-thread-replies { padding: 16px 0 max(24px, env(safe-area-inset-bottom)); }
  .sabelwe-thread-replies > h3 { margin-left: 16px; margin-right: 16px; }
  .sabelwe-thread-reply { padding: 0; border: 0; border-radius: 0; background: #fff; }
  .sabelwe-thread-reply .sabelwe-thread-author { padding: 0 16px; }
  .sabelwe-thread-video-frame {
    position: relative; isolation: isolate; display: flex; align-items: center;
    justify-content: center; width: 100%; aspect-ratio: 1600 / 1591;
    margin-top: 14px; overflow: hidden; background: #1d3344;
  }
  .sabelwe-thread-video-frame::before {
    content: ''; position: absolute; z-index: 0; inset: -12%;
    background: url('/sabelwe-video-poster-v331.jpg') center / cover no-repeat;
    filter: blur(18px) brightness(.7);
  }
  .sabelwe-thread-reply video {
    position: relative; z-index: 1; flex: 0 0 auto;
    width: auto; max-width: 100%; height: 100%; max-height: 100%;
    aspect-ratio: 464 / 832; object-fit: contain;
    margin: 0; border-radius: 0; background: transparent;
  }
}
