/* ==============================
   SHARE ALBUM CARD — Modal + Card
============================== */

/* ---- Overlay ---- */
.share-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.share-modal-overlay.open {
  display: flex;
}

/* ---- Modal panel ---- */
.share-modal {
  background: #111;
  border: 1px solid rgba(255, 105, 180, 0.18);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 105, 180, 0.08);
  display: flex;
  gap: 24px;
  max-height: 95vh;
  max-width: 1100px;
  width: 100%;
  overflow: hidden;
}

/* ---- Left: preview pane ---- */
.share-modal-preview {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #0a0a0a;
  border-right: 1px solid rgba(255, 105, 180, 0.1);
  align-self: stretch;
}

/* Wrapper — portrait (detailed): height-driven, 9:16 */
.share-card-preview-wrap {
  position: relative;
  height: calc(95vh - 40px);
  width: calc((95vh - 40px) * (1080 / 1920));
  overflow: visible;
  border-radius: 10px;
  flex-shrink: 0;
}
/* Landscape (quick): width-driven, 2:1 */
.share-card-preview-wrap.landscape {
  height: auto;
  width: min(calc((95vh - 40px) * (1080 / 1920) * 1.78), 480px);
  aspect-ratio: 2 / 1;
}

/* ---- Right: controls pane ---- */
.share-modal-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
  min-width: 0;
}

/* Scrollable middle section (everything between mode toggle and action buttons) */
.sc-controls-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sc-controls-scroll::-webkit-scrollbar {
  display: none;
}

.share-modal-controls h3 {
  color: #ff69b4;
  margin: 0 0 4px 0;
  font-size: 1.1rem;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.share-modal-header h2 {
  color: #fff;
  font-size: 1.15rem;
  margin: 0;
}
.share-modal-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.share-modal-close:hover {
  color: #fff;
  background: rgba(255, 105, 180, 0.12);
}

.share-ctrl-label {
  display: block;
  color: #aaa;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.share-ctrl-input {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid rgba(255, 105, 180, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  padding: 8px 10px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s;
}
.share-ctrl-input:focus {
  outline: none;
  border-color: rgba(255, 105, 180, 0.55);
}
.share-ctrl-textarea {
  resize: vertical;
  min-height: 72px;
}

/* Title font picker buttons */
.ssc-font-btn, .sac-font-btn, .ssc-ol-font-btn, .ssc-rv-font-btn, .sac-rv-font-btn {
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,105,180,0.25);
  background: rgba(255,105,180,0.06);
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.ssc-font-btn:hover, .sac-font-btn:hover, .ssc-ol-font-btn:hover, .ssc-rv-font-btn:hover, .sac-rv-font-btn:hover {
  border-color: rgba(255,105,180,0.5);
  color: rgba(255,255,255,0.8);
}
.ssc-font-btn.active, .sac-font-btn.active, .ssc-ol-font-btn.active, .ssc-rv-font-btn.active, .sac-rv-font-btn.active {
  border-color: #ff2d78;
  background: rgba(255,45,120,0.15);
  color: #ff2d78;
}

/* Tracklist score inputs in controls */
.share-track-list-wrap {
  position: relative;
}
.share-track-list-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(10,10,10,0.85));
  pointer-events: none;
  transition: opacity 0.3s;
  border-radius: 0 0 8px 8px;
}
.share-track-list-wrap.at-bottom::after { opacity: 0; }
.share-track-list-wrap::before {
  content: '';
  position: absolute;
  top: 5%; right: 0; width: 3px; bottom: 5%;
  background: linear-gradient(to bottom, transparent, rgba(255,105,180,0.4) 30%, rgba(255,105,180,0.4) 70%, transparent);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}
.share-track-list-scroll {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.share-track-list-scroll::-webkit-scrollbar { display: none; }
.share-track-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.share-track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.share-track-row:nth-child(odd) {
  background: rgba(255,255,255,0.035);
}
.share-track-row .track-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ccc;
  font-size: 0.85rem;
}
.share-track-row .track-score-badge {
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}

