/* =====================================================================================
   Migs Space – Sozial (game/social.js) · V30
   Topbar-Knopf (.chip-social, in #ui) + Panel (.soc-root) + Einladungs-Karten (.soc-cards) – beide am body.
   Body-Overlays bekommen den Zoom von #ui per JS (style.zoom + --soc-z), damit sie auf 2K/4K/5K nicht schrumpfen.
   ===================================================================================== */

/* ---------- Topbar-Knopf ---------- */
.chip-social {
  position: relative;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: inherit;
  gap: 7px;
  transition: background .15s, border-color .2s, box-shadow .2s;
}
.chip-social:hover { background: rgba(255, 255, 255, .13); border-color: rgba(79, 227, 255, .35); }
.chip-social.open { background: rgba(79, 227, 255, .16); border-color: rgba(79, 227, 255, .55); box-shadow: 0 0 16px rgba(79, 227, 255, .25); }
.chip-social .soc-ico { font-size: 1.05em; filter: drop-shadow(0 0 6px rgba(79, 227, 255, .55)); }
.chip-social .soc-on {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #06301a; background: var(--green, #5dff9e); box-shadow: 0 0 10px rgba(93, 255, 158, .55);
}
.chip-social .soc-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 2px solid #120f26;
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--pink, #ff4fd8); box-shadow: 0 0 12px rgba(255, 79, 216, .8);
  animation: socPulse 1.6s ease-in-out infinite;
}
.chip-social.has-new { border-color: rgba(255, 79, 216, .55); }
.chip-social [hidden] { display: none !important; }
@keyframes socPulse { 50% { transform: scale(1.14); } }
/* schmal/Handy: runder Icon-Knopf; „Freunde online“ nur als grüner Punkt (die Leiste ist bis ~760 px schon voll) */
@media (max-width: 760px) {
  .chip-social .soc-lbl { display: none; }
  .chip-social { width: 36px; padding: 0; justify-content: center; flex: none; }
  .chip-social .soc-on { position: absolute; right: -2px; bottom: -2px; min-width: 0; width: 12px; height: 12px; padding: 0; font-size: 0; border: 2px solid #120f26; }
}
@media (prefers-reduced-motion: reduce) { .chip-social .soc-badge { animation: none; } }

/* ---------- Panel ---------- */
.soc-root {
  --soc-z: 1;
  position: fixed;
  inset: 0;
  z-index: 1050;               /* über .mym-overlay (1000) */
  pointer-events: none;
  font-family: var(--font, 'Fredoka', system-ui, sans-serif);
  color: var(--text, #f4f1ff);
}
.soc-root[hidden] { display: none !important; }
.soc-root *, .soc-root *::before, .soc-root *::after { box-sizing: border-box; }
.soc-root [hidden] { display: none !important; }
.soc-root button { font: inherit; color: inherit; }
.soc-scrim { position: absolute; inset: 0; background: rgba(6, 4, 16, .55); opacity: 0; transition: opacity .2s; display: none; }
.soc-panel {
  position: absolute;
  top: calc(var(--tb-h, 64px) + var(--safe-t, 0px) + 2px);
  right: calc(12px + var(--safe-r, 0px));
  width: 430px;
  max-width: calc(100vw / var(--soc-z) - 24px);
  max-height: calc(100vh / var(--soc-z) - var(--tb-h, 64px) - var(--safe-t, 0px) - 20px);
  max-height: calc(100dvh / var(--soc-z) - var(--tb-h, 64px) - var(--safe-t, 0px) - 20px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(79, 227, 255, .22);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(255, 79, 216, .12), transparent 60%),
    radial-gradient(100% 50% at 0% 0%, rgba(79, 227, 255, .12), transparent 55%),
    rgba(22, 18, 50, .97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-10px) scale(.97);
  transform-origin: top right;
  transition: opacity .18s ease, transform .22s var(--ease-back, cubic-bezier(.34, 1.56, .64, 1));
}
.soc-root.on .soc-panel { opacity: 1; transform: none; }
.soc-root.on .soc-scrim { opacity: 1; }
/* ab 2K etwas breiter (der Zoom vergrößert ohnehin) */
@media (min-width: 1900px) { .soc-panel { width: 460px; } }

.soc-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; }
.soc-ttl { display: flex; align-items: center; gap: 8px; font-size: 21px; letter-spacing: .01em; margin-right: auto; }
.soc-ttl-ico { font-size: 22px; filter: drop-shadow(0 0 8px rgba(79, 227, 255, .6)); }
.soc-mycode {
  display: inline-flex; align-items: baseline; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px dashed rgba(79, 227, 255, .45); background: rgba(79, 227, 255, .08);
  cursor: pointer; white-space: nowrap; line-height: 32px;
}
.soc-mycode:hover { background: rgba(79, 227, 255, .16); }
.soc-mc-l { font-size: 11px; color: var(--muted, #a49fcf); text-transform: uppercase; letter-spacing: .06em; }
.soc-mycode b { font-size: 15px; letter-spacing: .08em; color: var(--cyan, #4fe3ff); }
.soc-x {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  border: 1px solid var(--line, rgba(255, 255, 255, .09)); background: rgba(255, 255, 255, .06);
  cursor: pointer; font-size: 15px;
}
.soc-x:hover { background: rgba(255, 255, 255, .14); }

.soc-lobbybar {
  display: flex; align-items: center; gap: 10px;
  margin: 0 14px 10px; padding: 10px 10px 10px 12px; border-radius: 16px;
  background: linear-gradient(100deg, rgba(255, 79, 216, .2), rgba(79, 227, 255, .12));
  border: 1px solid rgba(255, 79, 216, .3);
}
.soc-lb-ico { font-size: 24px; }
.soc-lb-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.soc-lb-t b { font-size: 15px; }
.soc-lb-t span { font-size: 12.5px; color: var(--muted, #a49fcf); }

.soc-tabs { display: flex; gap: 6px; padding: 0 14px 10px; }
.soc-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--line, rgba(255, 255, 255, .09)); background: rgba(255, 255, 255, .04);
  font-weight: 600; font-size: 14.5px; color: var(--muted, #a49fcf);
  transition: background .15s, color .15s, border-color .15s;
}
.soc-tab:hover { background: rgba(255, 255, 255, .09); color: var(--text, #fff); }
.soc-tab.on { background: rgba(79, 227, 255, .14); border-color: rgba(79, 227, 255, .45); color: var(--text, #fff); }
.soc-tab-n { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.soc-tab.hot .soc-tab-n { background: var(--pink, #ff4fd8); color: #fff; box-shadow: 0 0 10px rgba(255, 79, 216, .6); }

.soc-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 10px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.soc-view { display: flex; flex-direction: column; gap: 6px; }
.soc-sec { margin: 8px 6px 2px; font-size: 12px; font-weight: 700; color: var(--muted, #a49fcf); text-transform: uppercase; letter-spacing: .08em; }
.soc-hint { padding: 8px 8px; font-size: 13.5px; color: var(--muted, #a49fcf); line-height: 1.35; }

/* Zeilen */
.soc-row {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 8px 8px 8px 8px; border-radius: 16px;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .05);
}
.soc-row:hover { background: rgba(255, 255, 255, .06); }
.soc-row.off { opacity: .62; }
.soc-row.off:hover { opacity: .85; }
.soc-av { position: relative; flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(79, 227, 255, .18), rgba(0, 0, 0, .25)); }
.soc-av canvas { width: 100% !important; height: 100% !important; display: block; }
.soc-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid #1a1640; background: #6b678f; }
.soc-row.on .soc-dot { background: var(--green, #5dff9e); box-shadow: 0 0 8px rgba(93, 255, 158, .8); }
.soc-row.on.away .soc-dot { background: var(--yellow, #ffd23f); box-shadow: 0 0 8px rgba(255, 210, 63, .6); }
.soc-tx { flex: 1 1 120px; min-width: 0; display: flex; flex-direction: column; line-height: 1.22; }
.soc-name { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-st { font-size: 12.5px; color: var(--muted, #a49fcf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-row.on .soc-st { color: #9ff5c4; }
.soc-row.on.away .soc-st { color: #f1dc8f; }
.soc-acts { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.soc-tag { font-size: 12.5px; color: var(--muted, #a49fcf); padding: 0 6px; white-space: nowrap; }
.soc-more {
  width: 34px; height: 34px; border-radius: 11px; flex: none; cursor: pointer;
  border: 1px solid var(--line, rgba(255, 255, 255, .09)); background: rgba(255, 255, 255, .05); font-size: 16px; line-height: 1;
}
.soc-more:hover { background: rgba(255, 255, 255, .12); }
.soc-more-red:hover { background: rgba(255, 84, 112, .25); }
.soc-menu {
  flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 2px 2px 50px; border-top: 1px dashed rgba(255, 255, 255, .1);
}
.soc-menu-code { font-size: 12px; color: var(--muted, #a49fcf); margin-right: auto; }
.soc-invrow { background: linear-gradient(100deg, rgba(255, 79, 216, .18), rgba(255, 210, 63, .08)); border-color: rgba(255, 79, 216, .35); }

/* Knöpfe (wie .btn, nur kompakter) */
.soc-btn {
  --b1: #4b4580; --b2: #352f66; --bd: #1f1a45; --bt: var(--text, #fff);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 6px 16px; border: 0; border-radius: 13px; cursor: pointer;
  background: linear-gradient(180deg, var(--b1), var(--b2)); color: var(--bt) !important;
  font-weight: 600; font-size: 15px; line-height: 1.1; white-space: nowrap;
  box-shadow: 0 4px 0 var(--bd), 0 8px 16px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .22);
  transition: translate .08s, box-shadow .08s, filter .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.soc-btn:hover { filter: brightness(1.1); }
.soc-btn:active { translate: 0 3px; box-shadow: 0 1px 0 var(--bd), 0 4px 10px rgba(0, 0, 0, .3); }
.soc-btn:disabled { filter: saturate(.4) brightness(.85); cursor: default; translate: none; }
.soc-btn-s { min-height: 34px; padding: 4px 12px; font-size: 13.5px; border-radius: 11px; box-shadow: 0 3px 0 var(--bd), inset 0 2px 0 rgba(255, 255, 255, .2); }
.soc-btn-l { min-height: 50px; padding: 10px 26px; font-size: 17px; }
.soc-b-play { --b1: #ffe066; --b2: #ffad1f; --bd: #b5650a; --bt: #2a1400; }
.soc-b-cyan { --b1: #7cecff; --b2: #23b6e0; --bd: #0f6f8f; --bt: #04202c; }
.soc-b-pink { --b1: #ff86e6; --b2: #e632bf; --bd: #8a1673; --bt: #fff; }
.soc-b-ghost { --b1: #3a3570; --b2: #2b2658; --bd: #17143a; }
.soc-b-red { --b1: #ff7d92; --b2: #e2385a; --bd: #8a1730; --bt: #fff; }

/* leere Zustände, Laden */
.soc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 16px 16px; }
.soc-empty .soc-av { width: 72px; height: 72px; }
.soc-empty b { font-size: 17px; }
.soc-empty p { margin: 0; font-size: 13.5px; color: var(--muted, #a49fcf); line-height: 1.4; max-width: 300px; }
.soc-empty-ico { font-size: 40px; }
.soc-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: var(--muted, #a49fcf); font-size: 14px; }
.soc-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(79, 227, 255, .25); border-top-color: var(--cyan, #4fe3ff); animation: socSpin .8s linear infinite; }
@keyframes socSpin { to { transform: rotate(360deg); } }

/* Hinzufügen */
.soc-codecard {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 4px 4px 8px; padding: 14px 12px; border-radius: 18px;
  background: linear-gradient(140deg, rgba(79, 227, 255, .14), rgba(255, 79, 216, .1));
  border: 1px solid rgba(79, 227, 255, .25);
}
.soc-cc-l { font-size: 12px; color: var(--muted, #a49fcf); text-transform: uppercase; letter-spacing: .08em; }
.soc-cc-code { font-size: 30px; letter-spacing: .14em; color: #fff; text-shadow: 0 0 18px rgba(79, 227, 255, .6); }
.soc-cc-row { display: flex; gap: 8px; margin-top: 4px; }
.soc-search { display: flex; gap: 8px; margin: 0 4px; }
.soc-input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .28); color: var(--text, #fff);
  font: 500 16px var(--font, sans-serif); outline: none;
}
.soc-input:focus { border-color: rgba(79, 227, 255, .6); box-shadow: 0 0 0 3px rgba(79, 227, 255, .15); }
.soc-search .soc-btn { min-height: 44px; }
.soc-results { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.soc-opt { display: flex; align-items: center; gap: 10px; margin: 10px 6px 2px; font-size: 13.5px; color: var(--muted, #a49fcf); cursor: pointer; }
.soc-opt input { width: 18px; height: 18px; accent-color: var(--cyan, #4fe3ff); flex: none; }

/* Gast */
.soc-guest { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 10px 24px 26px; }
.soc-guest-art { position: relative; }
.soc-guest-art .soc-av { width: 88px; height: 88px; }
.soc-guest-heart { position: absolute; right: -10px; top: -4px; font-size: 26px; animation: socFloat 2.4s ease-in-out infinite; }
@keyframes socFloat { 50% { transform: translateY(-5px) rotate(8deg); } }
.soc-guest-t { font-size: 19px; }
.soc-guest-p { margin: 0; font-size: 14px; color: var(--muted, #a49fcf); line-height: 1.45; max-width: 330px; }

/* Handy: Blatt über die ganze Breite, Hintergrund abdunkeln */
@media (max-width: 640px) {
  .soc-scrim { display: block; pointer-events: auto; }
  .soc-panel {
    left: calc(8px + var(--safe-l, 0px)); right: calc(8px + var(--safe-r, 0px)); width: auto; max-width: none;
    max-height: calc(100vh - var(--tb-h, 58px) - var(--safe-t, 0px) - var(--safe-b, 0px) - 14px);
    max-height: calc(100dvh - var(--tb-h, 58px) - var(--safe-t, 0px) - var(--safe-b, 0px) - 14px);
    border-radius: 20px;
    transform-origin: top center;
  }
  .soc-head { padding: 12px 10px 8px 14px; gap: 8px; }
  .soc-ttl { font-size: 19px; }
  .soc-mc-l { display: none; }
  .soc-tabs { padding: 0 10px 8px; gap: 5px; }
  .soc-tab { font-size: 13.5px; height: 36px; padding: 0 4px; }
  .soc-body { padding: 2px 6px 12px; }
  .soc-lobbybar { margin: 0 10px 8px; }
  .soc-row { gap: 8px; padding: 7px; }
  .soc-btn-s { padding: 4px 10px; }
  .soc-menu { padding-left: 6px; }
}
@media (max-width: 380px) {
  .soc-tab-l { font-size: 12.5px; }
  .soc-name { font-size: 14.5px; }
  .soc-cc-code { font-size: 26px; }
}

/* ---------- Einladungs-Karten (über allem) ---------- */
.soc-cards {
  --soc-z: 1;
  position: fixed;
  top: calc(var(--tb-h, 64px) + var(--safe-t, 0px) + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1150;
  display: flex; flex-direction: column; gap: 8px;
  width: min(480px, calc(100vw / var(--soc-z) - 20px));
  pointer-events: none;
  font-family: var(--font, 'Fredoka', system-ui, sans-serif);
  color: var(--text, #f4f1ff);
}
.soc-cards *, .soc-cards *::before, .soc-cards *::after { box-sizing: border-box; }
.soc-cards button { font: inherit; color: inherit; }
body.state-playing .soc-cards { top: calc(10px + var(--safe-t, 0px)); }
/* Sozial-Fenster offen: Karte nicht über dessen Kopf legen – links daneben; schmal (Fenster füllt fast alles) ausblenden,
   die Einladung steht dann ganz oben in der Freunde-Liste */
body.soc-open .soc-cards { left: calc(12px + var(--safe-l, 0px)); transform: none; width: min(480px, calc(100vw / var(--soc-z) - 500px)); }
@media (max-width: 1000px) { body.soc-open .soc-cards { display: none; } }
.soc-card {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 12px 14px 14px; border-radius: 20px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 79, 216, .3), transparent 60%),
    rgba(26, 20, 58, .97);
  border: 1px solid rgba(255, 79, 216, .5);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55), 0 0 30px rgba(255, 79, 216, .25);
  pointer-events: auto;
  animation: socCardIn .45s var(--ease-back, cubic-bezier(.34, 1.56, .64, 1));
}
.soc-card.out { animation: socCardOut .3s ease forwards; }
.soc-card .soc-av { width: 52px; height: 52px; }
.soc-card-env { position: absolute; right: -8px; bottom: -6px; font-size: 22px; animation: socFloat 1.8s ease-in-out infinite; }
.soc-card-tx { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.soc-card-tx b { font-size: 16px; }
.soc-card-tx span { font-size: 13px; color: #f3c9ec; }
.soc-card-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.soc-card-x {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex: none;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); font-size: 14px;
}
.soc-card-x:hover { background: rgba(255, 84, 112, .3); }
.soc-card-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--pink, #ff4fd8), var(--yellow, #ffd23f));
  transform-origin: left center;
  animation: socBar linear forwards;
}
@keyframes socBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes socCardIn { from { opacity: 0; transform: translateY(-18px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes socCardOut { to { opacity: 0; transform: translateY(-12px) scale(.95); } }
@media (max-width: 480px) {
  .soc-card { gap: 10px; padding: 10px 10px 12px; }
  .soc-card-acts { flex: 1 0 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .soc-card, .soc-card.out, .soc-card-env, .soc-guest-heart { animation: none; }
  .soc-panel { transition: opacity .15s; transform: none; }
}

/* Verschieben am Kopf (social.js dragStart) – nur ab 641 px; Position wird gemerkt */
@media (min-width: 641px) {
  .soc-head.soc-drag { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
  .soc-head.soc-drag button { cursor: pointer; }
  .soc-panel.soc-dragging { transition: none; box-shadow: 0 30px 80px rgba(0, 0, 0, .65), 0 0 0 2px rgba(79, 227, 255, .45); }
  .soc-panel.soc-dragging .soc-head { cursor: grabbing; }
}

/* Reiter „Crew“ (social.js renderCrew) */
.soc-crew { --cc: #ffd23f; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 12px 14px; }
.soc-crew-emb { font-size: 44px; line-height: 1; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--cc) 35%, transparent), rgba(255, 255, 255, .04) 70%);
  box-shadow: 0 0 26px color-mix(in srgb, var(--cc) 40%, transparent); }
.soc-crew-name { font-size: 20px; color: #fff; }
.soc-crew-sub { font-size: 14px; color: var(--cc); font-weight: 700; }
.soc-crew-txt { margin: 2px 0 6px; font-size: 14px; color: var(--muted, #b9b3d9); max-width: 34ch; line-height: 1.4; }

/* ---------- V35: Favoriten (★ am Namen, eigener Block ganz oben) ---------- */
.soc-nmrow { display: flex; align-items: center; gap: 2px; min-width: 0; }
.soc-nmrow .soc-name { min-width: 0; }
.soc-star {
  flex: none; width: 28px; height: 28px; margin: -5px 0 -5px 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: none; cursor: pointer;
  font-size: 17px; line-height: 1; color: rgba(255, 255, 255, .34) !important;
  transition: color .15s, background .15s, transform .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.soc-star:hover { color: var(--yellow, #ffd23f) !important; background: rgba(255, 210, 63, .12); }
.soc-star:active { transform: scale(.85); }
.soc-star.on { color: var(--yellow, #ffd23f) !important; text-shadow: 0 0 10px rgba(255, 210, 63, .7); }
.soc-star:disabled { cursor: default; }
.soc-row.fav { border-color: rgba(255, 210, 63, .16); background: linear-gradient(100deg, rgba(255, 210, 63, .07), rgba(255, 255, 255, .03) 60%); }
.soc-row.fav:hover { background: linear-gradient(100deg, rgba(255, 210, 63, .1), rgba(255, 255, 255, .055) 60%); }
.soc-sec-fav { display: flex; align-items: center; gap: 6px; color: #f1dc8f; }
.soc-sec-star { color: var(--yellow, #ffd23f); font-size: 13px; text-shadow: 0 0 8px rgba(255, 210, 63, .6); }
.soc-favsep { height: 1px; margin: 6px 10px 0; background: linear-gradient(90deg, transparent, rgba(255, 210, 63, .28), transparent); }

/* ---------- V35: Favoriten-Meldung (7 s) – in der Leiste neben Level/Münzen, schmal darunter, sonst oben mittig ---------- */
.soc-fx {
  --soc-z: 1;
  position: fixed;
  z-index: 1160;
  top: calc(10px + var(--safe-t, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100vw / var(--soc-z) - 20px));
  pointer-events: none;
  font-family: var(--font, 'Fredoka', system-ui, sans-serif);
  color: var(--text, #f4f1ff);
}
.soc-fx *, .soc-fx *::before, .soc-fx *::after { box-sizing: border-box; }
.soc-fx button { font: inherit; color: inherit; }
.soc-fx[data-at="bar"] { transform: translateY(-50%); }            /* left/top/width setzt social.js fxPlace() */
.soc-fx[data-at="below"] { left: calc(12px + var(--safe-l, 0px)); transform: none; }
@media (max-width: 640px) {
  .soc-fx[data-at="below"], .soc-fx[data-at="edge"] { left: calc(8px + var(--safe-l, 0px)); transform: none; width: calc(100vw / var(--soc-z) - 16px - var(--safe-l, 0px) - var(--safe-r, 0px)); }
}
.soc-fxc {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 5px 8px 6px 6px; border-radius: 18px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(79, 227, 255, .16), transparent 60%),
    radial-gradient(100% 120% at 100% 0%, rgba(255, 79, 216, .12), transparent 55%),
    rgba(22, 18, 50, .97);
  border: 1px solid rgba(79, 227, 255, .38);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 22px rgba(79, 227, 255, .16), inset 0 1px 0 rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  pointer-events: auto;
  animation: socFxIn .42s var(--ease-back, cubic-bezier(.34, 1.56, .64, 1));
}
.soc-fxc:hover { filter: brightness(1.08); }
.soc-fxc.out { animation: socCardOut .3s ease forwards; pointer-events: none; }
/* Gewinne (Runde, Level, Erfolg, Teil) in Gold */
.soc-fx-win, .soc-fx-lvl, .soc-fx-ach, .soc-fx-item {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 210, 63, .2), transparent 60%),
    radial-gradient(100% 120% at 100% 0%, rgba(255, 79, 216, .12), transparent 55%),
    rgba(26, 20, 50, .97);
  border-color: rgba(255, 210, 63, .5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 24px rgba(255, 210, 63, .2), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.soc-fxc .soc-av { width: 38px; height: 38px; }
.soc-fx-star {
  position: absolute; right: -5px; top: -6px; font-size: 15px; line-height: 1;
  color: var(--yellow, #ffd23f); text-shadow: 0 0 6px rgba(255, 210, 63, .9), 0 1px 1px rgba(0, 0, 0, .8);
}
.soc-fx-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.22; }
.soc-fx-tx b { font-size: 14.5px; font-weight: 600; }
.soc-fx-tx span { font-size: 12px; color: var(--muted, #a49fcf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-fx[data-at="bar"] .soc-fx-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-fx-x {
  flex: none; width: 26px; height: 26px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); font-size: 11px; line-height: 1; opacity: .75;
}
.soc-fx-x:hover { opacity: 1; background: rgba(255, 255, 255, .14); }
.soc-fx-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--cyan, #4fe3ff), var(--pink, #ff4fd8));
  transform-origin: left center;
  animation: socBar linear forwards;
}
.soc-fx-win .soc-fx-bar, .soc-fx-lvl .soc-fx-bar, .soc-fx-ach .soc-fx-bar, .soc-fx-item .soc-fx-bar { background: linear-gradient(90deg, var(--yellow, #ffd23f), var(--pink, #ff4fd8)); }
.soc-fxc.hold .soc-fx-bar { animation-play-state: paused; }
@keyframes socFxIn { from { opacity: 0; transform: translateY(-10px) scale(.94); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) { .soc-fx-tx b { font-size: 13.5px; } }
@media (prefers-reduced-motion: reduce) { .soc-fxc, .soc-fxc.out { animation: none; } }

/* =====================================================================================
   V37 (F): Freundes-Level (Herz-Abzeichen + Fortschritt), Tauschen (Knopf, Zeile, Karte), Level-Aufstieg
   ===================================================================================== */
.soc-heart {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  height: 20px; margin-left: 4px; padding: 0 7px 0 5px; border-radius: 999px;
  font-size: 11.5px; line-height: 1; color: #fff; cursor: default;
  background: linear-gradient(180deg, #ff86c8, #e0337f);
  box-shadow: 0 0 10px rgba(255, 79, 160, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.soc-heart i { font-style: normal; font-size: 11px; }
.soc-heart b { font-size: 11.5px; font-weight: 700; }
.soc-heart.lv-1 { background: linear-gradient(180deg, #8a7fb8, #5d528f); box-shadow: none; }
.soc-heart.lv-2 { background: linear-gradient(180deg, #ff9fd2, #d1508f); }
.soc-heart.lv-4 { background: linear-gradient(180deg, #ff6fb5, #c21a68); box-shadow: 0 0 12px rgba(255, 60, 150, .6); }
.soc-heart.lv-5 { background: linear-gradient(180deg, #ffe066, #ff6fb5); color: #3a0a22; box-shadow: 0 0 14px rgba(255, 210, 63, .7); }
.soc-bond { display: flex; align-items: center; gap: 7px; margin-top: 3px; min-width: 0; }
.soc-bond-bar {
  position: relative; flex: none; width: 54px; height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .1);
}
.soc-bond-bar::after {
  content: ''; position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #ff86c8, #ff4fa0); border-radius: inherit;
}
.soc-bond.lv-5 .soc-bond-bar::after { background: linear-gradient(90deg, #ffe066, #ff6fb5); }
.soc-bond em { font-style: normal; font-size: 11.5px; color: var(--muted, #a49fcf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc-trade { font-size: 15px; }
.soc-trade:hover { background: rgba(255, 210, 63, .2); border-color: rgba(255, 210, 63, .5); }
.soc-b-gold { --b1: #fff1a8; --b2: #ffc531; --bd: #a87400; --bt: #3a2400; }
.soc-traderow { background: linear-gradient(100deg, rgba(255, 210, 63, .16), rgba(79, 227, 255, .08)); border-color: rgba(255, 210, 63, .35); }
.soc-card-trade {
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 210, 63, .28), transparent 60%), rgba(26, 20, 58, .97);
  border-color: rgba(255, 210, 63, .55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55), 0 0 30px rgba(255, 210, 63, .22);
}
.soc-card-trade .soc-card-tx span { color: #f6e7b0; }
.soc-card-trade .soc-card-bar { background: linear-gradient(90deg, var(--yellow, #ffd23f), var(--cyan, #4fe3ff)); }

/* Level-Aufstieg (Body-Overlay, Zoom per JS wie das Sozial-Fenster) */
.soc-lvup {
  position: fixed; inset: 0; z-index: 1080;
  display: grid; place-items: center; padding: 16px;
  background: radial-gradient(60% 50% at 50% 45%, rgba(255, 79, 160, .28), transparent 70%), rgba(8, 5, 20, .62);
  font-family: var(--font, 'Fredoka', system-ui, sans-serif); color: var(--text, #f4f1ff);
  animation: socLvIn .35s ease both; overflow: hidden;
}
.soc-lvup.out { animation: socLvOut .35s ease forwards; }
.soc-lvup-card {
  position: relative; z-index: 1;
  width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 22px 22px 20px; border-radius: 26px;
  background: linear-gradient(180deg, #33205e, #1c1442);
  border: 2px solid rgba(255, 120, 190, .65);
  box-shadow: 0 0 50px rgba(255, 79, 160, .45), 0 30px 60px rgba(0, 0, 0, .5);
  animation: socLvPop .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
.soc-lvup-art { display: flex; align-items: center; justify-content: center; gap: 8px; }
.soc-lvup-art .soc-av { width: 84px; height: 84px; }
.soc-lvup-heart {
  position: relative; width: 84px; height: 84px; display: grid; place-items: center;
  animation: socLvBeat 1s ease-in-out .5s infinite;
}
.soc-lvup-heart span { font-size: 84px; line-height: 1; color: #ff4fa0; filter: drop-shadow(0 0 18px rgba(255, 79, 160, .85)); }
.soc-lvup.lv-5 .soc-lvup-heart span { color: #ffd23f; filter: drop-shadow(0 0 18px rgba(255, 210, 63, .9)); }
.soc-lvup-heart b { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%); font-size: 30px; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.soc-lvup-k { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff9fd2; }
.soc-lvup-t { font-size: 25px; line-height: 1.15; }
.soc-lvup-p { margin: 0 0 4px; font-size: 15px; color: var(--muted, #a49fcf); line-height: 1.4; max-width: 330px; }
.soc-lvup-h { position: absolute; bottom: -40px; color: #ff6fb5; font-style: normal; opacity: .85; animation: socLvRise 3.4s ease-in forwards; pointer-events: none; }
.soc-lvup.lv-5 .soc-lvup-h:nth-child(odd) { color: #ffd23f; }
@keyframes socLvIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes socLvOut { to { opacity: 0; } }
@keyframes socLvPop { 0% { opacity: 0; transform: scale(.6) translateY(20px); } 100% { opacity: 1; transform: none; } }
@keyframes socLvBeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.16); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
@keyframes socLvRise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-110vh) scale(1.2) rotate(20deg); opacity: 0; } }
@media (max-width: 640px) {
  .soc-bond-bar { width: 40px; }
  .soc-bond em { font-size: 11px; }
  .soc-lvup-art .soc-av, .soc-lvup-heart { width: 64px; height: 64px; }
  .soc-lvup-heart span { font-size: 64px; }
  .soc-lvup-heart b { font-size: 24px; }
  .soc-lvup-t { font-size: 21px; }
}
@media (max-width: 380px) {
  .soc-heart { padding: 0 5px 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .soc-lvup, .soc-lvup.out, .soc-lvup-card, .soc-lvup-heart { animation: none; }
  .soc-lvup-h { display: none; }
}
