/* Server-backed profile collection. It inherits the Hall's club materials;
   match emoji are real platform glyphs inside restrained KOTT surfaces. */
.profile-social {
  --social-line: rgba(216, 174, 76, .24);
  --social-gold: #dec06f;
  --social-ink: #050d09;
  display: grid;
  gap: 14px;
  isolation: isolate;
  min-width: 0;
}

.profile-fullscreen .profile-tab-panel:has(> .profile-social) { padding-top: 0; }
.profile-fullscreen .profile-social-head { margin-top: clamp(14px, 2vw, 26px); }

.profile-social-head {
  display: flex;
  min-width: 0;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  padding: 16px 18px;
  background:
    linear-gradient(105deg, rgba(23, 61, 43, .52), rgba(4, 17, 11, .92) 68%),
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(255, 255, 255, .012) 6px 7px);
  border: 1px solid var(--social-line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
}

.profile-social-head > div:first-child { min-width: 0; }
.profile-social-head small {
  color: #b89345;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.profile-social-head h3 {
  margin: 3px 0 4px;
  color: #f0e5cd;
  font: 650 clamp(26px, 2.5vw, 38px)/1 "KottDisplay", Georgia, serif;
  letter-spacing: -.02em;
}
.profile-social-head p { margin: 0; color: #aaa28f; font-size: 11px; overflow-wrap: anywhere; }

.profile-social-wallet { display: flex; flex: 0 0 auto; gap: 8px; align-items: center; }
.profile-social-wallet .profile-social-price {
  min-width: 108px;
  justify-content: center;
  padding: 8px 10px;
  background: rgba(1, 9, 6, .62);
  border: 1px solid rgba(216, 174, 76, .2);
}

.profile-social-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  isolation: isolate;
  background: #020b07;
  border: 1px solid rgba(213, 170, 71, .25);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .24);
}

.commerce-social-host {
  min-width: 0;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.commerce-social-host .profile-social-tabs { position: static; }

.profile-social-tabs button {
  position: relative;
  display: inline-flex;
  min-width: 0;
  min-height: 48px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  color: #9e9684;
  background: transparent;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.profile-social-tabs button[aria-selected="true"] {
  color: #f2ddb0;
  background: linear-gradient(180deg, rgba(40, 84, 61, .58), rgba(12, 36, 25, .8));
  border-color: rgba(218, 177, 79, .42);
  box-shadow: inset 0 -2px #d8ae53;
}

.profile-social-tab-mark {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}
.profile-social-tab-mark::before,
.profile-social-tab-mark::after { position: absolute; content: ""; }
.profile-social-tab-mark.is-avatars::before { inset: 5px; border: 1px solid currentColor; border-radius: 50%; }
.profile-social-tab-mark.is-avatars::after { inset: 13px 4px 3px; border: 1px solid currentColor; border-radius: 50% 50% 0 0; }
.profile-social-tab-mark.is-messages::before { inset: 5px 5px 8px; border: 1px solid currentColor; transform: rotate(-45deg); }
.profile-social-tab-mark.is-messages::after { right: 2px; bottom: 4px; width: 6px; height: 6px; border-bottom: 1px solid currentColor; transform: rotate(-15deg); }
.profile-social-tab-mark.is-emotes::before { inset: 6px; border: 1px solid currentColor; border-radius: 50%; }
.profile-social-tab-mark.is-emotes::after { inset: 10px 6px 6px 10px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(-45deg); }

.profile-social-panel { min-width: 0; outline: none; }
.profile-social-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(142px, 1fr));
  gap: 12px;
}

.profile-social-avatar-card,
.profile-social-pack-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(15, 39, 28, .96), rgba(2, 12, 8, .99) 72%);
  border: 1px solid rgba(212, 169, 68, .22);
  box-shadow: 0 15px 32px rgba(0, 0, 0, .24);
}

.profile-social-avatar-card {
  display: grid;
  grid-template-rows: auto minmax(76px, 1fr) auto auto;
  gap: 9px;
  padding: 11px;
}

.profile-social-avatar-card[data-social-state="equipped"],
.profile-social-pack-card[data-social-state="equipped"] {
  border-color: rgba(234, 199, 112, .68);
  box-shadow: inset 3px 0 #d8ad53, 0 17px 36px rgba(0, 0, 0, .3);
}