/* Action buttons — pinned at bottom, never scrolls */
.share-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 105, 180, 0.1);
}
.share-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.share-btn-download {
  background: #ff69b4;
  color: #000;
}
.share-btn-download:hover {
  box-shadow: 0 0 16px rgba(255, 105, 180, 0.6);
}
.share-btn-share {
  background: transparent;
  color: #ff69b4;
  border: 1px solid #ff69b4;
}
.share-btn-share:hover {
  background: rgba(255, 105, 180, 0.1);
  box-shadow: 0 0 12px rgba(255, 105, 180, 0.3);
}
.share-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Share dropdown menu */
.sc-share-wrap {
  flex: 1;
  position: relative;
}
.sc-share-wrap .share-btn-share {
  width: 100%;
}
.sc-share-menu {
  display: none;
  position: fixed;
  background: #161616;
  border: 1px solid rgba(255, 105, 180, 0.2);
  border-radius: 12px;
  overflow-y: auto;
  max-height: 70vh;
  z-index: 10000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  min-width: 220px;
}
.sc-share-menu.open {
  display: block;
}
.sc-share-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #ddd;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.sc-share-option:last-child {
  border-bottom: none;
}
.sc-share-option i {
  width: 18px;
  text-align: center;
  color: #ff69b4;
  font-size: 1rem;
  flex-shrink: 0;
}
.sc-share-option:hover {
  background: rgba(255, 105, 180, 0.08);
  color: #fff;
}


/* =============================================
   THE SHARE CARD (1080 x 1920)
   Scaled down 0.25x for preview
============================================= */

.share-card {
  width: 1080px;
  height: 1920px;
  background: #0a0a0a;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  padding: 60px 56px 48px;
  box-sizing: border-box;
  font-family: inherit;
  color: #fff;
  overflow: hidden;
  gap: 36px;

  /* Scale for preview — JS sets this dynamically to fill the wrap */
  transform-origin: top left;
  transform: scale(0.35);
  position: absolute;
  top: 0;
  left: 0;
}

/* Album detailed card is taller to accommodate long reviews + tracklist */
.share-card--album {
  height: 2600px;
}

/* Blurred cover background — detailed card */
.sc-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.3);
  transform: scale(1.1);
  opacity: 0.35;
  z-index: 0;
  border-radius: 40px;
}
.share-card > *:not(.sc-bg-blur) {
  position: relative;
  z-index: 1;
}

/* --- Custom title --- */
.sc-title {
  text-align: center;
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  min-height: 3.6rem;
  line-height: 1.15;
  word-break: break-word;
}
.sc-title:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.18);
}

/* --- Info pills --- */
.sc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.sc-pill {
  border: 2px solid #ff69b4;
  border-radius: 999px;
  padding: 10px 32px;
  color: #ff69b4;
  font-size: 1.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Cover + Score section --- */
.sc-cover-section {
  display: flex;
  gap: 0;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.sc-cover {
  width: 370px;
  height: 370px;
  border-radius: 20px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 105, 180, 0.25);
}
.sc-cover-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-shrink: 0;
  padding-right: 10px;
  padding-left: 24px;
  /* Width = circle (200px) + padding-left (24px) + padding-right (10px) = 234px */
}
.sc-overall-label {
  font-size: 1.6rem;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.sc-score-circle {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6));
  background: radial-gradient(circle at center, rgba(0,0,0,0.45) 40%, transparent 75%);
}
.sc-score-circle svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.sc-score-circle svg .ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 10;
}
.sc-score-circle svg .ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease, stroke 0.3s ease;
}
.sc-score-value {
  position: relative;
  z-index: 2;
  font-size: 3.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-align: center;
}
.sc-score-value .sc-score-sub {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: #aaa;
  margin-top: 2px;
}
.sc-rated-by {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-top: 10px;
  padding-left: 24px;
  min-width: 0;
}
.sc-rated-by-logo {
  width: 90px;
  height: 90px;
  border-radius: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}
.sc-rated-by-logo img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
.sc-rated-by-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.sc-rated-by-text .sc-rated-by-line {
  display: block;
  font-size: 2.2rem;
  color: #f5e6dc;
  white-space: nowrap;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  max-width: 100%;
  overflow: hidden;
}
.sc-rated-by-text strong {
  color: #ff2d78;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  display: inline;
}
.sc-rated-by-url {
  font-size: 1.2rem;
  color: #ff2d78;
  white-space: nowrap;
}

