.page-app {
  background: #f4f6f9;
}

.app-page-shell {
  display: grid;
  gap: 18px;
}

.app-page-head {
  padding: 22px 0 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.app-page-head h1 {
  margin: 0;
  color: #111827;
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
}

.app-page-head p {
  max-width: 620px;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 750;
}

.app-segments {
  min-height: 48px;
  padding: 5px;
  border: 1px solid #dfe6ef;
  border-radius: 999px;
  background: #ffffff;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.app-segments a {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 850;
}

.app-segments a.is-active {
  background: #2563eb;
  color: #ffffff;
}

.app-layout-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.app-feed-column {
  display: grid;
  gap: 16px;
}

.app-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.app-section-title h2,
.app-panel h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.app-section-title span {
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.app-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.app-post-card {
  min-height: 260px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.app-post-card.has-media {
  min-height: 390px;
  color: #ffffff;
}

.app-post-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) brightness(.88);
}

.app-post-card.has-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.12), rgba(15,23,42,.58));
}

.app-post-content {
  position: relative;
  z-index: 1;
  min-height: inherit;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

.app-post-author,
.app-person-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #dfe9ff;
  color: #111827;
  text-decoration: none;
  font-weight: 950;
}

.app-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-post-author strong,
.app-person-row strong,
.app-post-author small,
.app-person-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-post-author strong {
  font-weight: 950;
}

.app-post-author small,
.app-person-row small {
  color: inherit;
  opacity: .72;
  font-size: 12px;
  font-weight: 800;
}

.app-post-text {
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 950;
}

.app-post-card:not(.has-media) .app-post-text {
  color: #111827;
}

.app-post-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.app-post-card footer span,
.app-lock-pill {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.18);
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.app-post-card:not(.has-media) footer span,
.app-post-card:not(.has-media) .app-lock-pill {
  background: #eef4ff;
  color: #2563eb;
}

.app-post-card.is-locked .app-post-media {
  filter: blur(13px) saturate(.7) brightness(.8);
  transform: scale(1.04);
}

.app-side-panel,
.live-control-panel {
  display: grid;
  gap: 14px;
}

.app-panel,
.app-empty {
  padding: 16px;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
}

.app-panel p,
.app-empty p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.4;
  font-weight: 750;
}

.app-empty h2 {
  margin: 0;
  color: #111827;
}

.app-empty a,
.app-panel-action,
.live-form button {
  min-height: 42px;
  margin-top: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
}

.app-panel-action {
  width: 100%;
}

.app-person-row {
  min-height: 54px;
  color: #111827;
  text-decoration: none;
}

.app-person-row + .app-person-row {
  border-top: 1px solid #edf1f6;
}

.live-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.live-player-panel {
  min-height: 560px;
  overflow: hidden;
  border-radius: 18px;
  background: #070b14;
}

.live-screen {
  min-height: 560px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: radial-gradient(circle at 20% 10%, rgba(37,99,235,.45), transparent 34%), linear-gradient(135deg, #0f172a, #111827 52%, #1e293b);
  color: #ffffff;
}

.live-screen h2 {
  margin: 0;
  font-size: 44px;
  line-height: 1;
  font-weight: 950;
}

.live-screen p {
  max-width: 520px;
  color: rgba(255,255,255,.78);
  font-weight: 750;
}

.live-badge {
  width: max-content;
  margin-bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.live-form {
  display: grid;
  gap: 10px;
}

.live-form input,
.live-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
}

@media (max-width: 980px) {
  .app-page-head,
  .app-layout-rail,
  .live-stage {
    grid-template-columns: 1fr;
  }
  .app-post-grid {
    grid-template-columns: 1fr;
  }
  .app-side-panel {
    order: -1;
  }
}

@media (max-width: 640px) {
  .app-page-head h1 {
    font-size: 34px;
  }
  .app-segments {
    width: 100%;
  }
  .app-post-card,
  .app-post-card.has-media {
    min-height: 340px;
  }
  .live-player-panel,
  .live-screen {
    min-height: 430px;
  }
  .live-screen h2 {
    font-size: 34px;
  }
}

.live-screen {
  position: relative;
  overflow: hidden;
}

.live-video-slot {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #020617;
}

.live-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #020617;
}

.live-video-frame {
  border: 0;
}

.live-audio-player {
  display: none;
}

.live-waiting {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(320px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(15, 23, 42, .72);
  color: #ffffff;
  text-align: center;
  font-weight: 850;
  backdrop-filter: blur(18px);
}

.live-open-link {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 16px 35px rgba(37, 99, 235, .32);
}

.live-screen-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.live-screen.has-player {
  padding: 0;
  justify-content: stretch;
}

.live-screen.has-player .live-screen-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .72);
}

.live-screen.has-player .live-badge,
.live-screen.has-player h2,
.live-screen.has-player p,
.live-screen.has-player span {
  pointer-events: none;
}



/* App-style feed cards: keep normal media sharp, locked paid cards still blur. */
.app-post-card:not(.is-locked)::before,
.app-post-card:not(.is-locked)::after,
.app-post-card:not(.is-locked) .app-post-media {
  filter: none !important;
}
