/* SPACE Experience · Profile V2. Shared tokens, mobile-first layout. */
.seh-profile-shell{width:100%;max-width:900px;min-width:0;margin:0 auto;padding:26px var(--seh-page-pad-x,18px) 38px;display:grid;gap:24px;color:var(--seh-ui-text)}
.seh-profile-shell [hidden],.seh-profile-completion-banner[hidden]{display:none!important}
.seh-profile-shell>*{min-width:0}
.seh-profile-hero{display:grid;gap:20px}
.seh-profile-identity{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:start;gap:16px}
.seh-profile-avatar{width:88px;height:88px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--seh-ui-surface);color:var(--seh-ui-accent);font:650 1.65rem/1 'Space Grotesk',sans-serif}
.seh-profile-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.seh-profile-copy{min-width:0;display:grid;gap:6px}
.seh-profile-copy>span,.seh-profile-card-head>span{color:var(--seh-ui-accent);font:750 .7rem/1.35 'Space Grotesk',sans-serif;letter-spacing:.1em}
.seh-profile-copy h1{margin:0;font:650 clamp(1.7rem,6vw,3rem)/1.08 'Space Grotesk',sans-serif;letter-spacing:-.045em;overflow-wrap:anywhere}
.seh-profile-handle,.seh-profile-meta{color:var(--seh-ui-muted);font-size:.85rem;line-height:1.4;overflow-wrap:anywhere}
.seh-profile-handle:empty,.seh-profile-meta:empty,.seh-profile-bio:empty{display:none}
.seh-profile-bio{margin:0;color:var(--seh-ui-text);font-size:.9rem;line-height:1.55;overflow-wrap:anywhere}
.seh-profile-meta span{display:inline-flex;align-items:center;gap:7px}
.seh-profile-meta i{width:5px;height:5px;border-radius:50%;background:var(--seh-ui-accent);flex:none}
.seh-profile-action-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.seh-profile-shell :is(.seh-profile-primary-action,.seh-profile-logout,.seh-profile-save,.seh-profile-group-create,.seh-profile-group-row button,.seh-profile-reset,.seh-profile-username-invite a,.seh-profile-group-claim button){display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:0;border-radius:999px;background:var(--seh-ui-surface);color:var(--seh-ui-text);font:inherit;font-size:.85rem;font-weight:700;text-decoration:none;text-align:center;cursor:pointer;white-space:normal;line-height:1.3}
.seh-profile-shell :is(.seh-profile-primary-action,.seh-profile-save,.seh-profile-group-create,.seh-profile-username-invite a,.seh-profile-group-claim button){background:var(--seh-ui-accent);color:#10140c}
.seh-profile-login-link{min-height:44px;display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px;font-size:.85rem;color:var(--seh-ui-muted);text-decoration:none}
.seh-profile-login-link strong{color:var(--seh-ui-text)}
.seh-profile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.seh-profile-stat{min-width:0;position:relative;display:grid;justify-items:start;align-content:center;gap:7px;min-height:108px;padding:14px;border:0;border-radius:20px;background:var(--seh-ui-elevated);color:var(--seh-ui-text);text-align:left;cursor:pointer}
.seh-profile-stat strong{font:650 clamp(1.45rem,5vw,2rem)/1 'Space Grotesk',sans-serif}
.seh-profile-stat span{font-size:.8rem;color:var(--seh-ui-muted)}
.seh-profile-stat svg{position:absolute;right:12px;top:12px;width:20px;height:20px;stroke:var(--seh-ui-accent);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;fill:none}
.seh-profile-card{display:grid;gap:14px;min-width:0;background:transparent}
.seh-profile-card-head{display:grid;gap:7px}
.seh-profile-card-head h2{margin:0;font:600 clamp(1.5rem,5vw,2.2rem)/1.15 'Space Grotesk',sans-serif;letter-spacing:-.04em}
.seh-profile-card-head p{margin:0;font-size:.86rem;line-height:1.5;color:var(--seh-ui-muted)}
.seh-profile-fidelity-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.seh-profile-fidelity-head a,.seh-profile-fidelity-links a{display:inline-flex;align-items:center;min-height:44px;color:var(--seh-ui-accent);font-size:.85rem;font-weight:700;text-decoration:none}
.seh-profile-fidelity-list,.seh-profile-groups-list{display:grid;gap:10px}
.seh-profile-fidelity-entry{display:grid;gap:0;border-radius:var(--seh-ui-radius);background:var(--seh-ui-elevated);padding:14px 16px 5px}
.seh-profile-fidelity-program{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--seh-ui-text);text-decoration:none;min-height:66px}
.seh-profile-fidelity-place,.seh-profile-fidelity-score{display:grid;gap:5px;min-width:0}
.seh-profile-fidelity-place strong,.seh-profile-group-row strong{font:650 1.05rem/1.3 'Space Grotesk',sans-serif;overflow-wrap:anywhere}
.seh-profile-fidelity-place small,.seh-profile-fidelity-score small,.seh-profile-group-row small{font-size:.78rem;line-height:1.4;color:var(--seh-ui-muted);overflow-wrap:anywhere}
.seh-profile-fidelity-reward-hint{color:var(--seh-ui-accent);font-size:.77rem}
.seh-profile-fidelity-score{text-align:right;flex:0 0 auto}
.seh-profile-fidelity-score strong{font:650 1.55rem/1 'Space Grotesk',sans-serif;color:var(--seh-ui-accent)}
.seh-profile-fidelity-links{display:flex;justify-content:flex-end}
.seh-profile-fidelity-empty,.seh-profile-groups-empty{margin:0;font-size:.85rem;line-height:1.55;color:var(--seh-ui-muted);padding:14px 0}
.seh-profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.seh-profile-field{display:grid;gap:8px;min-width:0}
.seh-profile-field label{color:var(--seh-ui-muted);font-size:.85rem}
.seh-profile-field input{width:100%;min-width:0;min-height:48px;padding:0 14px;border:1px solid transparent;border-radius:16px;background:var(--seh-ui-surface);color:var(--seh-ui-text);font:inherit;font-size:16px;outline:none}
.seh-profile-field input:focus{border-color:var(--seh-ui-accent)}
.seh-profile-save{grid-column:1/-1;justify-self:start}
.seh-profile-groups-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.seh-profile-groups-summary>span,.seh-profile-group-row>span{min-width:0;display:grid;gap:5px}
.seh-profile-groups-summary strong,.seh-profile-privacy-copy strong,.seh-profile-username-copy strong{font-size:1rem}
.seh-profile-groups-summary small,.seh-profile-privacy-copy span,.seh-profile-username-copy span,.seh-profile-group-claim>span,.seh-profile-group-claim small{font-size:.84rem;color:var(--seh-ui-muted);line-height:1.5}
.seh-profile-group-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px;border-radius:var(--seh-ui-radius);background:var(--seh-ui-elevated)}
.seh-profile-group-row nav{display:flex;flex-wrap:wrap;gap:6px}
.seh-profile-shell .seh-profile-group-row button{background:#171d18;padding:10px 13px}
.seh-profile-shell .seh-profile-group-row button.is-danger,.seh-profile-shell .seh-profile-reset{color:#ffb4b4}
.seh-profile-group-claim,.seh-profile-username-invite,.seh-profile-privacy{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px;border-radius:var(--seh-ui-radius);background:var(--seh-ui-elevated)}
.seh-profile-group-claim{display:grid;justify-items:start}
.seh-profile-group-claim small:empty{display:none}
.seh-profile-privacy-copy,.seh-profile-username-copy{display:grid;gap:6px;min-width:0}
.seh-profile-shell :is(a,button):focus-visible{outline:2px solid var(--seh-ui-accent);outline-offset:3px}
.seh-profile-shell button:disabled{opacity:.55;cursor:wait}
.seh-profile-completion-banner{position:fixed;z-index:7750;left:50%;bottom:calc(var(--seh-app-dock-h,78px) + max(12px,env(safe-area-inset-bottom)));width:min(620px,calc(100vw - 24px));transform:translateX(-50%);padding:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:20px;background:#222923;box-shadow:0 12px 32px #0005}
.seh-profile-completion-copy{min-width:0;display:grid;gap:4px}
.seh-profile-completion-copy strong{font-size:.9rem;color:var(--seh-ui-text)}
.seh-profile-completion-copy span{font-size:.78rem;line-height:1.4;color:var(--seh-ui-muted)}
.seh-profile-completion-banner a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border-radius:999px;background:var(--seh-ui-accent);color:#10140c;font-size:.8rem;font-weight:700;text-decoration:none;text-align:center}
.seh-profile-toast{position:fixed;z-index:9000;left:50%;bottom:calc(var(--seh-app-dock-h,78px) + 14px);transform:translate(-50%,14px);width:max-content;max-width:calc(100vw - 28px);padding:12px 16px;border-radius:999px;background:#222923;color:var(--seh-ui-accent);font-size:.85rem;text-align:center;opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}
.seh-profile-toast.is-visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:700px){.seh-profile-shell{padding-top:22px;gap:26px}.seh-profile-identity{grid-template-columns:72px minmax(0,1fr);gap:14px}.seh-profile-avatar{width:72px;height:72px}.seh-profile-action-row>.seh-profile-primary-action{flex:1 1 100%}.seh-profile-action-row>.seh-profile-logout{flex:1}.seh-profile-stat{padding:12px;min-height:100px}.seh-profile-stat svg{width:17px;height:17px;right:9px;top:10px}.seh-profile-form,.seh-profile-group-row{grid-template-columns:minmax(0,1fr)}.seh-profile-save{width:100%}.seh-profile-username-invite,.seh-profile-privacy{align-items:stretch;flex-direction:column}.seh-profile-group-row nav button{flex:1 1 auto}.seh-profile-fidelity-entry{padding:14px 13px 5px}}
@media(max-width:360px){.seh-profile-stat{padding:10px;gap:5px}.seh-profile-stat svg{position:static;grid-row:1}.seh-profile-completion-banner{flex-direction:column;align-items:stretch}}
@media(prefers-reduced-motion:reduce){.seh-profile-toast{transition:none}}


.seh-profile-stat::after{content:"";position:absolute;right:12px;bottom:15px;width:6px;height:6px;border-top:1.7px solid var(--seh-ui-muted);border-right:1.7px solid var(--seh-ui-muted);transform:rotate(45deg)}
.seh-profile-stat span{padding-right:9px}

/* Initial account state: never flash Guest actions while the identity is unknown. */
.seh-profile-shell.is-profile-loading>:not(.seh-profile-skeleton){display:none!important}
.seh-profile-skeleton{display:grid;gap:24px;min-width:0}
.seh-profile-skeleton-identity{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:16px}
.seh-profile-skeleton-identity>div,.seh-profile-skeleton-section{display:grid;gap:10px;min-width:0}
.seh-profile-skeleton i,.seh-profile-group-skeleton i{display:block;background:var(--seh-ui-surface);border-radius:12px;animation:seh-profile-skeleton-pulse 1.5s ease-in-out infinite}
.seh-profile-skeleton i.is-kicker{width:32%;height:10px}
.seh-profile-skeleton i.is-name{width:72%;height:26px}
.seh-profile-skeleton i.is-line{width:88%;height:13px}
.seh-profile-skeleton i.seh-profile-skeleton-avatar{width:88px;height:88px;border-radius:50%}
.seh-profile-skeleton i.seh-profile-skeleton-action{width:100%;max-width:300px;height:44px;border-radius:999px}
.seh-profile-skeleton-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.seh-profile-skeleton-stats i{height:108px;border-radius:20px}
.seh-profile-skeleton i.is-card{height:84px;border-radius:var(--seh-ui-radius)}
.seh-profile-group-skeleton{display:grid;gap:10px}
.seh-profile-group-skeleton i{height:66px;border-radius:var(--seh-ui-radius)}
@keyframes seh-profile-skeleton-pulse{0%,100%{opacity:.55}50%{opacity:1}}
@media(max-width:700px){.seh-profile-skeleton-identity{grid-template-columns:72px minmax(0,1fr);gap:14px}.seh-profile-skeleton i.seh-profile-skeleton-avatar{width:72px;height:72px}.seh-profile-skeleton i.seh-profile-skeleton-action{max-width:none}.seh-profile-skeleton-stats i{height:100px}}
@media(prefers-reduced-motion:reduce){.seh-profile-skeleton i,.seh-profile-group-skeleton i{animation:none}}