/* --- Rating scale bar --- */
.sc-scale-bar {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  /* Color peaks at each cell's midpoint (5%, 15%, … 95%) so text sits on its own color */
  background:
    linear-gradient(180deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.72) 100%),
    linear-gradient(90deg,
      #ff69b4  5%,
      #8a2be2 15%,
      #b57bee 25%,
      #4a90d9 35%,
      #81d4fa 45%,
      #f5cba7 55%,
      #e0c000 65%,
      #ff8c00 75%,
      #ff2a2a 85%,
      #8b0000 95%
    );
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.sc-scale-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 2px;
  background: none;
}
.sc-scale-cell:first-child {
  padding-left: 6px;
}
.sc-scale-cell:last-child {
  padding-right: 0;
}
.sc-scale-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.sc-scale-lbl {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 6px;
  opacity: 0.9;
  white-space: nowrap;
}

/* --- Two column layout --- */
.sc-columns {
  display: flex;
  gap: 36px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.sc-col-left {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sc-col-right {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sc-col-heading {
  font-size: 1.8rem;
  font-weight: 700;
  color: rgba(220, 210, 255, 0.85);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Tracklist --- */
.sc-tracklist-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sc-tracklist-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(10,10,10,0.6));
  pointer-events: none;
  transition: opacity 0.3s;
  border-radius: 0 0 8px 8px;
}
.sc-tracklist-wrap.at-bottom::after { opacity: 0; }
.sc-tracklist-wrap::before {
  content: '';
  position: absolute;
  top: 5%; right: 0; width: 4px; bottom: 5%;
  background: linear-gradient(to bottom, transparent, rgba(255,105,180,0.4) 30%, rgba(255,105,180,0.4) 70%, transparent);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}
.sc-tracklist-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sc-tracklist-scroll::-webkit-scrollbar { display: none; }
.sc-tracklist {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sc-track-row {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  gap: 10px;
}
.sc-track-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.04);
}
.sc-track-num {
  color: #ff69b4;
  font-size: calc(var(--sc-track-fs, 1.55rem) * 0.85);
  font-weight: 800;
  width: 36px;
  flex-shrink: 0;
  text-align: center;
  opacity: 0.75;
}
.sc-track-title {
  flex: 1;
  min-width: 0;
  font-size: var(--sc-track-fs, 1.55rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.95), 0 0 2px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}
.sc-track-score {
  font-size: calc(var(--sc-track-fs, 1.55rem) * 0.95);
  font-weight: 800;
  flex-shrink: 0;
  padding: 5px 18px;
  border-radius: 999px;
  border: 2px solid;
  background: rgba(0,0,0,0.55);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.sc-track-unrated {
  color: #555;
  font-size: var(--sc-track-fs, 1.55rem);
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}

/* density variants set by JS based on song count */
.sc-tracklist.density-medium { --sc-track-fs: 1.3rem; }
.sc-tracklist.density-high   { --sc-track-fs: 1.0rem; }
.sc-tracklist.density-max    { --sc-track-fs: 0.8rem; }

/* --- Review box --- */
.sc-review {
  flex: 1 1 0;
  min-height: 0;
  border: 1.5px solid rgba(255, 20, 120, 0.35);
  border-radius: 14px;
  padding: 32px 36px;
  background: rgba(220, 0, 100, 0.08);
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}
.sc-review::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(10,10,10,0.65));
  pointer-events: none;
  border-radius: 0 0 14px 14px;
}
.sc-review-text {
  font-size: 30px;
  line-height: 1.6;
  font-family: 'Lora', serif;
  font-style: italic;
  color: #ccc;
  word-break: break-word;
  white-space: pre-wrap;
  display: block;
  height: 100%;
  overflow: hidden;
}
.sc-review-placeholder {
  color: rgba(255,255,255,0.15);
}

/* --- Footer --- */
.sc-footer {
  display: flex;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sc-footer-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sc-footer-logo img {
  width: 260px;
  height: auto;
  object-fit: contain;
}
.sc-footer-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}
.sc-footer-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  padding: 0 28px;
  min-width: 0;
  font-family: 'ClashDisplay-Variable', 'Clash Display', sans-serif;
}
.sc-footer-stat + .sc-footer-stat {
  border-left: 1px solid rgba(255,255,255,0.1);
}
.sc-footer-stat-label {
  font-weight: 900;
  font-size: 1.95rem;
  white-space: nowrap;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.sc-footer-stat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
}
.sc-footer-track-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.75rem;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 280px;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  word-break: break-word;
}
.sc-footer-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.7rem;
  padding: 6px 22px;
  border-radius: 999px;
  border: 2px solid;
  background: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}


