:root {
  --primary: #024071;
  --primary-dark: #012f55;
  --primary-soft: #edf4ff;
  --accent: #f2ab2d;
  --border: #dbe4ea;
  --danger: #b42318;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.obrolan-page {
  min-height: calc(100vh - 150px);
}

.obrolan-section {
  padding: 34px 0 52px;
}

.obrolan-container {
  display: flex;
  justify-content: center;
}

.phone-preview-area {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.phone-device {
  width: min(430px, 100%);
  height: min(838px, calc(100vh - 150px));
  min-height: 680px;
  padding: 16px 13px 18px;
  border-radius: 42px;
  background: linear-gradient(145deg, #0f172a, #27364f 45%, #0b1220);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.8);
  position: relative;
}

.phone-device-speaker {
  width: 74px;
  height: 6px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.45);
}

.phone-screen {
  height: calc(100% - 18px);
  overflow: hidden;
  border-radius: 30px;
  background: #f6f8fb;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
}

.phone-app-header {
  min-height: 68px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 18px rgba(2, 64, 113, 0.22);
}

.phone-app-header strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.03em;
}

.phone-app-header span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.phone-app-title-only {
  text-align: left;
}

.phone-back-link {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
  flex: 0 0 34px;
}

.phone-back-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.phone-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 24px;
  scrollbar-width: thin;
}

.phone-content::-webkit-scrollbar {
  width: 7px;
}

.phone-content::-webkit-scrollbar-thumb {
  background: #c7d2de;
  border-radius: 999px;
}

.detail-sort-bar,
.reply-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #667085;
  font-size: 12px;
  margin: 2px 2px 12px;
}

.detail-sort-bar strong,
.reply-section-title {
  color: var(--primary);
  font-weight: 900;
}

.post-card {
  display: block;
  color: #111827;
  background: #fff;
  border: 1px solid #e7edf3;
  border-radius: 9px;
  padding: 12px 12px 10px;
  margin-bottom: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
  text-decoration: none;
}

.post-card:hover {
  color: #111827;
  text-decoration: none;
  border-color: rgba(2, 64, 113, 0.35);
}

.post-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 42px;
  background: #dbeafe;
  border: 1px solid rgba(2, 64, 113, 0.12);
}

.post-avatar-small {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.post-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--primary);
  background: #e6f0fb;
}

.post-author-block {
  min-width: 0;
  flex: 1;
}

.post-author-line {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  line-height: 1.25;
}

.post-author-line strong {
  font-size: 14px;
  color: #111827;
}

.post-emotion {
  color: #667085;
  font-size: 12px;
}

.post-meta-line {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  color: #667085;
  font-size: 11.5px;
  margin-top: 2px;
}

.post-report-flag {
  color: var(--danger);
  font-weight: 800;
}

.post-card-body {
  padding: 8px 0 0;
}

.post-reply-to {
  font-size: 12px;
  color: #667085;
  margin: 0 0 6px 44px;
}

.post-reply-to strong {
  color: #1877f2;
}

.post-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.42;
  color: rgba(17, 24, 39, 0.9);
  overflow-wrap: anywhere;
}

.post-text-empty {
  color: #98a2b3;
  font-style: italic;
}

.post-image-wrap {
  margin-top: 10px;
  width: 100%;
  aspect-ratio: 1.15;
  border-radius: 8px;
  overflow: hidden;
  background: #edf2f7;
  border: 1px solid #dbe4ea;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  font-size: 12px;
}

.post-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-image-wrap span {
  display: none;
}

.post-image-error span {
  display: block;
}

.post-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  margin-top: 10px;
  color: #667085;
  font-size: 12px;
}

.post-reaction-stack {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 5px;
}

.post-reaction-chip {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  margin-right: -4px;
}

.post-reaction-total {
  font-weight: 800;
  color: #475467;
}

.post-reaction-empty {
  color: #98a2b3;
}

.post-reply-count {
  white-space: nowrap;
}

.post-action-row {
  display: flex;
  justify-content: center;
  gap: 36px;
  border-top: 1px solid #edf2f7;
  margin-top: 8px;
  padding-top: 9px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.post-card-reply {
  box-shadow: none;
  border-color: #eef2f6;
  margin-bottom: 8px;
}

.reply-thread-list {
  display: grid;
  gap: 12px;
}

.reply-level-one {
  position: relative;
}

.reply-level-two-list {
  position: relative;
  margin-left: 32px;
  padding-left: 17px;
  display: grid;
  gap: 8px;
}

.reply-level-two-list::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 14px;
  width: 2px;
  border-radius: 999px;
  background: #dbe4ea;
}

.post-card-level2 {
  background: #fbfdff;
}

.post-empty-state {
  text-align: center;
  color: #667085;
  background: #fff;
  border: 1px dashed #dbe4ea;
  border-radius: 18px;
  padding: 28px 16px;
  line-height: 1.5;
}

.phone-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
}

.obrolan-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #dbe4ea;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.obrolan-page-btn:hover {
  background: #fff;
  border-color: rgba(2, 64, 113, 0.3);
  text-decoration: none;
}

.obrolan-page-btn.is-disabled {
  color: #98a2b3;
  background: rgba(226, 232, 240, 0.65);
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 860px) {
  .obrolan-section {
    padding-top: 24px;
  }

  .phone-device {
    height: min(780px, calc(100vh - 190px));
    min-height: 640px;
  }
}

@media (max-width: 560px) {
  .obrolan-section {
    padding: 16px 0 36px;
  }

  .phone-device {
    width: 100%;
    height: min(760px, calc(100vh - 175px));
    min-height: 610px;
    border-radius: 28px;
    padding: 10px;
  }

  .phone-screen {
    border-radius: 22px;
  }

  .phone-content {
    padding-inline: 10px;
  }

  .phone-pagination {
    font-size: 0.92rem;
  }

  .obrolan-page-btn {
    min-height: 40px;
    padding: 8px 12px;
  }
}
