/* WINDIRHACK · HAPP CONNECT · UI V3 — visual layer only.
   Existing IDs, states, API calls, validation and event handling remain in app.js. */
:root{
 color-scheme:light;
 --ink:#25202b;--muted:#78737f;--line:#ece7f0;--green:#ac21b2;
 --soft:#f8eafa;--bg:#f9f7fb;--white:#fff;--windir:#a721b0;
 --windir-dark:#291131;--windir-soft:#fbf1fc;
 font-family:Manrope,Arial,sans-serif;
}
html{scroll-padding-top:92px}
body{
 min-height:100vh;color:var(--ink);background:
 radial-gradient(ellipse 74% 440px at 50% -110px,#f1dff5 0,rgba(249,247,251,0) 85%),
 #faf9fc;
 font-size:14px;line-height:1.64;
}
::selection{background:#efccf3;color:#351338}
:focus-visible{outline:3px solid #be58c9;outline-offset:3px}
a,button{transition:color .2s ease,background .2s ease,box-shadow .2s ease,transform .2s ease}
.topbar{
 position:relative;z-index:4;background:rgba(255,255,255,.95);color:#27202c;
 border-bottom:1px solid #eee8f0;box-shadow:0 2px 16px #37123d07;
}
.nav-inner{min-height:83px;gap:24px}
.container{width:min(960px,calc(100% - 46px))}
.site-brand{font-size:18px;font-weight:800;line-height:1.15;gap:12px;letter-spacing:.018em}
.brand-logo{
 display:block;width:51px;height:51px;object-fit:contain;padding:2px;border-radius:12px;
 background:linear-gradient(145deg,#2e0e3b,#1b0e25);
 box-shadow:0 5px 15px #4814521f,0 0 0 1px #ead7ec;
}
.site-brand small{display:block;color:#857587;letter-spacing:.14em;font-size:8px;font-weight:800;margin-top:7px}
.nav-top{margin-left:auto;color:#67616f;gap:26px;font-size:12px}
.nav-top a{min-height:44px}
.nav-top img{filter:none;opacity:.57}
.nav-top .active,.nav-top a:hover{color:#9f1ca7}
.lang-switch{background:#f6f3f7;border:1px solid #ece5ed;border-radius:20px;padding:4px;gap:3px}
.lang-switch button{border-radius:16px;min-width:37px;padding:7px 11px;color:#807883;font-weight:800}
.lang-switch button[aria-pressed=true]{
 background:#fff;color:#9d1ea7;box-shadow:0 1px 6px #29113115;
}
.page-heading{
 max-width:820px;margin-inline:auto;display:flex;align-items:flex-end;
 padding:37px 4px 24px;gap:16px;
}
.page-heading h1{font-size:29px;letter-spacing:-.045em;line-height:1.3;color:#241d27}
.page-heading h1>span{color:#ad28bc}
.page-heading .eyebrow{letter-spacing:.14em;font-size:10px;color:#9f6da6;font-weight:800;margin-bottom:9px}
.heading-description{font-size:13px;color:#7d7481;line-height:1.7}
.system-status{min-height:30px;font-size:11px;color:#726a78;white-space:normal}
.system-status i{background:#cdadcf;width:8px;height:8px}
.system-status i.online{background:#25a079}
.work-grid{display:block;max-width:820px;width:100%;margin:0 auto}
.connection-workspace{
 display:flex;flex-direction:column;position:relative;overflow:hidden;
 width:100%;border:1px solid #e7e0ec;border-radius:22px;background:white;
 box-shadow:0 18px 56px rgba(57,20,65,.075),0 2px 8px rgba(28,16,35,.025);
 animation:stageIn .45s ease both;
}
.workspace-heading{
 order:1;display:flex;align-items:center;justify-content:space-between;
 padding:22px 34px 15px;border:0;gap:14px;
}
.workspace-title>img{width:36px;height:36px;object-fit:contain;border-radius:9px;padding:5px;background:#f6edf7}
.workspace-title h2{color:#332639;font-size:14px;letter-spacing:-.01em}
.workspace-title p{color:#8e7691;font-size:9px;letter-spacing:.085em;margin-top:3px}
.platform-label{font-size:10px;font-weight:700;color:#8b818e}
.platform-label img{opacity:.52}
#pairSection,#certificateSection,#loginSection,.connect-card{order:2}
.stage-content{
 text-align:center;padding:24px 52px 20px;min-height:0;
 animation:stageIn .33s ease both;
}
.pair-visual{
 display:grid;place-items:center;position:relative;
 width:96px;height:96px;margin:0 auto 19px;
 border-radius:28px;background:linear-gradient(155deg,#fef8ff,#f5e5f7);
}
.pair-visual .phone-glyph{position:relative;display:block;width:43px;height:43px;color:#692879;filter:drop-shadow(0 3px 5px #78248714)}
.signal-ring{inset:-7px;border:1px solid #efcfef;border-radius:34px;animation:none}
.visual-check{
 right:-4px;bottom:-2px;width:28px;height:28px;border:3px solid white;
 background:#f1dff5;box-shadow:0 3px 8px #4b165019;
}
.visual-check img{opacity:.65}
.step-kicker{
 color:#ab25b4;letter-spacing:.13em;font-size:10px;
 font-weight:800;margin-bottom:8px;
}
.stage-content h2{font-size:29px;letter-spacing:-.045em;margin:0 0 10px;line-height:1.25;color:#251b29}
.stage-description{max-width:490px;margin:0 auto 24px;font-size:14px;color:#756d7d;line-height:1.85}
.button{
 border-radius:11px;min-height:52px;font-size:13px;font-weight:800;
 letter-spacing:.015em;
}
.primary{
 background:linear-gradient(100deg,#a522ac 0%,#b329bd 55%,#9323a0 100%);
 box-shadow:0 10px 24px rgba(162,35,177,.16);
 color:white;max-width:500px;
}
.primary:hover{background:linear-gradient(100deg,#9820a3,#a72eb3);box-shadow:0 10px 28px #b33bbc30}
.primary:active{transform:translateY(1px)}
.secondary{background:#faf4fb;border:1px solid #e7c6eb;color:#85248e}
.secondary:hover{background:#f8eafa;border-color:#d69bdc}
#pairHapp{width:100%;max-width:520px;min-height:59px;border-radius:12px;font-size:16px;letter-spacing:.06em}
#pairHapp.arrow-button::after{width:19px;height:19px}
.state-message{
 min-height:22px;margin:14px auto 4px;font-size:11px;
 color:#877e8b;max-width:500px;
}
.device-compatibility{font-size:10px;color:#857786;margin-top:12px}
.device-compatibility img{opacity:.65}
.stepper{
 order:3;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 gap:13px;margin:10px 40px 16px;padding:0;border:0;
}
.stepper li{
 min-width:0;min-height:82px;display:flex;flex-direction:column;
 justify-content:center;align-items:center;gap:4px;padding:12px 9px;
 background:#f7f5f8;color:#3f3545;font-weight:800;font-size:12px;
 border:1px solid #f0edf2;border-radius:12px;
 transition:background .2s ease,border-color .2s ease;
}
.stepper .step-number{
 display:block;width:auto;height:auto;border:0;background:none;
 border-radius:0;color:#817787;font-size:14px;font-weight:700;
}
.step-device{color:#9b29a7!important}
.step-device .step-number{background:none;border:0;color:#ae29b9}
html.happ-device-identified .step-certificate,html.happ-session-open .stepper li{color:#8a278e}
html.happ-device-identified .step-certificate .step-number,
html.happ-session-open .step-number,
html.happ-cert-complete .step-key .step-number{
 background:none;border:0;color:#ac21b2;
}
html.happ-device-identified .step-certificate,html.happ-session-open .stepper li,
html.happ-cert-complete .step-key{background:#faf0fb;border-color:#efd8f1}
.progress-track{order:4;height:3px;margin:0 40px;background:#f7f1f8;border-radius:99px;overflow:hidden}
.progress-track>span{background:linear-gradient(90deg,#bc33c4,#86209d)}
.connection-workspace>.connection-aside{
 order:5;display:block;grid-template-columns:none;gap:0;
 animation:none;padding:25px 43px 29px;margin:0;background:#fff;
}
.connection-overview{padding:0}
.connection-overview>.eyebrow,.connection-overview>h2,.connection-overview>.aside-description{display:none}
.connect-stats>div{
 display:flex;justify-content:space-between;align-items:center;
 min-height:65px;gap:14px;padding:14px 12px;
 border-bottom:1px solid #eee9f0;font-size:14px;
}
.connect-stats>div:last-child{border-bottom:0}
.connect-stats dt{display:flex;align-items:center;gap:11px;font-size:13px;color:#7c7381;flex-shrink:0}
.connect-stats dt img{width:17px;height:17px;opacity:.65;filter:sepia(.25) saturate(1.3)}
.connect-stats dd{font-size:13px;color:#2b2431;font-weight:800}
.aside-note{
 margin:12px 12px 22px;font-size:12px;color:#897f8d;line-height:1.75;
}
.device-summary{
 border-top:1px solid #eee9f0;margin:15px 0 0;padding:24px 12px 8px;
}
.aside-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.aside-section-heading h3{font-size:15px;color:#302834;margin:0;letter-spacing:-.015em}
.aside-section-heading>span{font-size:10px;color:#968995}
.real-device-grid>div{padding:9px 0;font-size:13px;align-items:baseline}
.real-device-grid dt{color:#847b88}
.real-device-grid dd{color:#403648;font-size:12px}
.app-download{
 display:flex;align-items:center;gap:14px;margin:24px 12px 0;
 padding:22px 0;border-top:1px solid #eee9f0;
}
.app-download>img{width:42px;height:42px;border-radius:11px}
.app-download strong{font-size:13px;color:#34253b}
.app-download a{font-size:12px;color:#9727a2}
.support-link{
 display:flex;gap:12px;align-items:center;margin:0 12px;
 padding:22px 0;border-top:1px solid #eee9f0;color:#8a7e8c;
}
.support-link strong{font-size:12px;color:#3b3040}
.support-link>img:first-child{opacity:.7}
.support-link>img:last-child{opacity:.55}
.workspace-footer{
 order:6;display:flex;align-items:center;justify-content:center;
 padding:14px 18px;min-height:49px;background:#fcf8fd;
 border-top:1px solid #eee7f0;color:#918593;font-size:10px;
}
.workspace-footer img{opacity:.62}
.page-footer{
 max-width:820px;margin:0 auto;padding:29px 6px 35px;border:0;
 font-size:10px;color:#9b8fa0;
}
.page-footer>span:nth-child(2){display:inline}
.footer-divider{color:#bda1c2}
.stage-icon{
 background:#f9ebfb;border-radius:17px;width:68px;height:68px;
 box-shadow:inset 0 0 0 1px #efd7f2;
}
.stage-icon img{opacity:.76}
.certificate-details,.menu-bridge-box,.key-summary{max-width:540px;margin-inline:auto}
.certificate-details{text-align:left;border-color:#eee6f0}
.certificate-details summary{color:#8f3299}
.device-note{color:#8f259e}
.login-zone form{max-width:500px}
input{
 min-height:52px;border:1px solid #e8e0eb;border-radius:10px;
 padding:12px 15px;background:#fdfbfe;color:#2e2633;
}
input:focus{border-color:#ad37ba;box-shadow:0 0 0 4px #f3e1f6}
input::placeholder{color:#a69baa}
.login-zone .primary{max-width:none}
.menu-bridge-box{text-align:left;background:#fbf8fc;border:1px solid #f0e7f2;border-radius:14px;padding:20px}
.menu-bridge-box h3{font-size:15px}
.menu-bridge-box p{font-size:12px}
.key-summary>div{border-color:#eee9f1}
#notice.ok{color:#27866a}
#notice.error{color:#bc344b}
.logout-button{color:#9e4163}
@media(min-width:1000px){
 .page-heading{padding-top:44px}
 .connection-workspace>.connection-aside{padding-inline:58px}
 .stage-content{padding-inline:65px}
 .stepper{margin-inline:55px}
 .progress-track{margin-inline:55px}
}
@media(max-width:760px){
 .container{width:calc(100% - 34px)}
 .nav-inner{min-height:76px;gap:12px}
 .nav-top{display:none}
 .site-brand{font-size:15px;letter-spacing:0}
 .brand-logo{width:46px;height:46px;border-radius:11px}
 .site-brand small{font-size:7px;letter-spacing:.1em;margin-top:5px}
 .lang-switch{margin-left:auto}
 .page-heading{padding:23px 1px 21px;align-items:start;gap:8px}
 .page-heading h1{font-size:26px}
 .heading-description{font-size:11px}
 .system-status{font-size:10px;margin-top:4px;max-width:150px}
 .connection-workspace{border-radius:19px}
 .workspace-heading{padding:20px 24px 7px}
 .stage-content{padding:23px 28px 15px;min-height:0}
 .stage-content h2{font-size:27px}
 .stage-description{font-size:13px}
 .stepper{margin:9px 26px 17px;gap:10px}
 .progress-track{margin:0 26px}
 .connection-workspace>.connection-aside{display:block;grid-template-columns:none;padding:20px 24px 26px}
 .device-summary{margin-top:12px}
 .page-footer{margin-top:0;padding-inline:1px}
}
@media(max-width:440px){
 .container{width:calc(100% - 28px)}
 .nav-inner{min-height:70px}
 .brand-logo{width:40px;height:40px}
 .site-brand{font-size:14px;gap:9px}
 .lang-switch button{min-width:31px;padding:6px 9px}
 .page-heading{display:block;padding:22px 2px 17px}
 .page-heading h1{font-size:24px}
 .page-heading .eyebrow{font-size:9px;margin-bottom:4px}
 .heading-description{font-size:11px}
 .system-status{font-size:10px;margin-top:10px;max-width:none}
 .workspace-heading{padding:18px 18px 7px}
 .workspace-title h2{font-size:13px}
 .workspace-title>img{width:32px;height:32px}
 .workspace-title p{font-size:8px}
 .platform-label{font-size:9px}
 .stage-content{padding:19px 19px 12px;min-height:0}
 .pair-visual{width:78px;height:78px;border-radius:22px;margin:5px auto 19px}
 .pair-visual .phone-glyph{width:39px;height:39px}
 .signal-ring{inset:-5px;border-radius:26px}
 .stage-content h2{font-size:24px}
 .step-kicker{font-size:9px}
 .stage-description{font-size:12px;line-height:1.75;margin-bottom:19px}
 #pairHapp{min-height:56px;font-size:14px}
 .state-message{font-size:10px}
 .device-compatibility{font-size:9px}
 .stepper{margin:8px 17px 15px;gap:8px}
 .stepper li{font-size:11px;min-height:72px;padding:10px 5px;border-radius:11px}
 .stepper .step-number{font-size:13px}
 .progress-track{margin:0 17px}
 .connection-workspace>.connection-aside{padding:15px 15px 20px;display:block}
 .connect-stats>div{padding:12px 7px;min-height:59px;font-size:12px}
 .connect-stats dt{font-size:12px;gap:7px}
 .connect-stats dd{font-size:12px}
 .aside-note{font-size:11px;margin:10px 7px 17px}
 .device-summary{padding:21px 7px 8px;margin-top:15px}
 .aside-section-heading h3{font-size:13px}
 .aside-section-heading>span{font-size:9px}
 .real-device-grid>div{font-size:12px;padding:7px 0}
 .real-device-grid dd{font-size:11px}
 .app-download,.support-link{margin-inline:7px}
 .app-download{padding-block:18px}
 .support-link{padding-block:18px}
 .page-footer{font-size:9px;padding:25px 6px 33px}
 .menu-input-row{flex-direction:column}
 .menu-input-row .button{width:100%}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important}
}
