/* Main simulator styling. Keep responsive and X in-app browser fixes here. */
*{box-sizing:border-box}body{margin:0;padding:0;background:#000;font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;color:#fff}.wrap{width:100%;max-width:none;margin:0}.device{padding:0;border:0;border-radius:0;background:#000;box-shadow:none;width:100%;height:var(--app-height,100svh)}.screen{height:var(--app-height,100svh);max-height:none;min-height:0;border-radius:0;overflow:hidden;position:relative;background:#f8f8fa;color:#222}.island{position:absolute;top:8px;left:50%;transform:translateX(-50%);width:92px;height:24px;border-radius:18px;background:#050505;z-index:9}.status{position:absolute;top:0;left:0;right:0;height:34px;z-index:8;display:flex;justify-content:space-between;align-items:center;padding:0 22px;font-size:12px;font-weight:650;pointer-events:none;color:white}.view{height:100%;overflow:auto;scrollbar-width:none}.view.photo-mode{background:#000}.view::-webkit-scrollbar{display:none}.lock,.pass{height:100%;min-height:570px;display:flex;flex-direction:column;align-items:center;padding:73px 22px 27px;background-image:linear-gradient(180deg,#0002,#0003),url("assets/photos/wallpaper.jpeg");background-size:cover;background-position:center;background-repeat:no-repeat;color:white}.date{font-size:14px;text-align:center}.clock{font-size:75px;font-weight:250;letter-spacing:-4px;line-height:1.15;margin:3px 0 25px}.locknotif{width:100%;border:1px solid #ffffff44;border-radius:16px;background:#ffffffd9;color:#28242e;padding:11px 12px;text-align:left;margin-bottom:9px}.locknotif small{display:flex;justify-content:space-between;font-size:10px;color:#777;margin-bottom:5px}.locknotif b{display:block;font-size:12px;margin-bottom:3px}.locknotif span{font-size:12px}.unlock,.primary{width:100%;border:0;border-radius:12px;padding:13px;background:#1686ee;color:white;font-size:12px;font-weight:650;margin-top:15px}.pass{padding-top:90px}.passtitle{font-size:20px;font-weight:600;margin:12px 0 7px}.passsub{font-size:12px;color:#ffffffdf;text-align:center;min-height:30px}.dots{display:flex;gap:17px;margin:23px 0 30px}.dot{height:10px;width:10px;border-radius:50%;border:1px solid #fff}.dot.filled{background:#fff}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 18px;width:100%;max-width:270px}.key{height:68px;width:68px;justify-self:center;border:1px solid #ffffff55;border-radius:50%;background:#ffffff20;color:white;font-size:29px;font-weight:300;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}.key small{font-size:8px;letter-spacing:1.4px;font-weight:650;margin-top:3px}.blank{visibility:hidden}.cancel{margin-top:auto;background:none;border:0;color:white;font-size:14px}.home{height:100%;min-height:570px;padding:66px 18px 22px;display:flex;flex-direction:column;background-image:linear-gradient(180deg,#0002,#0003),url("assets/photos/wallpaper.jpeg");background-size:cover;background-position:center;background-repeat:no-repeat}.widget{display:flex;align-items:center;gap:12px;padding:12px;background:#ffffffdc;color:#28242c;border-radius:20px;margin-bottom:26px;min-height:89px}.calwidget{width:53px;flex-shrink:0;border-radius:10px;background:white;overflow:hidden;text-align:center;font-size:22px;font-weight:650;padding-bottom:4px}.calwidget b{display:block;background:#ed4c4c;color:white;font-size:9px;letter-spacing:1px;padding:5px}.wtext{font-size:11px;line-height:1.5}.wtext strong{display:block;font-size:13px;margin-bottom:3px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px 8px}.app{background:transparent;border:0;color:white;padding:0;display:flex;align-items:center;flex-direction:column;gap:5px}.icon{height:58px;width:58px;border-radius:14px;display:grid;place-items:center;overflow:hidden;box-shadow:0 3px 9px #29243830}.icon svg{width:58px;height:58px}.app span{font-size:11px;text-shadow:0 1px 4px #3339;white-space:nowrap}.dock{margin-top:auto;display:flex;justify-content:space-evenly;align-items:center;gap:0;width:100%;padding:12px 10px;background:#ffffff48;border:1px solid #ffffff45;border-radius:25px;backdrop-filter:blur(18px)}.dock .app{flex:1;min-width:0}.dock .app span{display:none}.dock .icon{height:51px;width:51px;border-radius:13px}.dock .icon svg{height:51px;width:51px}.bar{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:10px;padding:43px 15px 12px;background:#ffffffed;backdrop-filter:blur(15px);border-bottom:1px solid #eee;color:#222}.back{border:0;background:transparent;color:#1686ee;font-size:14px;padding:4px 0}.title{font-size:19px;font-weight:700;flex:1}.content{padding:14px 16px 25px;color:#222}.muted{font-size:12px;color:#888}.thread{display:flex;align-items:center;gap:11px;width:100%;border:0;border-bottom:1px solid #eee;background:white;padding:13px 0;text-align:left;color:#222}.avatar{width:46px;height:46px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;color:white;font-size:17px;background:linear-gradient(140deg,#c8a8c2,#76658b)}.threadmain{flex:1;min-width:0}.threadname{font-size:13px;font-weight:650;margin-bottom:5px}.preview{font-size:11px;color:#85858b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.time{font-size:10px;color:#888;align-self:flex-start;padding-top:2px}.chat{min-height:530px;background:#f5f2ee;padding:13px 11px 20px;display:flex;flex-direction:column;color:#222}.day{text-align:center;font-size:10px;color:#888;margin:7px 0 17px}.convo-divider{align-self:center;margin:18px 0 14px;padding:5px 12px;border-radius:12px;background:#e8e4df;color:#777;font-size:9px;font-weight:650;letter-spacing:.7px}.bubble{max-width:85%;padding:10px 12px;border-radius:17px;font-size:12px;line-height:1.5;margin-bottom:9px;white-space:pre-wrap;overflow-wrap:anywhere}.other{background:white;align-self:flex-start;border-bottom-left-radius:5px}.mine{background:#d7f8c6;align-self:flex-end;border-bottom-right-radius:5px}.bt{font-size:9px;color:#858585;text-align:right;margin-top:4px}.photoGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;margin:0 -16px;scrollbar-width:none}.photo{display:block;width:100%;aspect-ratio:1/1;border:0;border-radius:0;overflow:hidden;background:#111;padding:0;min-width:0}.photo img{display:block;width:100%;height:100%;object-fit:cover}.pcap,.pdate{display:none}.photoViewer{height:100%;min-height:0;width:100%;background:#000;color:#fff;display:flex;flex-direction:column;overflow:hidden;flex:1}.viewerTop{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 15px;flex-shrink:0}.viewerTop button{border:0;border-radius:50%;background:#292929;color:white;width:36px;height:36px;font-size:22px}.viewerDate{text-align:center;font-size:12px;font-weight:650}.viewerDate small{display:block;font-size:10px;font-weight:400;margin-top:2px}.viewerStrip{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;flex:1;min-height:0;-webkit-overflow-scrolling:touch;align-items:center}.viewerStrip::-webkit-scrollbar{display:none}.viewerSlide{flex:0 0 100%;width:100%;height:100%;display:flex;align-items:center;justify-content:center;scroll-snap-align:center;border:0;background:#000;padding:0}.viewerSlide img{width:100%;height:100%;max-height:100%;object-fit:contain}.viewerThumbs{height:50px;display:flex;gap:3px;overflow-x:auto;scrollbar-width:none;padding:4px 8px;flex-shrink:0}.viewerThumbs::-webkit-scrollbar{display:none}.viewerThumbs button{height:40px;width:32px;flex:0 0 32px;padding:0;border:0;background:#222;opacity:.7}.viewerThumbs button.active{outline:2px solid white;opacity:1}.viewerThumbs img{height:100%;width:100%;object-fit:cover}.note{width:100%;display:block;text-align:left;border:0;background:#fff2b8;border-radius:10px;padding:13px;margin-bottom:10px;color:#39352b}.notetitle{font-size:13px;font-weight:700;margin-bottom:6px}.notebody{font-size:12px;line-height:1.8;white-space:pre-line}.event{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #eee}.datebox{width:47px;height:49px;flex-shrink:0;border:1px solid #eee;border-radius:9px;overflow:hidden;text-align:center}.datebox b{display:block;font-size:9px;color:#e64b4b;padding:5px}.datebox strong{font-size:17px}.etitle{font-size:13px;font-weight:650;margin-bottom:5px}.edesc{font-size:11px;line-height:1.55;color:#777}.clue{background:#f0e6f1;color:#5d4761;padding:12px;border-radius:12px;font-size:12px;line-height:1.6;margin-top:15px}.detailimg{width:100%;max-height:400px;object-fit:contain;border-radius:12px;background:#eee}.foot{text-align:center;color:#888;font-size:11px;line-height:1.6;margin:14px auto 0}
@media(max-width:600px){html,body{width:100%;height:100%;overflow:hidden}.wrap,.device,.screen{width:100%;height:100dvh;height:100svh}.view{overscroll-behavior:contain}}
.swipe-up{margin-top:auto;margin-bottom:7px;display:flex;flex-direction:column;align-items:center;gap:9px;background:transparent;border:0;color:#fff;font-size:12px;text-shadow:0 1px 4px #0008;cursor:pointer;touch-action:pan-y}.swipe-line{width:34px;height:4px;border-radius:8px;background:#fff;box-shadow:0 1px 4px #0005}.swipe-up span{font-size:11px;opacity:.9}.key:active{background:#ffffff55}

/* iOS-style passcode polish */
.lock,.pass{padding-top:calc(env(safe-area-inset-top, 0px) + 72px);padding-bottom:calc(env(safe-area-inset-bottom, 0px) + 12px);}
.pass{justify-content:flex-start;background-size:cover;background-position:center;min-height:0;height:100%;gap:0;}


.passtitle{font-size:18px;line-height:1.35;font-weight:400;text-align:center;max-width:330px;margin:0 auto 18px;color:#fff;flex-shrink:0}
.dots{display:flex;justify-content:center;gap:19px;margin:4px 0 clamp(24px,4vh,44px)}
.dot{width:10px;height:10px;border:1.5px solid #fff;border-radius:50%;background:transparent}
.dot.filled{background:#fff}
.keypad{width:min(100%,360px);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 16px;margin:0 auto;justify-items:center;align-items:center}
.key{width:min(17vw,72px);height:min(17vw,72px);max-width:72px;max-height:72px;border:1px solid #ffffff70;border-radius:50%;background:#ffffff30;backdrop-filter:blur(18px);color:#fff;font-size:31px;font-weight:300;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;box-shadow:inset 0 1px 1px #ffffff35}
.key small{font-size:9px;letter-spacing:2px;font-weight:650;margin-top:5px}
.key.blank{visibility:hidden}
.pass-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;align-items:center;justify-content:space-between;margin-top:auto;padding:0 30px 4px;min-height:42px;flex-shrink:0}
.pass-actions button{border:0;background:transparent;color:#fff;font-size:14px;font-weight:400;padding:8px 0;min-width:64px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.emergency{justify-self:start;text-align:left}.cancel{justify-self:end;text-align:right;margin:0}.pass{display:flex;flex-direction:column;align-items:stretch;overflow:hidden}.keypad{flex-shrink:0;transform:translateY(34px)}.dots{flex-shrink:0}
@media(max-height:700px){.lock,.pass{padding-top:28px;padding-bottom:8px}.passtitle{margin-bottom:12px}.dots{margin-bottom:18px}.keypad{gap:6px 10px}.key{width:min(15vw,58px);height:min(15vw,58px)}.keypad{transform:translateY(12px)}.pass-actions{min-height:36px}}
@media(min-height:701px){.pass-actions{margin-top:auto}}


.incoming-toast{position:absolute;z-index:30;top:10px;left:12px;right:12px;display:flex;gap:11px;align-items:flex-start;padding:12px 14px;border-radius:22px;background:rgba(111,119,132,.97);color:#fff;box-shadow:0 8px 28px #0003;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);transform:translateY(-150%);opacity:0;transition:transform .38s cubic-bezier(.2,.8,.2,1),opacity .28s ease;cursor:pointer;font:14px -apple-system,BlinkMacSystemFont,sans-serif;text-align:left}.incoming-toast.show{transform:translateY(0);opacity:1}.incoming-toast.hide{transform:translateY(-150%);opacity:0}.incoming-icon{width:34px;height:34px;flex:0 0 34px;border-radius:10px;background:#35c759;display:grid;place-items:center;font-size:20px}.incoming-copy{min-width:0;flex:1}.incoming-head{display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:650;margin:0 0 5px}.incoming-head small{font-size:11px;font-weight:400;color:#eee}.incoming-body{display:block;font-size:13px;line-height:1.35;text-align:left;overflow-wrap:anywhere}.incoming-copy,.incoming-head{ text-align:left }
/* Fit the simulator to embedded browsers that overlay their own bottom controls. */
@media (max-width: 600px){body.in-x-browser .device,body.in-x-browser .screen{height:var(--app-height, 100svh);}body.in-x-browser .screen{min-height:0}}
