:root{color-scheme:dark;--blue:#37baff;--pale:#cceeff;--gold:#ffd38c;--edge:#1269a6;--bg:#030b19}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 55% 2%,#143c67 0,#06162b 35%,#020817 75%);color:#f4faff;font:16px system-ui,-apple-system,Segoe UI,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #ffe09a;outline-offset:3px}#app{max-width:980px;min-height:100dvh;margin:auto;padding-bottom:94px}.top{height:86px;display:flex;align-items:center;justify-content:space-between;padding:12px 19px;background:#031020eb;border-bottom:1px solid #114269;position:sticky;top:0;z-index:5;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:12px;text-align:left;border:0;background:none;padding:0;min-width:0}.brand strong{display:block;letter-spacing:.18em;font-size:clamp(17px,4vw,28px);color:#d2f1ff;text-shadow:0 0 13px #299fff}.brand small{display:block;font-size:clamp(8px,1.9vw,11px);letter-spacing:.09em;color:var(--gold);font-weight:700}.mini-logo{width:51px;height:51px;flex-shrink:0;border:1px solid #b58a50;border-radius:13px;display:grid;place-items:center;background:radial-gradient(circle at 50% 18%,#ffe3a3,#17385d 28%,#020914 65%);color:#a9e7ff;font-size:34px;text-shadow:0 0 10px #00aaff}.head-actions{display:flex;gap:8px}.head-actions button,.iconbtn{background:#03142a;border:1px solid #125287;border-radius:13px;width:45px;height:45px;color:#a8e7ff;font-size:28px}.bottom{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,980px);z-index:6;display:grid;grid-template-columns:repeat(5,1fr);background:#041226f5;border-top:1px solid #1d608e;box-shadow:0 -10px 30px #0008;padding:10px 3px calc(9px + env(safe-area-inset-bottom))}.bottom button{border:0;background:transparent;color:#bdd3e7;font-size:11px;min-width:0;padding:4px 0}.bottom button span{display:block;font-size:28px;color:#89dfff;line-height:1.3}.bottom button.active{color:white;text-shadow:0 0 10px var(--blue);border-bottom:2px solid var(--blue)}main{padding:16px}.hero,.panel,.tile,.chat-shell{border:1px solid #1884c6;border-radius:23px;background:linear-gradient(145deg,#061a32ed,#020917f2);box-shadow:0 0 22px #005b9b38, inset 0 0 25px #0b4d7a24}.hero{position:relative;min-height:370px;overflow:hidden;padding:26px 22px 24px;display:flex;flex-direction:column;justify-content:end;background:radial-gradient(circle at 69% 26%,#8a5c32 0,#12395e 15%,transparent 39%),linear-gradient(140deg,#051326,#061c39 55%,#010710)}.hero:before{content:'';position:absolute;right:7%;top:3%;width:57%;height:62%;border:3px solid #e6ad61;border-radius:50%;box-shadow:0 0 30px #e9b168,0 0 65px #a56c37;opacity:.72}.hero:after{content:'✦  ·  ✧  ·  ✦';position:absolute;right:7%;top:13%;font-size:27px;letter-spacing:13px;color:#ffe6ad;opacity:.8}.hero-logo{position:absolute;right:4%;top:19%;width:55%;max-width:390px;filter:drop-shadow(0 0 13px #2caaff);text-align:center}.hero-logo svg{width:100%}.hero-logo b{display:block;font-size:clamp(32px,8vw,66px);line-height:1;letter-spacing:.13em;color:#a6e7ff;text-shadow:0 0 15px #008cff,0 2px 0 #fff}.hero-content{position:relative;z-index:2;max-width:410px;text-shadow:0 2px 9px #000}.eyebrow{font-size:12px;letter-spacing:.3em;color:var(--gold);font-weight:800}.hero h1{font-size:clamp(38px,8vw,64px);line-height:1.04;margin:12px 0}.hero h1 em{font-style:normal;color:var(--blue)}.hero p{max-width:310px;color:#e2f2ff;line-height:1.45}.primary{background:linear-gradient(110deg,#a6eaff,#36b7fa);color:#00172a;border:1px solid #d3faff;border-radius:30px;font-weight:800;padding:13px 24px;box-shadow:0 0 17px #00aaff8a}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:25px 2px 12px}.section-title h2{font-size:21px;margin:0}.link{background:none;border:0;color:var(--blue);font-weight:700}.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.tile{padding:0;overflow:hidden;text-align:left;min-height:163px;display:flex;flex-direction:column;justify-content:end;position:relative}.tile .art{position:absolute;inset:0;opacity:.78;background-size:cover;background-position:center}.tile:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 25%,#010817f5 95%)}.tile .tiletext{position:relative;z-index:1;padding:45px 12px 13px}.tile strong{display:block;font-size:19px}.tile small{display:block;color:#c4dded;font-size:12px;margin-top:4px}.tile .glyph{display:block;font-size:27px;color:#67d1ff;text-shadow:0 0 10px #00aeff}.departments{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.panel{padding:18px;margin-bottom:15px}.panel h2,.panel h3{margin-top:0}.muted{color:#aac4d9}.status{font-size:12px;color:#a9e8ff;border:1px solid #246c97;border-radius:20px;padding:5px 9px;display:inline-block}.chat-shell{height:calc(100dvh - 213px);min-height:370px;display:flex;flex-direction:column;overflow:hidden}.chat-head{display:flex;align-items:center;justify-content:space-between;padding:14px;border-bottom:1px solid #15527e;gap:8px}.chat-head h2{margin:0;font-size:22px}.chat-head p{margin:3px 0 0;font-size:12px;color:#a8c5d8}.messages{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.bubble{max-width:87%;border-radius:16px;padding:11px 14px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.user{align-self:flex-end;background:#0a5484}.bubble.mock{align-self:flex-start;background:#102a45;border:1px solid #24658b}.composer{display:flex;gap:8px;padding:12px;border-top:1px solid #15527e}.composer input{flex:1;min-width:0;border:1px solid #256b96;background:#06182b;border-radius:23px;padding:12px;color:white}.composer button{min-width:52px}.smallbtn{background:#0c2b46;border:1px solid #23638e;border-radius:12px;padding:9px 13px}.actions{display:flex;flex-wrap:wrap;gap:9px}.data-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid #1c4565}.data-row:last-child{border-bottom:0}.warning{color:#ffda9e;font-size:13px}.empty{padding:30px 10px;text-align:center;color:#aac8dc}.search-input{width:100%;border:1px solid #2876a5;border-radius:14px;background:#061a31;padding:14px;color:white;margin-bottom:16px}.feed-card{padding:17px;border:1px solid #1b6795;border-radius:18px;background:#071b31;margin-bottom:12px}.feed-card h3{margin:0 0 8px}@media(min-width:700px){.tiles{grid-template-columns:repeat(4,1fr)}.departments{grid-template-columns:repeat(5,1fr)}.hero{min-height:440px}.tile{min-height:190px}}@media(max-width:380px){.brand strong{letter-spacing:.09em}.mini-logo{width:42px;height:42px}.top{padding:10px}.head-actions button{width:38px;height:42px}.hero-logo{opacity:.75}.hero h1{font-size:38px}}
/* v1.1: one chat surface per department; composer stays inside its room. */
#view:has(.chat-shell){padding:12px 12px 0}
#view:has(.chat-shell) .chat-shell{height:calc(100dvh - 86px - 91px - env(safe-area-inset-bottom) - 24px);min-height:260px;max-height:none}
.chat-shell{isolation:isolate}.chat-shell .messages{min-height:0;overscroll-behavior:contain}.chat-shell .composer{position:relative;flex-shrink:0;background:#041529;z-index:1}.chat-shell .chat-head{flex-shrink:0}
@media(max-height:540px){#view:has(.chat-shell) .chat-shell{min-height:180px}.chat-head{padding:7px 12px}.composer{padding:7px}}

/* Atlas Social cinematic theme v2 — preserve all demo interactions. */
body{background:#020918}
.top{height:76px;background:#031126e8;box-shadow:0 2px 20px #008fff20}
#view:has(.my-atlas){padding:0!important}
#view:has(.my-atlas) .chat-shell{height:calc(100dvh - 76px - 83px - env(safe-area-inset-bottom));min-height:280px;max-height:none;border:0;border-radius:0;box-shadow:none}
.my-atlas{position:relative;background:#031124 url('atlas-mountain.webp') center center / cover no-repeat;isolation:isolate}
.my-atlas:before{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#020c20bb 0%,transparent 24%,transparent 70%,#020c20a8 100%);pointer-events:none;z-index:0}
.my-atlas>.chat-head,.my-atlas>.messages,.my-atlas>.composer{position:relative;z-index:1}
.my-atlas .chat-head{margin:9px 10px 0;padding:10px 12px;border:1px solid #48bfff99;border-radius:18px;background:#04142dc9;backdrop-filter:blur(14px);box-shadow:0 0 18px #008cff55}
.chat-identity{display:flex;align-items:center;gap:10px;min-width:0}.chat-identity h2{font-size:19px}.chat-identity p{font-size:11px;color:#6de6cb}.avatar{display:grid;place-items:center;flex-shrink:0;width:43px;height:43px;border-radius:50%;color:#b7efff;background:radial-gradient(circle at 50% 20%,#ffe8a4,#1578b9 45%,#021129 80%);border:1px solid #77d9ff;box-shadow:0 0 12px #19baff}
.my-atlas .smallbtn{font-size:12px;padding:9px 10px;white-space:nowrap;background:#071d37c9}
.my-atlas .messages{background:transparent;padding:16px 13px;min-height:0;overscroll-behavior:contain}
.my-atlas .bubble{background:#04182bdf;backdrop-filter:blur(12px);border:1px solid #3cb7efb0;box-shadow:0 0 12px #009fff35;text-shadow:0 1px 3px #000}
.my-atlas .bubble.user{background:#0a4777e8;align-self:flex-end}
.my-atlas .composer{margin:0 9px 10px;border:1px solid #43bfff;border-radius:20px;padding:8px;background:#03152be8;backdrop-filter:blur(14px);box-shadow:0 0 16px #00aaff77}
.my-atlas .composer input{background:#06172bba;border:2px solid #42bfff;border-radius:22px;box-shadow:inset 0 0 10px #007adf55}
.my-atlas .composer button{border-radius:50%;min-width:52px;width:52px;height:52px;font-size:23px}
.bottom{background:#03142af5;box-shadow:0 -5px 25px #0065bd55;border-top:1px solid #34bfff}
@media(max-height:540px){#view:has(.my-atlas) .chat-shell{min-height:180px}.my-atlas .chat-head{margin-top:3px;padding:5px}.my-atlas .composer{margin-bottom:3px;padding:4px}}

/* v3: single cinematic chat for every department, original mountain asset restored */
#view:has(.my-atlas){padding:0!important}
#view:has(.my-atlas) .chat-shell{height:calc(100dvh - 76px - 83px - env(safe-area-inset-bottom));min-height:0}
.my-atlas{background-image:linear-gradient(180deg,#020b1d38,#020b1d05 50%,#020b1d4a),url('atlas-mountain.webp');background-size:cover;background-position:center 53%}
.my-atlas .messages{flex:1;min-height:0;overflow-y:auto}
.my-atlas .composer{flex-shrink:0;display:flex;align-items:center;gap:9px}
.my-atlas .composer button{padding:0;display:grid;place-items:center;flex:0 0 52px;line-height:1}
.my-atlas .composer button svg{display:block;margin:0;transform:none}
.my-atlas .composer input{min-width:0}
/* Hero: keep mountain mark and copy in separate zones on small screens */
@media(max-width:699px){
 .hero{min-height:515px;padding:20px 20px 24px;justify-content:flex-end}
 .hero-logo{top:45px;right:8%;width:49%;max-width:230px;pointer-events:none}
 .hero-logo b{font-size:clamp(25px,7vw,43px)}
 .hero:before{top:14px;right:4%;height:245px;width:62%;border-radius:50%}
 .hero:after{top:40px;right:4%}
 .hero-content{max-width:100%;padding-top:230px}
 .hero h1{font-size:clamp(36px,9vw,47px);line-height:1.04;margin:10px 0}
 .hero p{max-width:285px;font-size:14px}
}
@media(max-width:380px){.hero{min-height:520px}.hero-logo{top:48px;width:45%}.hero h1{font-size:37px}}
@media(max-height:550px){#view:has(.my-atlas) .chat-shell{min-height:0}.my-atlas .chat-head{margin-top:3px;padding:5px}.my-atlas .composer{margin-bottom:3px;padding:4px}}