/* =============================================
   SONG SHARE CARD — Controls only
   (card itself reuses .share-card + .sc-* classes)
============================================= */

/* Score readonly display in controls panel */
.ssc-score-readonly {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 105, 180, 0.15);
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.ssc-score-tier-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid;
  margin-left: auto;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* =============================================
   MODE TOGGLE (Quick / Detailed)
============================================= */
.sc-mode-toggle {
  display: flex;
  gap: 0;
  background: #0d0d0d;
  border: 1px solid rgba(255, 105, 180, 0.2);
  border-radius: 10px;
  padding: 3px;
  flex-shrink: 0;
}
.sc-mode-btn {
  flex: 1;
  padding: 7px 0;
  border: none;
  background: transparent;
  color: #888;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.3px;
}
.sc-mode-btn.active {
  background: #ff69b4;
  color: #000;
}
.sc-mode-btn:not(.active):hover {
  background: rgba(255, 105, 180, 0.1);
  color: #ff69b4;
}

/* =============================================
   QUICK CARD (1080 x 540) — landscape
============================================= */
.share-card-quick {
  width: 1080px;
  height: 540px;
  background: #0a0a0a;
  border-radius: 28px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  box-sizing: border-box;
  font-family: inherit;
  color: #fff;
  overflow: hidden;

  /* Scale for preview — JS sets this dynamically */
  transform-origin: top left;
  transform: scale(0.35);
  position: absolute;
  top: 0;
  left: 0;
}

/* Blurred cover background */
.sqc-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.4);
  transform: scale(1.1);
  opacity: 0.45;
  z-index: 0;
  border-radius: 28px;
}
.share-card-quick > *:not(.sqc-bg-blur) {
  position: relative;
  z-index: 1;
}

/* Left column: cover image */
.sqc-cover {
  width: 420px;
  height: 420px;
  flex-shrink: 0;
  object-fit: cover;
  margin: 60px 0 60px 30px;
  border-radius: 18px;
}

/* Right column: all info */
.sqc-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 24px 32px 36px;
  gap: 0;
  min-width: 0;
  overflow: visible;
}

/* TOP: titles block */
.sqc-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* MIDDLE: branding left + score circle right */
.sqc-middle-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding-left: 0;
}

.sqc-middle-row .sqc-branding {
  margin-left: 0;
  flex: 1;
  min-width: 0;
}

.sqc-middle-row .sqc-score-wrap {
  position: static;
  transform: none;
  flex-shrink: 0;
  align-self: center;
}

/* BOTTOM: scale bar area */
.sqc-bottom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
}

/* Watermark branding — absolute bottom-right on quick card (song/album), aligned to info column */
.sqc-watermark {
  position: absolute !important;
  bottom: 22px;
  left: 550px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}
.sqc-watermark img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}
.sqc-watermark span {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.95);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.4);
}