.profile-social-avatar-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #07130d;
  border: 1px solid rgba(225, 189, 101, .42);
}
.profile-social-avatar-art::after {
  position: absolute;
  inset: 7px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 235, 169, .16);
}
.profile-social-avatar-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.profile-social-card-copy { min-width: 0; }
.profile-social-card-copy small { display: block; color: #8c846f; font-size: 8px; letter-spacing: .09em; text-transform: uppercase; }
.profile-social-card-copy h3,
.profile-social-pack-card h3 { margin: 4px 0; color: #efe2c7; font: 650 17px/1.05 "KottDisplay", Georgia, serif; overflow-wrap: anywhere; }
.profile-social-card-copy p,
.profile-social-pack-card p { margin: 0; color: #928b7c; font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }

.profile-social-price {
  display: inline-flex;
  min-width: 0;
  gap: 6px;
  align-items: center;
  color: #e6cb89;
  font-size: 10px;
}
.profile-social-price b { color: #f2d988; font-size: 14px; }
.profile-social-price small { color: #8f8777; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.profile-social-price.is-included { min-height: 24px; color: #9fbea9; font-weight: 800; text-transform: uppercase; }
.profile-social-currency { position: relative; display: block; width: 18px; height: 18px; flex: 0 0 auto; }
.profile-social-currency.is-chips { object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }
.profile-social-currency.kott-chip-art { clip-path: none; }
.profile-social-currency.is-rubies { object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }

.profile-social-action,
.profile-social-secondary {
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}
.profile-social-action {
  color: #120e05;
  background: linear-gradient(180deg, #f0d57f, #b6812e);
  border: 1px solid #f0d782;
  box-shadow: inset 0 1px rgba(255, 255, 255, .28), 0 7px 14px rgba(0, 0, 0, .2);
}
.profile-social-action.is-use { color: #ebdfc5; background: linear-gradient(180deg, #286346, #123925); border-color: #557d61; }
.profile-social-action.is-equipped { color: #b8d1c1; background: rgba(18, 48, 33, .68); border-color: rgba(92, 137, 105, .54); opacity: 1; }
.profile-social-action:disabled:not(.is-equipped) { color: #807968; background: #111913; border-color: #343d35; cursor: not-allowed; }
.profile-social-secondary { color: #cdbb92; background: transparent; border: 1px solid rgba(207, 170, 82, .32); }

.profile-social-action:focus-visible,
.profile-social-secondary:focus-visible,
.profile-social-tabs button:focus-visible { outline: 2px solid #f1d781; outline-offset: 2px; }

.profile-social-pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.profile-social-pack-card { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; padding: 16px; }
.profile-social-pack-card > header { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 11px; align-items: start; }
.profile-social-pack-card > header small { color: #aa8b49; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-social-pack-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #daba67;
  background: radial-gradient(circle, rgba(211, 170, 73, .14), transparent 72%);
  border: 1px solid rgba(216, 176, 78, .38);
  transform: rotate(45deg);
}
.profile-social-pack-mark i { width: 20px; height: 20px; border: 2px solid currentColor; border-radius: 50%; }
.profile-social-pack-mark b { position: absolute; width: 25px; height: 2px; background: currentColor; transform: rotate(-45deg); }
.profile-social-pack-emoji {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  background: radial-gradient(circle, rgba(211, 170, 73, .14), transparent 72%);
  border: 1px solid rgba(216, 176, 78, .38);
  font: 30px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .42));
}
.profile-social-pack-card ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.profile-social-pack-card li {
  min-height: 34px;
  padding: 8px 10px;
  color: #c8bfae;
  background: rgba(1, 9, 6, .52);
  border-inline-start: 2px solid rgba(210, 169, 72, .45);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.profile-social-pack-card.is-emote-pack li { display: flex; gap: 8px; align-items: center; }
.profile-social-emoji {
  width: 30px;
  flex: 0 0 auto;
  font: 24px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  text-align: center;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .38));
}
.profile-social-pack-card > footer { display: grid; grid-template-columns: minmax(90px, auto) minmax(128px, 1fr); gap: 10px; align-items: center; }

.profile-social-stage-note {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 14px 0 0;
  padding: 10px 12px;
  color: #9f9788;
  background: rgba(3, 15, 10, .62);
  border: 1px solid rgba(211, 170, 72, .16);
  font-size: 10px;
}
.profile-social-stage-note span { width: 9px; height: 9px; flex: 0 0 auto; background: #d5ad55; transform: rotate(45deg); }
.profile-social-inline-error,
.profile-social-error { padding: 12px; color: #f0c4bd; background: rgba(78, 20, 17, .48); border: 1px solid rgba(214, 91, 72, .42); }
.profile-social-empty { min-height: 180px; padding: 28px; color: #9f9788; background: rgba(3, 15, 10, .62); border: 1px solid rgba(211, 170, 72, .16); text-align: center; }
.profile-social-inline-error { margin: 0; font-size: 10px; }
.profile-social-loading { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 12px; color: #a99f8d; }
.profile-social-loading i { width: 34px; height: 34px; border: 2px solid rgba(214, 172, 74, .2); border-top-color: #deb962; border-radius: 50%; animation: profile-social-spin .8s linear infinite; }

@keyframes profile-social-spin { to { transform: rotate(360deg); } }

@media (min-width: 1680px) {
  .profile-social-avatar-grid { grid-template-columns: repeat(6, minmax(150px, 1fr)); }
}

@media (max-width: 1260px) {
  .profile-social-avatar-grid { grid-template-columns: repeat(4, minmax(138px, 1fr)); }
  .profile-social-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .profile-social-avatar-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .profile-social-head { align-items: start; }
  .profile-social-wallet { display: grid; }
}

@media (max-width: 780px) and (orientation: portrait) {
  .profile-fullscreen .profile-social-head { margin-top: 10px; }
  .profile-social-head { padding: 13px; }
  .profile-social-head h3 { font-size: 29px; }
  .profile-social-tabs { top: 54px; }
  .profile-social-avatar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .profile-social-avatar-card { padding: 8px; }
  .profile-social-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}

@media (max-width: 520px) and (orientation: portrait) {
  .profile-social-head { display: block; }
  .profile-social-head > p { display: none; }
  .profile-social-wallet { display: flex; margin-top: 10px; }
  .profile-social-wallet .profile-social-price { min-width: 0; flex: 1 1 0; }
  .profile-social-tabs button { gap: 7px; padding-inline: 8px; font-size: 9px; }
  .profile-social-tab-mark { width: 20px; height: 20px; }
  .profile-social-avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-social-card-copy h3 { font-size: 15px; }
  .profile-social-card-copy p { display: none; }
  .profile-social-pack-grid { grid-template-columns: 1fr; }
  .profile-social-pack-card > footer { grid-template-columns: 1fr; }
}

@media (max-width: 340px) and (orientation: portrait) {
  .profile-social-avatar-grid { grid-template-columns: 1fr; }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1180px) {
  .profile-fullscreen .profile-tab-panel:has(.profile-social) { padding: 7px 9px max(8px, env(safe-area-inset-bottom)); }
  .profile-social { gap: 7px; }
  .profile-social-head { display: none; }
  .profile-social-tabs { position: static; padding: 2px; }
  .profile-social-tabs button { min-height: 48px; padding-block: 5px; }
  .profile-social-avatar-grid { grid-template-columns: repeat(3, minmax(112px, 1fr)); gap: 7px; }
  .profile-social-avatar-card { grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 9px; padding: 7px; }
  .profile-social-avatar-art { grid-row: 1 / 3; }
  .profile-social-avatar-card .profile-social-price { display: none; }
  .profile-social-avatar-card .profile-social-action,
  .profile-social-avatar-card .profile-social-secondary { min-height: 48px; grid-column: 2; }
  .profile-social-avatar-card.is-custom { grid-template-rows: auto auto auto; }
  .profile-social-avatar-card.is-custom .profile-social-avatar-art { grid-row: 1 / 4; }
  .profile-social-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .profile-social-pack-card { gap: 7px; padding: 9px; }
  .profile-social-pack-card li { min-height: 28px; padding: 5px 7px; }
  .profile-social-stage-note { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  .profile-social-action:not(:disabled):hover,
  .profile-social-secondary:hover { filter: brightness(1.08); }
  .profile-social-avatar-card:hover,
  .profile-social-pack-card:hover { border-color: rgba(224, 186, 93, .48); transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .profile-social-avatar-card,
  .profile-social-pack-card,
  .profile-social-action,
  .profile-social-secondary { transition: none !important; transform: none !important; }
  .profile-social-loading i { animation: none; }
}
