#post-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(460px, 100vw);
  background: #0f1320;
  color: #e6e9ef;
  border-left: 1px solid #2a3142;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 950;
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#post-panel.open { transform: translateX(0); }

/* Shift zoom controls left when panel is open so they stay reachable */
body:has(#post-panel.open) #zoom-controls {
  right: calc(min(460px, 100vw) + 1rem);
}
@media (max-width: 520px) {
  body:has(#post-panel.open) #zoom-controls { display: none; }
}

.pp-header {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #1e2433;
}
.pp-title { flex: 1; min-width: 0; }
.pp-title h2 { margin: 0; font-size: 1.35rem; font-weight: 700; color: #e6e9ef; }
.pp-sector { font-size: 0.75rem; color: #7a8294; text-transform: uppercase; letter-spacing: 0.05em; }
.pp-price { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; font-size: 0.85rem; }
.pp-price > span { color: #a6adbd; }
.pp-change.up { color: #4ade80; font-weight: 600; }
.pp-change.down { color: #ff6a6a; font-weight: 600; }
.pp-close {
  background: none; border: none; color: #7a8294;
  font-size: 1.1rem; cursor: pointer; padding: 0.25rem 0.4rem;
  border-radius: 4px; line-height: 1;
}
.pp-close:hover { background: #1e2433; color: #e6e9ef; }

.pp-count {
  padding: 0.5rem 1.25rem 0.75rem;
  font-size: 0.75rem; color: #7a8294;
  text-transform: uppercase; letter-spacing: 0.05em;
}

.pp-body {
  flex: 1; overflow-y: auto;
  padding: 0 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.85rem;
}
.pp-body::-webkit-scrollbar { width: 8px; }
.pp-body::-webkit-scrollbar-thumb { background: #2a3142; border-radius: 4px; }
.pp-body::-webkit-scrollbar-track { background: transparent; }

.pp-empty { color: #7a8294; font-size: 0.9rem; text-align: center; padding: 2rem 0; }

.pp-card {
  background: #1a1f2e;
  border: 1px solid #2a3142;
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: border-color 120ms ease, background 120ms ease;
}
.pp-card:hover { border-color: #3a4256; background: #1d2234; }

.pp-card-head { display: flex; align-items: center; gap: 0.7rem; }
.pp-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.pp-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.pp-handle { font-weight: 600; font-size: 0.95rem; color: #e6e9ef; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-sub { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; color: #7a8294; }
.pp-tier {
  padding: 0.1rem 0.45rem; border-radius: 3px;
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pp-tier.tier-1 { background: rgba(45, 212, 143, 0.18); color: #2dd48f; }
.pp-tier.tier-2 { background: rgba(59, 157, 255, 0.18); color: #3b9dff; }
.pp-tier.tier-3 { background: rgba(245, 197, 66, 0.18); color: #f5c542; }
.pp-tier.tier-4 { background: rgba(138, 146, 166, 0.18); color: #a6adbd; }

.pp-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #2a3142 20%, #2a3142 80%, transparent);
}

.pp-text {
  font-size: 0.93rem; line-height: 1.5; color: #d6dae5;
  word-wrap: break-word; overflow-wrap: break-word;
  white-space: pre-wrap;
}

.pp-source {
  align-self: flex-start;
  font-size: 0.8rem; color: #4c9eff; text-decoration: none;
  padding: 0.25rem 0; font-weight: 500;
}
.pp-source:hover { text-decoration: underline; }

@media (max-width: 520px) {
  #post-panel { width: 100vw; border-left: none; }
  .pp-header { padding: 0.9rem 1rem 0.65rem; }
  .pp-body { padding: 0 1rem 1.25rem; }
}
