/* Noto Sans Arabic (SIL OFL) — مستضاف محليًا، مقصوص على الحروف العربية واللاتينية وأوزان 400–700 */
@font-face{font-family:"Noto Sans Arabic";font-style:normal;font-weight:400 700;font-display:swap;src:url(../media/fonts/noto-sans-arabic.woff2) format("woff2");unicode-range:U+0600-06FF,U+200C-200F,U+00A0}
@font-face{font-family:"Noto Sans Arabic";font-style:normal;font-weight:400 700;font-display:swap;src:url(../media/fonts/noto-sans-arabic-latin.woff2) format("woff2");unicode-range:U+0020-007E,U+00A9,U+00D7,U+2013-2014,U+2018-2019,U+201C-201D,U+2022,U+2026}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;height:100%;touch-action:manipulation}
body{background:#0b0b0f radial-gradient(circle at 50% 30%,#1d1b2e,#0b0b0f 70%);color:#fff;font-family:"Noto Sans Arabic",system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;overflow:hidden;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
ul{list-style:none;margin:0;padding:0}
p{margin:0}
[hidden]{display:none!important}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
:focus-visible{outline:2px solid #0a84ff;outline-offset:2px}

/* ===== الإطار ===== */
.stage{position:fixed;inset:0;overflow:hidden}
.phone{--scale:1;width:402px;height:874px;flex:none;border-radius:62px;padding:12px;background:#1c1c1e;box-shadow:0 0 0 2px #3a3a3c,0 30px 80px #000c;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(var(--scale))}
.screen{position:relative;width:100%;height:100%;border-radius:50px;overflow:hidden;background:#000;isolation:isolate;user-select:none;-webkit-user-select:none}
.screen::before{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(120% 70% at 85% 10%,#ff7a59 0,transparent 55%),radial-gradient(90% 60% at 10% 40%,#7b3fe4 0,transparent 60%),radial-gradient(120% 80% at 50% 100%,#0f4c81 0,transparent 65%),#160f2e}

@media (max-width:500px){
  .phone{top:0;left:0;width:100vw;height:100vh;height:100dvh;border-radius:0;padding:0;box-shadow:none;transform:none!important}
  .screen{border-radius:0}
}

/* ===== شريط الحالة ===== */
.statusbar{position:absolute;inset:0 0 auto;height:54px;z-index:50;display:flex;align-items:center;justify-content:space-between;padding:6px 34px 0;font-weight:600;font-size:16px;pointer-events:none}
.sb-time{min-width:54px;text-align:center}
.island{position:absolute;top:11px;left:50%;width:124px;height:36px;margin-left:-62px;border-radius:20px;background:#000}
.sb-icons{display:flex;align-items:center;gap:6px;direction:ltr}
.sb-icons svg{fill:currentColor;height:12px}
.light-app .statusbar{color:#000}.light-app .battery,.light-app .battery::after{border-color:#0008}.light-app .battery::after{background:#0008}.light-app .home-bar span{background:#000}
.ic-signal{width:18px}.ic-wifi{width:16px}
.battery{position:relative;width:25px;height:12px;border:1.5px solid #fff8;border-radius:4px;padding:1.5px}
.battery::after{content:"";position:absolute;right:-4px;top:3px;width:2px;height:4px;border-radius:0 2px 2px 0;background:#fff8}
.battery-fill{display:block;width:15%;height:100%;border-radius:1.5px;background:#ff3b30}

/* ===== شاشة القفل ===== */
.lock{position:absolute;inset:0;z-index:30;touch-action:none;display:flex;flex-direction:column;padding:62px 14px 30px;background:#0004;will-change:transform}
.lock-top{text-align:center}
.lock-ic{width:14px;height:18px;fill:#fff;opacity:.9}
.lock-date{font-size:19px;font-weight:600;opacity:.9;margin-top:6px}
.lock-time{font-size:92px;font-weight:700;line-height:1.05;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.lock-msg{display:inline-block;margin-top:10px;padding:6px 14px;border-radius:16px;font-size:14px;font-weight:600;background:#ffffff26;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.notifs{flex:1;min-height:0;margin:12px 0 10px;display:flex;flex-direction:column;gap:8px;overflow:hidden;-webkit-mask-image:linear-gradient(#000 calc(100% - 24px),transparent);mask-image:linear-gradient(#000 calc(100% - 24px),transparent)}
.notifs li{flex:none}
.notif{display:flex;gap:11px;align-items:center;padding:11px 13px;border-radius:22px;background:#2a2a2e9e;box-shadow:0 1px 0 #ffffff14 inset;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);text-align:start;width:100%}
.notif-ic{flex:none;width:38px;height:38px;border-radius:9px;overflow:hidden;display:block}
.notif-ic svg{width:100%;height:100%}
.notif-main{flex:1;min-width:0}
.notif-head{display:flex;justify-content:space-between;align-items:baseline;gap:6px;font-size:15px}
.notif-head b{font-weight:600}
.notif-head span{opacity:.55;font-size:13px;flex:none}
.notif-head b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notif-sub{margin-right:6px;font-size:12px;font-weight:400;opacity:.6}
.notif-body{font-size:15px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lock-bottom{display:flex;align-items:center;justify-content:space-between;padding:0 30px}
.lock-btn{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;background:#0006;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.lock-btn svg{width:22px;height:22px;fill:#fff}
.unlock-hint{font-size:14px;opacity:.75;animation:hint 2.4s ease-in-out infinite}
@keyframes hint{50%{transform:translateY(-5px);opacity:1}}

/* ===== الرئيسية ===== */
.home{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;padding:72px 22px 22px}
.grid{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:88px;row-gap:14px;justify-items:center}
.widget-li{grid-column:span 2;grid-row:span 2;justify-self:stretch;padding:0 4px}
.widget{width:100%;height:100%;border-radius:22px;padding:14px 16px;display:flex;flex-direction:column;align-items:flex-start;text-align:start;color:#fff;background:linear-gradient(#1b6fd8,#5aaef5);box-shadow:0 6px 20px #0004}
.w-city{font-size:15px}
.w-temp{font-size:44px;font-weight:400;line-height:1.1}
.w-sun{width:20px;height:20px;border-radius:50%;background:#ffd60a;box-shadow:0 0 10px #ffd60a99;margin-top:auto}
.w-cond{font-size:13px;font-weight:600;margin-top:4px}
.w-range{font-size:12px;opacity:.9}
.app-ic{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;width:72px;font-size:12px}
.app-ic svg{width:62px;height:62px;border-radius:14px;display:block;box-shadow:0 2px 6px #0003}
.app-ic:active svg{filter:brightness(.7)}
.app-ic span{white-space:nowrap;text-shadow:0 1px 3px #0008}
.badge{position:absolute;top:-6px;left:-2px;min-width:24px;height:24px;padding:0 6px;border-radius:12px;background:#ff3b30;font-size:14px;font-weight:600;line-height:24px;text-align:center}
.search-pill{margin:auto auto 14px;width:84px;height:30px;border-radius:15px;background:#ffffff33;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.search-pill::after{content:"بحث";display:block;text-align:center;font-size:13px;line-height:30px;opacity:.9}
.dock{display:flex;justify-content:space-around;padding:14px 8px;border-radius:32px;background:#ffffff26;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.dock .app-ic span{display:none}

/* ===== التطبيق ===== */
.app{position:absolute;inset:0;z-index:20;background:#000;overflow:hidden;border-radius:inherit}
.app-body{position:absolute;inset:0;display:flex;flex-direction:column;padding-top:54px}
.placeholder{flex:1;display:grid;place-items:center;align-content:center;gap:10px;opacity:.75}
.placeholder svg{width:80px;height:80px;border-radius:18px}

.scroll{overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none}
.scroll::-webkit-scrollbar{display:none}
input{font:inherit;user-select:text;-webkit-user-select:text}

.ui{width:24px;height:24px;flex:none;color:inherit;display:block}

/* ===== واتساب ===== */
.wa{flex:1;min-height:0;display:flex;flex-direction:column;background:#000}
.wa-top{padding:0 16px 6px}
.wa-tools{display:flex;justify-content:space-between;align-items:center;height:40px}
.wa-acts{display:flex;gap:18px}
.wa-tools .ui{width:26px;height:26px}
.ui.green{color:#25d366}
.wa-chips{display:flex;gap:8px;margin-top:10px}
.wa-chips span{padding:5px 12px;border-radius:16px;background:#1c1c1e;font-size:13px;color:#aeaeb2}
.wa-chips .on{background:#103529;color:#25d366;font-weight:600}
.wa-arch{display:flex;align-items:center;gap:22px;padding:10px 30px;font-size:15px;color:#aeaeb2;border-bottom:.5px solid #2c2c2e}
.wa-arch .ui{width:20px;height:20px}
.wa-calls{display:flex;gap:20px;color:#0a84ff;padding-inline-end:6px}
.wa-extra{display:flex;gap:14px;color:#0a84ff}
.wa-input.typed .wa-extra{display:none}
.wa-input:not(.typed) .wa-send{display:none}
.txt.deleted{display:inline-flex;align-items:center;gap:6px;font-style:italic;color:#ffffff99}
.txt.deleted .ui{width:16px;height:16px}
.wa-title{margin:0 0 8px;font-size:32px;font-weight:700}
.wa-search{display:flex;align-items:center;gap:6px;height:36px;border-radius:10px;background:#1c1c1e;color:#8e8e93;font-size:16px;padding:0 10px}
.wa-search .ui{width:18px;height:18px}
.wa-list{flex:1;min-height:0}
.wa-row{display:flex;gap:12px;align-items:center;width:100%;padding:10px 16px;text-align:start}
.wa-row:active{background:#1c1c1e}
.wa-av{flex:none;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-size:22px;font-weight:700;color:#fff}
.wa-row-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;padding-bottom:10px;border-bottom:.5px solid #2c2c2e}
.wa-row-top,.wa-row-bot{display:flex;justify-content:space-between;align-items:center;gap:8px}
.wa-row-top b{font-size:16px;font-weight:600}
.wa-row-top time{font-size:13px;color:#8e8e93}
.wa-row-top time.unread{color:#25d366}
.wa-prev{font-size:14px;color:#8e8e93;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wa-unread{flex:none;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#25d366;color:#000;font-size:12px;font-weight:600;line-height:20px;text-align:center}
.wa-tabs{display:flex;justify-content:space-around;padding:6px 4px 30px;border-top:.5px solid #2c2c2e;background:#111e;font-size:10px;color:#8e8e93}
.wa-tabs span{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:56px}
.wa-tabs .ui{width:26px;height:26px}
.wa-tabs .on{color:#25d366;font-weight:600}
.app-body:has(.wa-chat){background:#1c1c1e}
.wa-chat-top{display:flex;align-items:center;gap:8px;padding:6px 10px 8px;background:#1c1c1e}
.wa-back{width:28px;height:36px;display:grid;place-items:center}
.wa-back svg{width:12px;height:20px;fill:none;stroke:#0a84ff;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.wa-chat-top .wa-av{width:36px;height:36px;font-size:16px}
.wa-chat-info{flex:1;min-width:0;display:flex;flex-direction:column}
.wa-chat-info b{font-size:16px;font-weight:600}
.wa-sub{font-size:12px;color:#8e8e93;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wa-sub.typing{color:#25d366}
.wa-msgs{flex:1;min-height:0;display:flex;flex-direction:column;gap:2px;padding:8px 10px 12px;background:#0b141a radial-gradient(#ffffff08 1px,transparent 1px) 0 0/18px 18px}
.wa-day{align-self:center;margin:4px 0 8px;padding:3px 10px;border-radius:8px;background:#1f2c34;font-size:12px;color:#aebac1}
.msg{display:flex;margin-top:6px}
.msg.cont{margin-top:0}
.msg.out{justify-content:flex-end}
.bubble{position:relative;max-width:80%;padding:6px 9px 5px;border-radius:12px;background:#1f2c34;font-size:15px;line-height:1.45;user-select:text;-webkit-user-select:text}
.msg.in .bubble{border-start-start-radius:4px}
.msg.out .bubble{background:#005c4b;border-start-end-radius:4px}
.msg.cont .bubble{border-radius:12px}
.sender{display:block;font-size:13px;font-weight:600;margin-bottom:1px}
.txt{white-space:pre-wrap;overflow-wrap:anywhere;display:inline}
.txt.big{font-size:30px;line-height:1.2}
.mention{color:#53bdeb}
.meta{float:left;margin:6px 10px 0 0;font-size:11px;color:#ffffff99;direction:rtl;white-space:nowrap}
.ticks{margin-right:3px;color:#53bdeb;letter-spacing:-3px}
.poll{display:flex;flex-direction:column;gap:8px;min-width:230px;padding:2px 0}
.poll-q{font-size:15px}
.poll small{font-size:12px;color:#ffffff99;margin-top:-6px}
.poll-line{display:flex;align-items:center;gap:8px;font-size:14px}
.poll-radio{width:18px;height:18px;border-radius:50%;border:2px solid #ffffff80;flex:none}
.poll-radio.on{border-color:#25d366;background:#25d366 radial-gradient(#005c4b 30%,transparent 32%)}
.poll-t{flex:1}
.poll-bar{height:5px;margin:4px 26px 0 0;border-radius:3px;background:#ffffff26;overflow:hidden}
.poll-bar span{display:block;height:100%;background:#25d366}
.poll-f{text-align:center;padding-top:6px;border-top:.5px solid #ffffff26;color:#53bdeb;font-size:14px}
.dots{display:inline-flex;gap:4px;padding:4px 2px}
.dots i{width:7px;height:7px;border-radius:50%;background:#aebac1;animation:dot 1s infinite}
.dots i:nth-child(2){animation-delay:.2s}.dots i:nth-child(3){animation-delay:.4s}
@keyframes dot{50%{opacity:.3}}
.wa-input{display:flex;align-items:center;gap:8px;padding:8px 10px 34px;background:#1c1c1e}
.wa-plus{color:#0a84ff;display:block}
.wa-plus .ui{width:26px;height:26px}
.wa-input input{flex:1;min-width:0;height:36px;padding:0 14px;border-radius:18px;border:.5px solid #3a3a3c;background:#2c2c2e;color:#fff;font-size:16px;outline:none}
.wa-send{width:34px;height:34px;flex:none;border-radius:50%;background:#25d366;color:#000;font-size:15px;transform:scaleX(-1)}

/* ===== شريط الرجوع ===== */
.home-bar{position:absolute;inset:auto 0 0;height:34px;z-index:60;display:grid;place-items:center;touch-action:none;cursor:grab}
.home-bar span{width:140px;height:5px;border-radius:3px;background:#fff;pointer-events:none}
.home-bar.off{pointer-events:none;opacity:0}

/* ===== Toast ===== */
.toast{position:absolute;top:58px;left:50%;z-index:70;max-width:86%;padding:10px 16px;border-radius:18px;background:#2c2c2ef2;font-size:14px;font-weight:600;text-align:center;box-shadow:0 8px 24px #0008;transform:translate(-50%,-16px);opacity:0;pointer-events:none;transition:transform .3s,opacity .3s}
.toast.show{transform:translate(-50%,0);opacity:1}

@media (max-height:760px){.pin{gap:8px;padding-bottom:36px}.pin-pad{grid-template-columns:repeat(3,62px);gap:10px 20px}.pin-key{width:62px;height:62px;font-size:24px}.pin-boxes span{width:40px;height:48px}}
/* الجوال الحقيقي: الارتفاع الظاهر أقل (أشرطة المتصفح) — نصغّر شاشة القفل حسب الارتفاع عشان تبان الإشعارات كلها */
@media (max-width:500px){
  .lock{padding:clamp(44px,7vh,62px) 12px clamp(10px,2vh,30px)}
  .lock-ic{height:15px}
  .lock-date{font-size:clamp(14px,2.3vh,19px);margin-top:2px}
  .lock-time{font-size:clamp(52px,10.5vh,92px)}
  .lock-msg{font-size:13px;margin-top:4px;padding:5px 12px}
  .lock-top .counter{margin-top:6px;padding:2px 10px}
  .notifs{gap:clamp(4px,.8vh,8px);margin:clamp(6px,1.4vh,12px) 0 6px;-webkit-mask-image:linear-gradient(#000 calc(100% - 10px),transparent);mask-image:linear-gradient(#000 calc(100% - 10px),transparent)}
  .notif{padding:clamp(6px,1.1vh,11px) 11px;gap:9px;border-radius:18px}
  .notif-ic{width:clamp(30px,4.6vh,38px);height:clamp(30px,4.6vh,38px);border-radius:8px}
  .notif-head{font-size:clamp(13px,1.9vh,15px)}
  .notif-body{font-size:clamp(13px,1.9vh,15px);line-height:1.3}
  .lock-btn{width:clamp(40px,6vh,50px);height:clamp(40px,6vh,50px)}
}
/* شاشات قصيرة جدًا (مثل iPhone SE): العدّاد يكفي في الرئيسية */
@media (max-width:500px) and (max-height:620px){
  .lock .lock-top .counter,.notif .notif-sub{display:none}
  .lock-msg{margin-top:2px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ===== عناصر مشتركة ===== */
.counter{display:inline-block;margin-top:8px;padding:3px 12px;border-radius:12px;background:#0005;font-size:12px;font-weight:600}
.lock-top .counter{display:table;margin:8px auto 0}
.home-counter{align-self:center;margin:auto 0 8px}
.home-counter+.search-pill{margin-top:0}
.big-title{margin:6px 0 10px;font-size:32px;font-weight:700}
.nav-bar{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 8px}
.nav-back{display:flex;align-items:center;gap:4px;height:44px;padding:0 6px;color:#ffd60a;font-size:17px}
.nav-back svg{width:11px;height:19px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

/* تنبيه iOS */
.alert-wrap{position:absolute;inset:0;z-index:78;display:grid;place-items:center;background:#0007}
.alert{width:270px;border-radius:14px;background:#2c2c2ef5;text-align:center;overflow:hidden;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.alert b{display:block;padding:18px 16px 2px;font-size:17px}
.alert p{padding:0 16px 18px;font-size:13px;line-height:1.5}
.alert-ok{width:100%;height:44px;border-top:.5px solid #545458;color:#0a84ff;font-size:17px;font-weight:600}

/* لوحة الرمز */
.pin{display:flex;flex-direction:column;align-items:center;gap:10px;padding:22px 20px 44px;background:#1c1c1e;border-radius:24px 24px 0 0;text-align:center}
.pin.inline{flex:1;justify-content:center;background:none;border-radius:0}
.pin-head{display:flex;flex-direction:column;align-items:center;gap:4px}
.pin-head b{font-size:19px}
.pin-head p{font-size:14px;color:#aeaeb2;max-width:280px;line-height:1.5}
.pin-lock{width:30px;height:36px;margin-bottom:6px;fill:#ffd60a}
.pin-lock .shackle{fill:none;stroke:#ffd60a;stroke-width:2.6;transform-box:fill-box;transform-origin:100% 100%;transition:transform .45s cubic-bezier(.3,1.6,.5,1)}
.pin-lock.open .shackle{transform:translateY(-3px) rotate(28deg)}
.pin.ok .pin-lock{fill:#30d158}.pin.ok .pin-lock .shackle{stroke:#30d158}
.pin-boxes{display:flex;gap:12px;direction:ltr;margin-top:6px}
.pin-boxes span{width:46px;height:54px;border-radius:12px;border:2px solid #48484a;display:grid;place-items:center}
.pin-boxes span.on::after{content:"";width:12px;height:12px;border-radius:50%;background:#fff}
.pin.ok .pin-boxes span{border-color:#30d158}
.pin-msg{min-height:20px;font-size:14px;color:#ff453a;font-weight:600}
.pin-hint{font-size:14px;color:#ffd60a}
.pin-pad{display:grid;grid-template-columns:repeat(3,72px);gap:12px 22px;direction:ltr}
.pin-key{width:72px;height:72px;border-radius:50%;background:#3a3a3c;font-size:28px}
.pin-key:active{background:#636366}
.pin-key.text{background:none;font-size:15px}

/* شاشة الفوز */
.win{position:absolute;inset:0;z-index:80;display:grid;place-items:center;background:#000b;overflow:hidden}
.win-card{position:relative;z-index:1;width:300px;padding:26px 22px;border-radius:26px;background:#1c1c1e;text-align:center;display:flex;flex-direction:column;gap:10px;box-shadow:0 20px 60px #000}
.win-emoji{font-size:56px;line-height:1.1}
.win-title{font-size:24px}
.win-sub{color:#aeaeb2;margin-bottom:8px}
.win-btn{height:48px;border-radius:14px;background:#0a84ff;font-weight:600;font-size:16px}
.win-btn.ghost{background:#2c2c2e}
.win-link{color:#ff453a;font-size:14px;padding:6px}
.confetti{position:absolute;inset:0;pointer-events:none}
.confetti i{position:absolute;top:-12px;width:8px;height:14px;border-radius:2px;animation:fall 2.4s ease-in forwards}
@keyframes fall{to{transform:translate(var(--x),940px) rotate(var(--r));opacity:.7}}

/* ===== الملاحظات ===== */
.notes{flex:1;min-height:0;display:flex;flex-direction:column;background:#000}
.notes-scroll{flex:1;min-height:0;padding:0 16px 16px}
.notes-bar{justify-content:space-between}
.nav-icons{display:flex;gap:18px;padding:0 8px;color:#ffd60a}
.notes-search{display:flex;align-items:center;gap:6px;height:36px;padding:0 10px;margin-bottom:6px;border-radius:10px;background:#1c1c1e;color:#8e8e93;font-size:16px}
.notes-search span{flex:1}
.notes-search .ui{width:18px;height:18px}
.notes-sec{margin:18px 4px 8px;font-size:20px;font-weight:700}
.notes-tools{display:flex;justify-content:space-between;align-items:center;padding:10px 22px 36px;color:#ffd60a;background:#0e0e0f;border-top:.5px solid #222}
.notes-tools small{color:#aeaeb2;font-size:12px}
.notes-tools>span{width:24px}
.notes-card{border-radius:12px;background:#1c1c1e;overflow:hidden}
.note-row{display:flex;flex-direction:column;gap:2px;width:100%;padding:11px 16px;text-align:start}
.notes-card li+li .note-row{border-top:.5px solid #38383a}
.note-row b{font-size:16px;font-weight:600}
.note-sub{display:flex;gap:8px;font-size:14px;color:#8e8e93;white-space:nowrap;overflow:hidden}
.note-sub span{overflow:hidden;text-overflow:ellipsis}
.note-page{flex:1;min-height:0;padding:4px 20px 40px}
.note-date{display:block;text-align:center;font-size:12px;color:#8e8e93}
.note-page h2{margin:8px 0 12px;font-size:26px}
.note-text{white-space:pre-wrap;font-size:17px;line-height:1.7}
.checklist{display:flex;flex-direction:column;gap:12px;font-size:17px}
.checklist li{display:flex;align-items:center;gap:10px}
.check{width:24px;height:24px;border-radius:50%;border:1.5px solid #636366;display:grid;place-items:center;font-size:13px;font-weight:700;color:#000}
.checklist .done .check{background:#ffd60a;border-color:#ffd60a}
.checklist .done{color:#8e8e93}

/* ===== الصور ===== */
.photos{flex:1;min-height:0;display:flex;flex-direction:column;background:#000}
.photos-top{padding:0 16px 8px}
.photos-top .big-title{margin-bottom:0}
.photos-top p{font-size:13px;color:#8e8e93}
.photo-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;align-content:start;padding-bottom:70px}
.photo-grid li{min-width:0}
.photos{position:relative}
.photos-seg{position:absolute;bottom:92px;left:50%;transform:translateX(-50%);display:flex;gap:2px;padding:3px;border-radius:18px;background:#3a3a3ce6;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);font-size:13px;font-weight:600;white-space:nowrap}
.photos-seg span{padding:5px 12px;border-radius:15px;color:#ddd}
.photos-seg .on{background:#636366;color:#fff}
.photos-tabs{display:flex;justify-content:space-around;padding:6px 4px 30px;background:#111e;border-top:.5px solid #2c2c2e;color:#8e8e93;font-size:10px}
.photos-tabs span{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:60px}
.photos-tabs .on{color:#0a84ff}
.photos-tabs .ui{width:26px;height:26px}
.tile{position:relative;display:block;width:100%;aspect-ratio:1;overflow:hidden;background:#1c1c1e}
.tile>*{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;display:block}
.ph{display:grid;place-items:center;background:#3a3a3c;color:#8e8e93;font-size:22px;font-weight:600}
.wb{display:block;width:100%;height:auto;font-family:inherit}
.tile .wb{height:100%;width:100%}
.viewer{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;background:#000;padding-top:54px}
.nav-bar.dark{justify-content:space-between}
.nav-bar.dark .nav-back{color:#0a84ff}
.vw-date{font-size:15px;font-weight:600}
.vw-count{min-width:44px;font-size:13px;color:#8e8e93;text-align:center}
.vw-stage{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none}
.vw-tools{display:flex;justify-content:space-between;padding:10px 26px 38px;color:#0a84ff}
.vw-tool .ui{width:26px;height:26px}
.vw-tool.on{color:#ff375f}
.vw-tool.on .ui use{fill:currentColor}
/* مقاسات مطلقة بدل النِّسب: Safari ما يحسب height:100% داخل grid/flex صح */
.vw-media{position:absolute;inset:0;will-change:transform}
.vw-media>*{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain;display:block}
.vw-media .ph{display:grid;place-items:center;font-size:48px}

/* ===== الكاميرا ===== */
.camera{flex:1;display:flex;flex-direction:column;background:#000}
.cam-top{display:flex;justify-content:space-between;padding:4px 24px 10px;font-size:20px;color:#fff}
.cam-chev{opacity:.8}.cam-flash{color:#ffd60a}
.cam-view{position:relative;aspect-ratio:3/4;background:#050505;overflow:hidden}
.noise{position:absolute;inset:-20%;width:140%;height:140%;opacity:.12;animation:noise .5s steps(4) infinite}
@keyframes noise{25%{transform:translate(-4%,3%)}50%{transform:translate(3%,-3%)}75%{transform:translate(-2%,-4%)}}
.cam-modes{display:flex;justify-content:center;gap:18px;padding:16px 0 10px;font-size:13px;font-weight:600;color:#ffffffaa}
.cam-modes .on{color:#ffd60a}
.cam-ctrl{flex:1;display:flex;justify-content:space-between;align-items:center;padding:0 34px 40px}
.cam-thumb{width:48px;height:48px;border-radius:8px;background:#2c2c2e}
.cam-shutter{width:76px;height:76px;border-radius:50%;border:5px solid #fff;box-shadow:inset 0 0 0 3px #000;background:#fff}
.cam-shutter:active{transform:scale(.92)}
.cam-flip{width:48px;height:48px;border-radius:50%;background:#2c2c2e;display:grid;place-items:center;font-size:24px}

/* ===== Safari ===== */
.app-body:has(.safari){background:#f4f4f8}
.safari{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;background:#f4f4f8;color:#1c1c1e}
.sf-page{flex:1;min-height:0;padding:12px 18px 20px}
.sf-brand{display:flex;align-items:center;gap:10px;padding:8px 0 18px;border-bottom:1px solid #e2e2ea;font-size:20px}
.sf-logo{width:48px;height:32px}
.sf-h{margin:20px 0 12px;font-size:16px;color:#6e6e80;font-weight:600}
.sf-folder{display:flex;align-items:center;gap:14px;width:100%;padding:14px;border-radius:16px;background:#fff;box-shadow:0 2px 10px #0000000f;text-align:start;color:inherit}
.sf-fi{width:46px;height:36px;flex:none}
.sf-ftext{display:flex;flex-direction:column;gap:2px}
.sf-ftext b{font-size:16px}
.sf-ftext small{font-size:13px;color:#6e6e80}
.sf-foot{margin-top:40px;text-align:center;font-size:12px;color:#a0a0b0}
.sf-bar{padding:8px 14px 34px;background:#f9f9fbf0;border-top:.5px solid #d8d8e0}
.sf-addr{display:flex;justify-content:space-between;align-items:center;height:44px;padding:0 14px;border-radius:12px;background:#fff;box-shadow:0 1px 6px #0000001a;font-size:15px}
.sf-addr b{font-weight:600;direction:ltr}
.sf-tools{display:flex;justify-content:space-around;padding-top:10px;font-size:22px;color:#0a84ff}
.sf-modal{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;justify-content:flex-end;background:#0008;color:#fff}