/* Album/song name */
.sqc-album-name {
  font-size: 3.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.3px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Artist name */
.sqc-artist-name {
  font-size: 2.2rem;
  font-weight: 500;
  color: #aaa;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Year */
.sqc-year {
  font-size: 1.8rem;
  color: #888;
}

/* Score circle wrapper — absolutely positioned so it stays fully inside the card */
.sqc-score-wrap {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Score circle */
.sqc-score-circle {
  width: 160px !important;
  height: 160px !important;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6));
  background: radial-gradient(circle at center, rgba(0,0,0,0.65) 40%, transparent 75%);
}
.sqc-score-circle .sc-score-value {
  font-size: 3rem;
}
.sqc-score-circle .sc-score-sub {
  font-size: 1.1rem;
}

/* One-liner */
.sqc-oneliner {
  font-size: 2.1rem;
  font-family: 'Lora', serif;
  font-style: italic;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
  line-height: 1.4;
  word-break: break-word;
  margin-top: 18px;
  max-width: 100%;
  overflow: hidden;
}

/* Song quick card branding — override right offset so it centres */
.sqc-branding-footer {
  right: 0 !important;
}

/* Scale bar inside quick card */
.share-card-quick .sc-scale-bar {
  margin-top: 0;
}
.share-card-quick .sc-scale-cell {
  padding: 16px 4px;
}
.share-card-quick .sc-scale-num {
  font-size: 1.55rem;
}
.share-card-quick .sc-scale-lbl {
  font-size: 0.82rem;
  margin-top: 6px;
}
.share-card-quick .sc-scale-cell:first-child {
  padding-left: 4px;
}
.share-card-quick .sc-scale-cell:last-child {
  padding-right: 14px;
}

/* Branding strip */
.sqc-branding {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}
.sqc-logo {
  width: 68px !important;
  height: 68px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.sqc-logo img {
  width: 68px !important;
  height: 68px !important;
}
.sqc-branding-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 1.6rem;
  color: #f5e6dc;
  overflow: hidden;
  min-width: 0;
}
.sqc-branding-text > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 2.1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sqc-branding-text strong {
  color: #ff2d78;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.sqc-branding-text strong.sqc-username-long {
  font-size: 1.4rem;
}
.sqc-branding-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.sqc-url-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.sqc-branding-url {
  font-size: 1.1rem;
  color: #ff2d78;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 720px) {
  .share-modal {
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto;
  }
  .share-modal-preview {
    border-right: none;
    border-bottom: 1px solid rgba(255, 105, 180, 0.1);
    padding: 16px;
    align-items: center;
    overflow: hidden; /* guard against any child that still overflows */
  }
  /* Portrait preview: height-driven fallback */
  .share-card-preview-wrap {
    height: 340px;
    width: calc(340px * 0.5625);
  }
  /* Landscape preview: width-driven so it actually fits the modal.
     Available width = viewport - 16 (overlay) - 16 (overlay) - 16 (preview pad) - 16 (preview pad) = vw - 64. */
  .share-card-preview-wrap.landscape {
    height: auto;
    width: min(calc(100vw - 64px), 480px);
    aspect-ratio: 2 / 1;
  }
  .share-modal-controls {
    padding: 16px;
  }
}


/* =============================================
   PROFILE SHARE CARD
   Quick: 1080×540  |  Detailed: 1080×1920
============================================= */

/* ---- Shared card base ---- */
.spc-card {
  background: #0a0a0a;
  box-sizing: border-box;
  font-family: inherit;
  color: #fff;
  overflow: hidden;
  transform-origin: top left;
  position: absolute;
  top: 0; left: 0;
}

/* Blurred banner background */
.spc-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.3);
  transform: scale(1.1);
  opacity: 0.38;
  z-index: 0;
}
.spc-card > *:not(.spc-bg-blur) {
  position: relative;
  z-index: 1;
}

/* ---- QUICK card (1080×540, landscape) ---- */
.spc-quick {
  width: 1080px;
  height: 540px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
}
.spc-bg-blur { border-radius: 28px; }

/* Banner strip at top */
.spc-banner-strip {
  width: 100%;
  height: 190px;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Body: avatar + identity + stats + songs + branding in a row */
.spc-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  padding: 16px 48px 28px 38px;
  min-height: 0;
}

/* Avatar */
.spc-avatar-wrap {
  flex-shrink: 0;
  margin-top: -64px; /* overlap banner */
}
.spc-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  display: block;
  background-color: transparent;
}
.spc-avatar-default {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
}

/* Identity */
.spc-identity {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.spc-display-name {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spc-username {
  font-size: 1.35rem;
  color: #ff69b4;
  white-space: nowrap;
  margin-top: 6px;
}
.spc-join-date {
  font-size: 1.1rem;
  color: #666;
  white-space: nowrap;
}

/* Stats grid (2×2) */
.spc-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  flex-shrink: 0;
}
.spc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,105,180,0.06);
  border: 1px solid rgba(255,105,180,0.15);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 80px;
}
.spc-stat-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}
.spc-stat-lbl {
  font-size: 0.8rem;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
  white-space: nowrap;
}

