@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
*{box-sizing:border-box}
body.heaven{margin:0;min-height:100vh;font-family:Georgia,'Times New Roman',serif;text-align:center;color:#2f4468;background:radial-gradient(ellipse at 50% 0%,#fff8d6 0%,rgba(255,248,214,0) 55%),linear-gradient(180deg,#bfe3ff 0%,#e9f5ff 55%,#fff 100%) fixed}
.wrap{max-width:900px;margin:0 auto;padding:40px 20px 80px}
h1.angel{font-family:'Great Vibes','Snell Roundhand','Brush Script MT',cursive;font-size:clamp(56px,11vw,128px);line-height:1.1;margin:0 0 40px;font-weight:400;color:#fff;text-shadow:0 0 12px #f6d365,0 0 28px rgba(246,211,101,.9),0 0 52px rgba(255,240,170,.8),0 2px 3px rgba(120,150,200,.55)}
.btns{list-style:none;margin:0 auto;padding:0;max-width:560px;display:flex;flex-direction:column;gap:18px}
.btn,.btns a{display:block;padding:22px 28px;font:inherit;font-size:24px;letter-spacing:2px;text-decoration:none;cursor:pointer;color:#2f4468;background:rgba(255,255,255,.9);border:2px solid #f6d365;border-radius:60px;box-shadow:0 8px 24px rgba(120,160,210,.28),0 0 18px rgba(246,211,101,.35);transition:transform .25s,box-shadow .25s}
.btn:hover,.btns a:hover{transform:translateY(-4px) scale(1.02);box-shadow:0 12px 30px rgba(120,160,210,.4),0 0 32px rgba(246,211,101,.8)}
.back{display:inline-block;margin-bottom:10px;color:#2f4468;text-decoration:none;letter-spacing:2px}
.games{display:flex;flex-wrap:wrap;gap:18px;justify-content:center;margin-bottom:30px}
.games .btn{padding:18px 34px}
#frame{display:none;width:100%;max-width:560px;height:850px;border:0;border-radius:16px;background:#faf8ef;margin:0 auto}
#frame.on{display:block}
#gate{position:fixed;inset:0;z-index:99;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:20px;background:radial-gradient(ellipse at 50% 0%,#fff8d6 0%,rgba(255,248,214,0) 55%),linear-gradient(180deg,#bfe3ff 0%,#e9f5ff 55%,#fff 100%)}
#gate h1{margin:0}
#gate p{margin:0;max-width:420px;color:#5b6f8f}
#who{position:fixed;top:12px;right:16px;z-index:50;font-size:15px;color:#2f4468;display:none;align-items:center;gap:10px}
#who img{width:32px;height:32px;border-radius:50%;border:2px solid #f6d365}
#who button{font:inherit;font-size:14px;padding:6px 14px;border:1px solid #f6d365;border-radius:20px;background:#fff;cursor:pointer;color:#2f4468}
body.blank{background:#fff}
body.im{margin:0;min-height:100vh;font-family:Georgia,'Times New Roman',serif;color:#2f4468;background:linear-gradient(180deg,#e9f5ff 0%,#fff 60%) fixed}
.imwrap{max-width:1000px;margin:0 auto;padding:20px 16px 40px}
.imgrid{display:grid;grid-template-columns:320px 1fr;gap:16px;height:calc(100vh - 110px);min-height:480px}
.side,.chat{background:#fff;border:1px solid #f6d365;border-radius:16px;box-shadow:0 6px 20px rgba(120,160,210,.22);display:flex;flex-direction:column;overflow:hidden;min-height:0}
.tabs{display:flex;border-bottom:1px solid #f1e3b0}
.tab{flex:1;padding:12px 4px;font:inherit;font-size:15px;border:0;background:none;cursor:pointer;color:#5b6f8f}
.tab.on{color:#2f4468;font-weight:bold;background:#fff8d6}
.badge{background:#d9534f;color:#fff;border-radius:10px;padding:1px 7px;font-size:12px}
.panel{overflow-y:auto;padding:10px;flex:1}
.panel h4{margin:10px 4px 6px;color:#5b6f8f}
.row{display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px;cursor:pointer}
.row:hover,.row.sel{background:#fff8d6}
.row .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.av{width:36px;height:36px;border-radius:50%;border:2px solid #f6d365;background:#eef5ff;flex:none}
.mini{font:inherit;font-size:13px;padding:5px 10px;border:1px solid #f6d365;border-radius:14px;background:#fff;cursor:pointer;color:#2f4468}
.mini.ok{background:#f6d365}
.mini:disabled{opacity:.55;cursor:default}
.empty{color:#7b8ba8;font-size:14px;margin:8px 4px;text-align:left}
#searchform,#sendform{display:flex;gap:8px;padding:6px 0}
#searchform input,#sendform input{flex:1;min-width:0;font:inherit;padding:10px 12px;border:1px solid #cfdcf0;border-radius:20px;outline:none}
#searchform button,#sendform button{font:inherit;padding:8px 16px;border:1px solid #f6d365;border-radius:20px;background:#f6d365;cursor:pointer;color:#2f4468}
#sendform{padding:10px;border-top:1px solid #f1e3b0}
#chathead{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid #f1e3b0;font-size:18px;background:#fff8d6}
#msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:6px;min-height:0}
.bub{max-width:75%;padding:8px 13px;border-radius:16px;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left}
.bub.me{align-self:flex-end;background:#f6d365}
.bub.them{align-self:flex-start;background:#eaf2ff}
@media(max-width:720px){.imgrid{grid-template-columns:1fr;height:auto}.side{max-height:320px}.chat{height:70vh}}

/* Gaming page: frame + leaderboard */
.wrap.wide{max-width:1000px}
.stage{display:flex;gap:18px;justify-content:center;align-items:flex-start;flex-wrap:wrap}
.stage #frame{margin:0;flex:1 1 400px;width:auto;min-width:300px}
#lb{display:none;width:250px;flex:0 0 250px;text-align:left;background:rgba(255,255,255,.9);border:2px solid #f6d365;border-radius:16px;padding:14px 16px;box-shadow:0 8px 24px rgba(120,160,210,.3)}
#lb h3{margin:0 0 10px;font-size:19px;letter-spacing:1px;text-align:center}
#lb-tabs{display:flex;gap:6px;justify-content:center;margin-bottom:10px}
#lb-tabs button{font:inherit;font-size:13px;padding:4px 10px;border:1px solid #f6d365;border-radius:14px;background:#fff;color:#2f4468;cursor:pointer}
#lb-tabs button.on{background:#f6d365}
#lb-list{list-style:none;margin:0;padding:0}
#lb-list li{display:flex;align-items:center;gap:8px;padding:6px 4px;border-bottom:1px solid #eef3fa;font-size:15px}
#lb-list li.me{background:#fff6d6;border-radius:8px}
#lb-list li.empty{justify-content:center;color:#7c8fae;border:0}
#lb-list .rk{width:18px;text-align:center;font-weight:bold;color:#b8943a}
#lb-list img{width:24px;height:24px;border-radius:50%;background:#dbe7f7}
#lb-list .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lbnote{margin:10px 0 0;font-size:12px;color:#7c8fae;text-align:center}
@media(max-width:860px){#lb{width:100%;flex-basis:100%}}

#who .adminlink{color:#2f4468;font-size:14px;padding:6px 12px;border:1px solid #f6d365;border-radius:20px;background:#fff6d6;text-decoration:none}

#headbtns{display:flex;gap:6px}
.msgwrap{display:flex;align-items:center;gap:4px;max-width:85%}
.msgwrap.me{align-self:flex-end}.msgwrap.them{align-self:flex-start}
.msgwrap .bub{max-width:100%}
.delmsg{border:0;background:none;color:#9aa8c2;cursor:pointer;font-size:16px;opacity:0;padding:0 4px}
.msgwrap:hover .delmsg{opacity:1}
.receipt{align-self:flex-end;font-size:12px;color:#7b8ba8;margin:-2px 4px 2px}
.bub.media{padding:4px;background:#f3f7fd}
.chatimg{display:block;max-width:100%;max-height:320px;border-radius:12px;cursor:zoom-in}
.chatvid{display:block;max-width:100%;max-height:320px;border-radius:12px;background:#000}
#sendstatus{padding:4px 14px;font-size:13px;color:#5b6f8f;border-top:1px solid #f1e3b0}
#attach{padding:8px 12px !important}
#incoming{position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:60;background:#fff8d6;border:2px solid #f6d365;border-radius:16px;padding:12px 18px;display:flex;gap:10px;align-items:center;box-shadow:0 8px 30px rgba(0,0,0,.25)}
#incoming[hidden],#callbox[hidden],#lightbox[hidden]{display:none}
#callbox{position:fixed;inset:0;z-index:70;background:#0b1220}
#remotevid{width:100%;height:100%;object-fit:contain;background:#0b1220}
#localvid{position:absolute;right:16px;bottom:90px;width:180px;max-width:30%;border-radius:12px;border:2px solid #fff;background:#000;transform:scaleX(-1)}
#calllabel{position:absolute;top:16px;left:0;right:0;text-align:center;color:#fff;font-size:18px;text-shadow:0 1px 4px #000}
#callbtns{position:absolute;bottom:22px;left:0;right:0;display:flex;gap:12px;justify-content:center}
#callbtns button{font:inherit;padding:10px 20px;border-radius:24px;border:0;cursor:pointer;background:#fff;color:#2f4468}
#callbtns #hangup{background:#d9534f;color:#fff}
#lightbox{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;cursor:zoom-out}
#lightbox img{max-width:95vw;max-height:95vh}
[hidden]{display:none !important}
