.sna-app{display:flex;width:100vw;position:relative;left:50%;margin-left:-50vw;min-height:100vh;min-height:100dvh;height:100vh;height:100dvh;max-height:none;background:#fff;color:#202123;border:0;border-radius:0;overflow:hidden;font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.sna-sidebar{width:250px;flex:0 0 250px;background:#f7f7f8;border-right:1px solid #e5e7eb;display:flex;flex-direction:column;padding:14px;gap:18px}.sna-new{border:1px solid #d9d9e3;background:#fff;border-radius:10px;padding:12px;text-align:left;font-size:14px;cursor:pointer}.sna-muted{font-size:12px;color:#777;margin:8px 4px}.sna-history-list{display:grid;gap:4px}.sna-history-item{border:0;background:transparent;text-align:left;padding:9px;border-radius:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.sna-history-item:hover,.sna-new:hover{background:#ececf1}.sna-side-bottom{margin-top:auto;color:#777;font-size:12px;padding:8px}.sna-main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative}.sna-top{height:58px;border-bottom:1px solid #eee;display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:12px}.sna-top strong{font-size:16px}.sna-top span{font-size:13px;color:#777}.sna-messages{flex:1;overflow:auto;padding:28px max(18px,calc((100% - 760px)/2));}.sna-welcome{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.sna-mark{height:48px;width:48px;border-radius:50%;background:var(--sna-accent);color:white;display:grid;place-items:center;font-weight:700;margin-bottom:16px}.sna-welcome h1{font-size:26px;margin:0 0 10px}.sna-welcome p{color:#666;max-width:560px}.sna-suggestions{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:10px;margin-top:22px;width:min(100%,520px)}.sna-suggestions button{background:#fff;border:1px solid #e1e1e8;border-radius:12px;padding:14px;text-align:left;cursor:pointer}.sna-suggestions button:hover{border-color:var(--sna-accent);background:#f9fbff}.sna-row{display:flex;gap:12px;max-width:760px;margin:0 auto 22px;white-space:pre-wrap;overflow-wrap:anywhere}.sna-avatar{width:30px;height:30px;flex:0 0 30px;border-radius:50%;display:grid;place-items:center;background:#eee;font-size:12px;font-weight:700}.sna-row.sna-assistant .sna-avatar{background:var(--sna-accent);color:white}.sna-content{padding-top:3px;flex:1}.sna-content p:first-child{margin-top:0}.sna-content p:last-child{margin-bottom:0}.sna-composer{width:min(760px,calc(100% - 32px));margin:0 auto 8px;border:1px solid #d9d9e3;border-radius:18px;display:flex;align-items:flex-end;gap:10px;padding:10px;box-shadow:0 4px 18px #0000000b}.sna-composer:focus-within{border-color:#aaa}.sna-composer textarea{flex:1;min-width:0;height:110px!important;min-height:110px!important;max-height:150px!important;resize:vertical;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;padding:8px!important;font:inherit!important;color:inherit!important}.sna-send{background:var(--sna-accent);color:white;border:0;border-radius:10px;min-width:66px;height:42px;padding:0 14px;font-weight:600;cursor:pointer}.sna-send:disabled{opacity:.55;cursor:wait}.sna-disclaimer{text-align:center;color:#888;font-size:11px;padding:4px 12px 12px}.sna-login{padding:20px;border:1px solid #ddd;border-radius:8px}.sna-error{color:#a11;background:#fff4f4;border-radius:8px;padding:12px}.sna-typing{color:#777;font-style:italic}@media(max-width:700px){.sna-app{width:100vw;min-height:100vh;min-height:100dvh;height:100vh;height:100dvh;max-height:none}.sna-sidebar{width:60px;flex-basis:60px;padding:8px}.sna-new{font-size:0;text-align:center;padding:12px 2px}.sna-new:after{content:'＋';font-size:20px}.sna-history,.sna-side-bottom{display:none}.sna-top{padding:0 12px}.sna-top span{display:none}.sna-messages{padding:18px 12px}.sna-welcome h1{font-size:22px}.sna-suggestions{grid-template-columns:1fr}.sna-composer{width:calc(100% - 20px)}}

/* Full-viewport portal layout: avoid theme container width constraints. */
html:has(.sna-app),body:has(.sna-app){margin:0;max-width:100%;}
body:has(.sna-app) .sna-app{box-sizing:border-box;}
.sna-app,.sna-app *{box-sizing:border-box;}
.sna-main{height:100%;min-height:0;}
.sna-messages{min-height:0;}
@supports(height:100dvh){.sna-app{height:100dvh;min-height:100dvh;}}

/* SYSNOW branding in upper-left corner of AI portal */
.sna-top{height:auto;min-height:76px;}
.sna-top-brand{display:flex;align-items:center;gap:20px;min-width:0;}
.sna-brand-logo{display:block;width:204px;max-width:42vw;height:auto;object-fit:contain;flex-shrink:0;}
@media(max-width:700px){.sna-top{min-height:66px}.sna-top-brand{gap:10px}.sna-brand-logo{width:135px;max-width:38vw}.sna-top-brand strong{font-size:13px;}}

/* Official SYSNOW logo, positioned above New Chat in the left sidebar. */
.sna-sidebar-brand{display:flex;align-items:center;justify-content:flex-start;width:100%;padding:8px 2px 4px;box-sizing:border-box;}
.sna-sidebar-brand img{display:block;width:100%;max-width:220px;height:auto;object-fit:contain;}
@media(max-width:700px){.sna-sidebar-brand{padding:6px 0 2px}.sna-sidebar-brand img{width:100%;height:auto}}

.sna-account{margin-left:auto;display:flex;gap:12px;align-items:center;font-size:14px}
.sna-account a{color:#2563eb;text-decoration:none}
.sna-account details{position:relative}
.sna-account summary{cursor:pointer;list-style:none;padding:9px 13px;border:1px solid #dbe1ed;border-radius:10px;color:#18213b;font-weight:600}
.sna-account-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:30;min-width:190px;background:#fff;border:1px solid #dbe1ed;box-shadow:0 8px 30px #0002;border-radius:10px;padding:14px;display:grid;gap:12px;overflow-wrap:anywhere}
.sna-account-panel span{color:#657188;font-size:12px}
.sna-auth-page{min-height:100vh;background:#f4f7fc;color:#17213a;font:16px/1.5 system-ui,sans-serif}
.sna-auth-header{display:flex;justify-content:space-between;align-items:center;padding:16px max(22px,calc((100% - 1100px)/2));background:white;border-bottom:1px solid #e1e7f1;gap:20px}
.sna-auth-header img{width:205px;max-width:50%;height:auto;object-fit:contain}
.sna-auth-body{max-width:960px;margin:60px auto;padding:0 20px;text-align:center}
.sna-auth-body h1{font-size:32px}
.sna-auth-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;text-align:left;margin-top:35px}
.sna-auth-card{background:white;border:1px solid #e1e7f1;border-radius:16px;padding:28px;box-shadow:0 5px 25px #17213a0b}
.sna-auth-card h2{margin-top:0}
.sna-auth-card form{display:grid;gap:15px}
.sna-auth-card label{display:grid;gap:6px;font-weight:600;font-size:14px}
.sna-auth-card input{width:100%;box-sizing:border-box;padding:12px;border:1px solid #cad4e5;border-radius:8px;font-size:15px}
.sna-auth-card button{border:0;background:#2563eb;color:white;padding:12px;border-radius:8px;font-weight:700;cursor:pointer}
.sna-auth-card p{font-size:12px;color:#657188}
.sna-auth-error{padding:12px;background:#fff0f0;color:#a12626;border-radius:8px}
.sna-honeypot{position:absolute!important;left:-9999px!important;opacity:0!important}
@media(max-width:700px){.sna-auth-grid{grid-template-columns:1fr}.sna-auth-body{margin:24px auto}.sna-auth-header img{width:135px}.sna-top .sna-account{font-size:12px}}

/* 1.0.10: keep the assistant visible; open account forms from top-right links */
.sna-auth-overlay{display:none;position:fixed;inset:0;z-index:99999;overflow:auto;background:rgba(15,23,42,.76);min-height:100vh}
body:has(#sna-login:target) .sna-auth-overlay,body:has(#sna-register:target) .sna-auth-overlay{display:block}
.sna-auth-overlay .sna-auth-header{display:none}
.sna-auth-overlay .sna-auth-body{position:relative;background:#f4f7fc;border-radius:18px;padding:30px 24px;margin:5vh auto;max-width:960px}
.sna-auth-close{position:absolute;right:20px;top:12px;font-size:30px;text-decoration:none;color:#17213a}
.sna-auth-overlay .sna-auth-grid{margin-top:20px}
@media(max-width:700px){.sna-auth-overlay .sna-auth-body{margin:12px}.sna-auth-overlay .sna-auth-grid{grid-template-columns:1fr}}

.sna-auth-modal[hidden]{display:none!important}
.sna-auth-modal{position:fixed;inset:0;z-index:999999;background:#0b1739aa;display:flex;align-items:center;justify-content:center;padding:18px;box-sizing:border-box}
.sna-auth-dialog{position:relative;width:min(960px,100%);max-height:92vh;overflow:auto;background:#f4f7fc;border-radius:18px}
.sna-auth-close{position:sticky;top:8px;float:right;margin:10px 14px 0 0;z-index:2;font-size:26px;background:white;border:1px solid #ddd;border-radius:8px;cursor:pointer}
.sna-auth-dialog .sna-auth-page{min-height:0}
.sna-auth-dialog .sna-auth-header{display:none}
.sna-auth-dialog .sna-auth-body{margin:20px auto 32px}

.sna-profile-wrap{box-sizing:border-box;max-width:760px;margin:32px auto;padding:28px;background:#fff;color:#17213a;border:1px solid #e1e7f1;border-radius:16px;font:16px/1.5 system-ui,sans-serif}
.sna-profile-top{display:flex;align-items:center;justify-content:space-between;gap:20px}
.sna-profile-top img{width:190px;max-width:55%;height:auto}
.sna-profile-form{display:grid;gap:16px;margin-top:25px}
.sna-profile-form label{display:grid;gap:6px;font-weight:600}
.sna-profile-form input{box-sizing:border-box;width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}
.sna-profile-form input[readonly]{background:#f1f5f9;color:#64748b}
.sna-profile-actions{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.sna-profile-actions button{background:#2563eb;color:white;border:0;border-radius:8px;padding:12px 22px;cursor:pointer}
.sna-profile-status{padding:12px;background:#eef7ee;border-radius:8px}