/* Top songs column */
.spc-top-songs {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spc-section-label {
  font-size: 1rem;
  font-weight: 700;
  color: #ff69b4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.spc-song-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spc-song-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 7px;
  padding: 5px 8px;
}
.spc-song-thumb {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.05);
}
.spc-song-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.spc-song-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spc-song-artist {
  font-size: 0.75rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spc-song-score {
  font-size: 1rem;
  font-weight: 800;
  color: #ff69b4;
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}

/* Branding (bottom centre, watermark style) */
.spc-branding {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 80px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 2;
}
.spc-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.spc-brand-text {
  font-size: 1.6rem;
  color: rgba(255,45,120,0.8);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---- DETAILED card (1080×1920, portrait) ---- */
.spc-detailed {
  width: 1080px;
  height: 1920px;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.spc-detailed .spc-bg-blur { border-radius: 40px; }

/* Tall banner strip */
.spc-banner-tall {
  height: 320px !important;
}

/* Detailed card footer — logo + site link */
.spc-detail-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
  padding: 20px 0 20px;
  flex-shrink: 0;
}
.spc-detail-footer-logo {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border: none;
  background: transparent;
}
.spc-detail-footer-text {
  font-size: 2.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8), 0 0 14px rgba(0,0,0,0.4);
}

/* Avatar overlapping banner */
.spc-avatar-overlap {
  margin-top: -80px;
  padding-left: 80px;
  flex-shrink: 0;
}
.spc-avatar-lg {
  width: 180px !important;
  height: 180px !important;
  border: 4px solid rgba(255,255,255,0.15) !important;
  font-size: 3.8rem !important;
  background-color: transparent !important;
}

/* Identity block in detailed */
.spc-identity-detail {
  padding: 20px 80px 0;
}
.spc-display-name-lg {
  font-size: 3.6rem !important;
}
.spc-username-lg {
  font-size: 2.2rem !important;
}
.spc-join-date-lg {
  font-size: 1.8rem !important;
  margin-top: 4px;
}

/* Custom title slot */
.spc-custom-title {
  margin: 20px 80px 0;
}

/* Stats grid in detailed — bigger */
.spc-stats-grid-lg {
  margin: 24px 80px 0;
  grid-template-columns: 1fr 1fr;
  gap: 16px !important;
}
.spc-stat-lg {
  padding: 16px 20px !important;
  border-radius: 14px !important;
}
.spc-stat-lg .spc-stat-val {
  font-size: 2.4rem !important;
}
.spc-stat-lg .spc-stat-lbl {
  font-size: 1.05rem !important;
  margin-top: 4px;
}

/* Top songs in detailed */
.spc-top-songs-lg {
  margin: 28px 80px 0;
  flex: none !important;
}
.spc-section-label-lg {
  font-size: 1.4rem !important;
  margin-bottom: 12px !important;
}
.spc-song-list-lg { gap: 14px !important; }
.spc-song-row-lg {
  padding: 16px 24px !important;
  border-radius: 14px !important;
  gap: 20px !important;
}
.spc-song-thumb-lg {
  width: 84px !important;
  height: 84px !important;
  border-radius: 10px !important;
}
.spc-song-title-lg { font-size: 1.9rem !important; }
.spc-song-artist-lg { font-size: 1.4rem !important; }
.spc-song-score-lg {
  font-size: 2.2rem !important;
  min-width: 64px !important;
}

/* Scale bar inside detailed profile card */
.spc-detailed .sc-scale-bar {
  margin: 56px 80px 0;
}

/* Controls layout helpers */
.spc-ctrl-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  margin: 0 0 14px;
}
.spc-ctrl-section {
  margin-bottom: 16px;
}
.spc-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.84rem;
  margin-top: 6px;
}
.spc-vis-btn {
  background: none;
  border: 1px solid rgba(255,105,180,0.3);
  color: #ff69b4;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.spc-vis-btn:hover {
  background: rgba(255,105,180,0.1);
  border-color: rgba(255,105,180,0.5);
}

/* Stat toggle rows in controls */
.spc-stat-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.84rem;
  cursor: pointer;
  user-select: none;
}
.spc-toggle-row:hover {
  background: rgba(255,255,255,0.06);
}
/* Hide the real checkbox — use custom toggle */
.spc-toggle-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
/* Custom toggle track */
.spc-toggle-row .spc-sw-track {
  width: 42px;
  height: 24px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  flex-shrink: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.spc-toggle-row .spc-sw-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), background 0.25s ease, box-shadow 0.25s ease;
}
.spc-toggle-row input:checked ~ .spc-sw-track {
  background: #c2185b;
  border-color: #e91e8c;
}
.spc-toggle-row input:checked ~ .spc-sw-track .spc-sw-thumb {
  transform: translateX(18px);
  background: #fff;
  box-shadow: 0 0 6px rgba(255,105,180,0.5);
}
