/* hySocial V16 — local, app-scoped finish. HyMail informs depth and fine chroma
   edges; original page selectors and state classes remain the layout contract. */
html:has(body[data-hysocial-page]){color-scheme:dark;--touch-target:44px;--info:var(--accent);--purple:var(--hsx-violet);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
html[data-mode="light"]:has(body[data-hysocial-page]){color-scheme:light;--hsx-cyan:#006b88;--hsx-violet:#7032c3;--hsx-pink:#a91e78;--hsx-dim:#526178;--accent:#006b88;--hsx-line:#a4b2c7}
body[data-hysocial-page]{--hs-font:Inter,ui-sans-serif,system-ui,sans-serif;--hs-bg:var(--bg-deep);--hs-card:var(--bg-card);--hs-surface:var(--bg-surface);--hs-text:var(--text);--hs-muted:var(--muted);--hs-border:var(--border);--hs-accent:var(--accent);--hs-danger:var(--danger);--hs-glass:var(--glass-bg);--hs-glass-border:var(--border);--hs-radius:18px;--hs-spring:cubic-bezier(.2,.9,.3,1);--hs-pink:var(--hsx-pink);--hs-purple:var(--hsx-violet);--hs-gradient:linear-gradient(135deg,var(--hs-pink),var(--hs-purple));--hs-gradient-soft:var(--accent-dim);--hs-pink-dim:var(--accent-dim);--hs-purple-dim:var(--accent-dim);--hs-success:var(--success);--hs-gold:var(--warning);font-family:var(--hs-font);line-height:1.5}
body[data-hysocial-page] *,body[data-hysocial-page] *::before,body[data-hysocial-page] *::after{box-sizing:border-box}
body[data-hysocial-page] :is(button,input,select,textarea){font-family:inherit}
body[data-hysocial-page] :is(button,[role="button"],.hy-tabbar-item){min-height:44px;touch-action:manipulation}
body[data-hysocial-page] :is(button,[role="button"]){cursor:pointer}
body[data-hysocial-page] :is(button,[role="button"]):active{transform:translateY(1px)}
body[data-hysocial-page] :is(button:disabled,[aria-disabled="true"]){cursor:not-allowed;opacity:.6;transform:none}
body[data-hysocial-page] :is(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid var(--accent)!important;outline-offset:3px;scroll-margin:80px}
body[data-hysocial-page] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
body[data-hysocial-page] :is(.hs-app,.hsg-app,.hsm-app,.hm-app){height:100vh;height:100dvh}
body[data-hysocial-page] :is(.hs-main,.hsg-main,.hsm-main,.hp-main,.ha-main){min-width:0;min-height:0}
body[data-hysocial-page] :is(.hs-post,.card,.glass-card,.hsg-card,.hsm-listing-card){overflow-wrap:anywhere}
body[data-hysocial-page] :is(.hs-compose textarea,.hs-compose-top,.hs-compose-actions){min-width:0}
body[data-hysocial-page] :is(.hs-compose-actions,.hsm-toolbar,.hsg-detail-actions){flex-wrap:wrap}
body[data-hysocial-page] :is(.btn-primary,.hs-post-btn,.btn-accent,.btn-cyan){background:var(--accent)!important;color:var(--bg-deep)!important;border-color:var(--accent)!important;font-weight:750}
body[data-hysocial-page] #hysocial-theme-toggle{width:44px;height:44px;min-width:44px}
body[data-hysocial-page] :is(.hs-sidebar-header h1,.brand-name){animation:none}
.hs-v16-skip{position:fixed;top:8px;left:8px;z-index:100000;padding:12px 18px;border-radius:10px;background:var(--bg-card);color:var(--text);transform:translateY(-200%)}
.hs-v16-skip:focus{transform:none}
.hs-v16-close{display:none}
body[data-hysocial-page] :is(.hs-v16-menu,.hs-v16-close){border:1px solid var(--border);background:var(--bg-card);color:var(--text);border-radius:12px;padding:8px 12px}
.hs-v16-menu,.hs-v16-backdrop{display:none}
/* The extracted signup/arena state and form layout is paired with V16 materials. */
body[data-hysocial-page] :is(.field,.field-row)>input{width:100%}
body[data-hysocial-page] :is(.card-hint,.field-hint,.tagline,.v-desc,.foot,.step-desc){color:var(--muted)}
body[data-hysocial-page] :is(.glass-card,.card){border-radius:18px;padding:20px}
body[data-hysocial-page="hysocial-onboard"]{margin:0;overflow:auto;background:var(--bg-deep);color:var(--text)}
body[data-hysocial-page="hysocial-onboard"] .shell{max-width:900px;margin:auto;padding:76px 24px 110px}
body[data-hysocial-page="hysocial-onboard"] :is(.top-bar,.field-row,.nav-btns,.hb-header,.hb-input-row){display:flex;align-items:center;gap:12px}
body[data-hysocial-page="hysocial-onboard"] .top-bar{flex-wrap:wrap;margin-bottom:24px}
body[data-hysocial-page="hysocial-onboard"] .tb-right{display:flex;gap:8px;margin-left:auto}
body[data-hysocial-page="hysocial-onboard"] .tb-title{font-size:24px;font-weight:800}
body[data-hysocial-page="hysocial-onboard"] :is(.tb-sub,.step-num,.field-hint){color:var(--muted);font-size:13px}
body[data-hysocial-page="hysocial-onboard"] .step{display:none}
body[data-hysocial-page="hysocial-onboard"] .step.active{display:block}
body[data-hysocial-page="hysocial-onboard"] .step-title{font-size:28px;font-weight:800;margin:8px 0}
body[data-hysocial-page="hysocial-onboard"] .card{margin:16px 0}
body[data-hysocial-page="hysocial-onboard"] .card-title{font-weight:750;margin-bottom:12px}
body[data-hysocial-page="hysocial-onboard"] .field{flex:1;min-width:0;margin-bottom:12px}
body[data-hysocial-page="hysocial-onboard"] .field label{display:block;margin-bottom:6px}
body[data-hysocial-page="hysocial-onboard"] :is(input,textarea,select){min-height:44px;padding:10px;max-width:100%}
body[data-hysocial-page="hysocial-onboard"] :is(.mini-add,.dyn-row){display:grid;gap:8px;margin:10px 0}
body[data-hysocial-page="hysocial-onboard"] :is(.chip-grid,.prog-bar){display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
body[data-hysocial-page="hysocial-onboard"] :is(.chip,.btn,.btn-add,.prog-dot){border:1px solid var(--border);border-radius:12px;padding:10px;background:var(--bg-card);color:var(--text)}
body[data-hysocial-page="hysocial-onboard"] :is(.chip.sel,.prog-dot.active,.posture-card.selected){border-color:var(--accent);background:var(--accent-dim)}
body[data-hysocial-page="hysocial-onboard"] .resume-banner{display:none;padding:16px;border:1px solid var(--accent);border-radius:14px}
body[data-hysocial-page="hysocial-onboard"] #hyp-fab{position:fixed;right:18px;bottom:20px;width:52px;height:52px;border-radius:18px;background:var(--bg-card);border:1px solid var(--accent);display:grid;place-items:center;z-index:410}
body[data-hysocial-page="hysocial-onboard"] :is(#hyp-fab,.hb-header) img{width:32px;height:32px;object-fit:contain}
body[data-hysocial-page="hysocial-onboard"] #hyp-bubble{display:none;position:fixed;right:16px;bottom:82px;width:min(380px,calc(100vw - 32px));height:min(520px,70dvh);background:var(--bg-card);border:1px solid var(--border);border-radius:18px;z-index:420;overflow:hidden}
body[data-hysocial-page="hysocial-onboard"] #hyp-bubble.open{display:flex;flex-direction:column}
body[data-hysocial-page="hysocial-onboard"] :is(.hb-header,.hb-input-row){padding:12px}
body[data-hysocial-page="hysocial-onboard"] :is(.hb-h-info,#hb-input){flex:1;min-width:0}
body[data-hysocial-page="hysocial-onboard"] .hb-messages{flex:1;min-height:0;overflow:auto;padding:12px}
body[data-hysocial-page="hysocial-onboard"] #wiz-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:85vw;background:var(--bg-card);color:var(--text);z-index:500}
@media(max-width:768px){
 body[data-hysocial-page] :is(.hs-right){display:none!important}
 body[data-hysocial-page] .hs-v16-menu{display:block;position:fixed;left:8px;top:58px;z-index:410}
 body[data-hysocial-page] .hs-v16-close{display:block;margin:8px 12px 8px auto}
 body[data-hysocial-page] [data-v16-drawer]{position:fixed!important;display:flex!important;flex-direction:column;top:52px!important;bottom:0;left:0;width:min(288px,88vw)!important;max-width:88vw!important;height:auto;z-index:440!important;overflow-y:auto;visibility:hidden;transform:translateX(-110%);background:var(--bg-surface)!important}
 body[data-hysocial-page] [data-v16-drawer].open{visibility:visible;transform:none}
 body[data-hysocial-page] .hs-v16-backdrop.open{display:block;position:fixed;inset:52px 0 0;background:rgba(0,0,0,.62);z-index:430}
 body[data-hysocial-page] :is(.hsg-mobile-toggle,.hsm-mobile-toggle){z-index:410}
 body[data-hysocial-page] :is(.hsg-sidebar-overlay,.hsm-overlay).open{z-index:430}
 body[data-hysocial-page] :is(.hs-topbar,.hsg-toolbar,.hsm-toolbar){padding-left:58px}
 body[data-hysocial-page] #hs-mobile-tabs{gap:2px;padding-inline:4px}
 body[data-hysocial-page] #hs-mobile-tabs .hs-tab{min-width:0;flex:1;padding-inline:2px;font-size:10px}
 body[data-hysocial-page] :is(input,textarea,select){font-size:16px!important}
 body[data-hysocial-page="hysocial-onboard"] .shell{padding:72px 12px 110px}
 body[data-hysocial-page="hysocial-onboard"] .field-row{flex-direction:column;align-items:stretch}
 body[data-hysocial-page="hysocial-onboard"] .mini-add{grid-template-columns:minmax(0,1fr)!important}
}
@media(prefers-reduced-motion:reduce){body[data-hysocial-page] *,body[data-hysocial-page] *::before,body[data-hysocial-page] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){body[data-hysocial-page] :is(button,a,input,textarea,select,.card,.glass-card){border:1px solid CanvasText!important}}
/* Functional color cues remain visible after retiring the legacy paint layer. */
body[data-hysocial-page] :is(.ci-chip.active,.ci-chip.selected,.ci-mood button.active,.ci-mood button.selected,.lb-tab.active,.chip.selected,.prog-step.active,.posture.selected){border-color:var(--accent)!important;background:var(--accent-dim)!important;color:var(--text)!important;box-shadow:inset 0 0 0 1px var(--accent)}
body[data-hysocial-page] :is(.xp-bar,.chal-progress,.hs-progress){background:var(--border)}
body[data-hysocial-page] :is(.xp-bar>span,.chal-progress>span,.hs-progress>span){background:var(--accent)}
body[data-hysocial-page] .level-ring{--ring-pct:0;--ring-color:var(--accent);background:conic-gradient(var(--ring-color) calc(var(--ring-pct)*1%),var(--border) 0)}
body[data-hysocial-page] .level-ring::after{background:var(--bg-card)}
body[data-hysocial-page] :is(.checkin-done,.chal-card.done,.prog-step.done){color:var(--success);border-color:var(--success)}
body[data-hysocial-page] :is(.msg.err,.field-hint.bad,.imp.down){color:var(--danger)}
body[data-hysocial-page] :is(.msg.ok,.field-hint.ok,.imp.up){color:var(--success)}
body[data-hysocial-page] :is(.ring-cap,.xp-cap,.xp-next,.sf-cap,.lb-sub,.m-cap,.chal-desc,.chal-footer,.empty-state){color:var(--muted)}
body[data-hysocial-page] :is(.chal-card,.lb-row,.badge-card){background:var(--bg-card);border-color:var(--border)}
body[data-hysocial-page="hysocial-onboard"] .prog-step{flex:1;min-width:64px;border:1px solid var(--border);border-radius:10px;padding:8px;text-align:center;font-size:12px}
body[data-hysocial-page="hysocial-onboard"] .posture{padding:16px;border:1px solid var(--border);border-radius:14px;margin:10px 0}
body[data-hysocial-page="hysocial-onboard"] #nav-btns{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:20px}
body[data-hysocial-page="hysocial-onboard"] .hb-msg{padding:10px;border-radius:12px;margin-bottom:10px;background:var(--accent-dim);overflow-wrap:anywhere}
@media(max-width:380px){
 body[data-hysocial-page] .arena-hero .hero-main{min-width:0;flex-wrap:wrap}
 body[data-hysocial-page] .hero-meta{min-width:0}
 body[data-hysocial-page] :is(.hs-scroll,.hp-content){padding-inline:12px}
 body[data-hysocial-page] :is(.hs-topbar h1,.hsg-toolbar h2,.hsm-toolbar h2){font-size:15px;min-width:0}
}
body[data-hysocial-page] .hs-v16-menu{min-width:44px}
