.social { color: #432537; background: #fff7ed; }
.social-showcase {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 56px);
  padding: clamp(24px, 4vw, 48px) 0 30px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 62%, #ffe2e8, #f6c7d5 88%);
}
.social-showcase::before, .social-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 540ms ease;
  pointer-events: none;
}
.social-showcase::before { background: radial-gradient(ellipse at 50% 62%, #e5e2f2, transparent 68%); }
.social-showcase::after { background: radial-gradient(ellipse at 50% 62%, #ffd8d6, #ed96aa 92%); }
.social-showcase[data-tint="threads"]::before,
.social-showcase[data-tint="xiaohongshu"]::after { opacity: 1; }
.social-showcase h1 {
  margin: 0 0 10px;
  text-align: center;
  font-size: clamp(36px, 5vw, 66px);
  letter-spacing: -.04em;
}
.platform-carousel { margin-inline: auto; width: min(1050px, 100%); }
.platform-stage {
  position: relative;
  height: calc(clamp(375px, 62svh, 540px) * var(--stage-scale, 1));
  perspective: 1050px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}
.platform-stage[data-dragging] { cursor: grabbing; }
.platform-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, calc(clamp(218px, 32vw, 355px) * var(--device-scale, 1)));
  overflow: hidden;
  border: 1px solid #fff9f4;
  border-radius: 18px;
  background: #fffaf7;
  box-shadow: 0 18px 45px #6d345837;
  transform: translate(-50%, -50%) translateX(calc(var(--x, 0px) + var(--drag, 0px))) translateZ(var(--z, 0px)) rotateY(var(--angle, 0deg));
  transition: transform 540ms cubic-bezier(.2,.72,.23,1), opacity 480ms ease;
  z-index: 2;
}
.platform-card[data-position="-1"], .platform-card[data-position="1"] {
  --z: -170px;
  z-index: 1;
  opacity: .78;
  cursor: pointer;
}
.platform-card[data-position="-1"] { --x: max(-31vw, -322px); --angle: 24deg; }
.platform-card[data-position="1"] { --x: min(31vw, 322px); --angle: -24deg; }
.platform-stage[data-dragging] .platform-card { transition: none; }
.platform-shot {
  display: grid;
  place-items: center;
  grid-template-rows: minmax(0, 1fr);
  height: calc(clamp(230px, 43svh, 355px) * var(--device-scale, 1));
  padding: 9px;
  background: white;
}
.platform-shot img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.platform-info { display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 12px 14px; }
.platform-info > img { width: 36px; height: 36px; flex: none; object-fit: contain; }
.platform-info h2 { font-size: var(--platform-size, 17px); margin: 0 0 4px; }
.platform-info p { font-size: var(--caption-size, 12px); overflow-wrap: anywhere; line-height: 1.4; margin: 0; }
.platform-controls { display: flex; justify-content: center; gap: 12px; }
.platform-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #4325374d;
  background: #fffaf7;
  color: #432537;
  font-size: 20px;
  cursor: pointer;
}
.platform-controls button:hover { background: white; }
.platform-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (prefers-reduced-motion: reduce) {
  .platform-card, .social-showcase::before, .social-showcase::after { transition: none; }
}

.social-nav { display: flex; align-items: center; gap: 12px; }
#socialEditor {
  position: fixed;
  inset: 64px 16px auto auto;
  z-index: 10;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100dvh - 80px);
  overflow: auto;
  padding: 14px;
  border: 1px solid #83576966;
  border-radius: 14px;
  background: #fff8f4;
  box-shadow: 0 8px 28px #43253733;
}
#socialEditor fieldset {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  border: 1px solid #83576944;
}
#socialEditor label {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
#socialEditor input, #socialEditor button, #editSocial {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #83576977;
  border-radius: 7px;
  color: inherit;
  background: white;
  font: inherit;
}
#socialEditor button, #editSocial { cursor: pointer; }
.social-edit-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
@media (max-width: 680px) {
  #socialEditor { inset: auto 12px 12px; width: auto; max-height: 38dvh; }
}
