/* Signed-out Wardrobe and Profile teasers (SITE-UPGRADE phase 2). Own code, no library.
   The teaser is a .portal-signed-out section, so site-config.js keeps it out of the hidden private content; it shows
   only once the session is known to be signed out (body[data-session-state="anonymous"]) and replaces portal.js's
   plain sign-in card on these two pages. Signed in, nothing here is visible. Motion is opt-in (html.motion-ok). */
.portal-signed-out.so-teaser { display: none; }
body[data-session-state="anonymous"] .portal-signed-out.so-teaser { display: grid; }
body:is([data-page="wardrobe"], [data-page="profile"]) #portal-signed-out { display: none; }

.so-teaser { grid-template-columns: minmax(0, 1fr); gap: 22px; place-items: stretch; margin: 8px 0 40px; }
.so-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.so-copy .eyebrow { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .14em; }
.so-title { margin: 0; font-size: clamp(30px, 5.4vw, 52px); font-weight: 800; line-height: .98; letter-spacing: -.035em; text-transform: uppercase; text-wrap: balance; }
.so-lede { margin: 0; max-width: 54ch; color: var(--ink-secondary); font-size: 16px; line-height: 1.55; }
.so-list { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.so-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 10px; color: var(--ink-secondary); font-size: 14px; line-height: 1.45; }
.so-list li::before { content: ''; grid-row: span 2; width: 8px; height: 8px; margin: 6px 0 0 6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.so-list b { color: var(--ink); font-size: 14px; }
.so-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.so-actions .button { min-height: 44px; }
.so-note { margin: 0; max-width: 60ch; color: var(--muted); font-size: 13px; line-height: 1.55; }
.so-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(8, 9, 10, .72); color: var(--ink-secondary); font: 600 10px/1 'Inter', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.so-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.so-chip[data-state="live"] i { background: var(--rarity-uncommon); box-shadow: 0 0 8px var(--rarity-uncommon); }
.so-chip[data-state="hold"] i { background: var(--rarity-mythic); }

/* ---- Wardrobe: the 3D stage (the starter look, cycling poses) ---- */
.so-stage { position: relative; isolation: isolate; aspect-ratio: 3 / 4; max-height: 72vh; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: #dedee1; }
.so-stage .so-poster, .so-stage asm-viewer { position: absolute !important; inset: 0; width: 100%; height: 100% !important; min-height: 0 !important; }
.so-stage .so-poster { object-fit: cover; }
.so-stage asm-viewer { z-index: 1; opacity: 0; transition: opacity .4s ease; }
.so-stage.is-live asm-viewer { opacity: 1; }
.so-stage .so-chip { position: absolute; z-index: 2; left: 14px; top: 14px; }
.so-pose { position: absolute; z-index: 2; left: 14px; bottom: 14px; margin: 0; padding: 8px 12px; border-radius: 999px; background: rgba(10, 10, 11, .82); color: #a8acb3; font: 700 10px/1 'Inter', system-ui, sans-serif; letter-spacing: .14em; }
.so-pose b { margin-left: 6px; color: #fff; }
.so-load { position: absolute !important; z-index: 2; left: 50%; top: 50%; translate: -50% -50%; background: rgba(10, 10, 11, .86); }
.so-load[hidden] { display: none; }

/* ---- Profile: a sample profile card ---- */
.so-card { position: relative; display: grid; gap: 14px; margin: 0; padding: 0 0 18px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: linear-gradient(180deg, #141518, #0e0f11); }
.so-card-banner { height: 112px; overflow: hidden; background: #1b1c20; }
.so-card-banner img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.so-card-head { display: flex; align-items: flex-start; gap: 14px; padding: 0 18px; }
.so-card-head > div { min-width: 0; padding-top: 12px; }
.so-avatar { position: relative; flex: none; width: 104px; height: 104px; margin-top: -56px; padding: 4px; border-radius: 50%; background: conic-gradient(from 210deg, var(--rarity-legendary), #f4d9b8, var(--rarity-legendary)); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }
.so-avatar img { width: 100%; height: 100%; border: 3px solid #0e0f11; border-radius: 50%; object-fit: cover; }
.so-verified { position: absolute; right: 2px; bottom: 4px; display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid #0e0f11; border-radius: 50%; background: #f2f2f0; color: #0b0b0c; }
.so-name { margin: 0 0 6px; color: var(--rarity-legendary); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.so-verify { display: flex; align-items: center; gap: 8px; margin: 0 18px; color: var(--ink); font-size: 13px; font-weight: 600; }
.so-verify svg { flex: none; }
.so-card-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 18px; list-style: none; }
.so-held { margin: 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.so-held p { display: flex; justify-content: space-between; margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.so-held p b { color: var(--ink); }
.so-held ul { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.so-held li { position: relative; width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: #1b1c20; }
.so-held li img { width: 100%; height: 100%; object-fit: cover; }
.so-held li[aria-current] { border-color: var(--rarity-legendary); box-shadow: 0 0 0 2px rgba(200, 121, 74, .35); }
.so-sample { position: absolute; right: 14px; top: 14px; padding: 5px 9px; border-radius: 999px; background: rgba(10, 10, 11, .78); color: #d4d6da; font: 800 9px/1.2 'Inter', system-ui, sans-serif; letter-spacing: .16em; }

@media (min-width: 900px) {
  .so-teaser { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
  .so-profile { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
  .so-stage { max-height: 640px; }
}
@media (max-width: 750px) {
  .so-actions .button { flex: 1 1 100%; justify-content: center; }
  .so-stage { max-height: 62vh; }
}

/* Entrance: the stage and the card settle in, the copy follows (only with motion allowed). */
@keyframes so-in { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: none; } }
html.motion-ok body[data-session-state="anonymous"] .so-teaser > * { animation: so-in .7s cubic-bezier(.16, 1, .3, 1) both; }
html.motion-ok body[data-session-state="anonymous"] .so-teaser > :nth-child(2) { animation-delay: .08s; }
@media (prefers-reduced-motion: reduce) { .so-stage asm-viewer { transition: none; } }
