/* ===== apps: iOS dark mode look ===== */
.win-body { --label: #fff; --label2: rgba(235,235,245,.6); --label3: rgba(235,235,245,.3); --sep: rgba(84,84,88,.6); --cell: #1c1c1e; --fill: rgba(118,118,128,.24); }

/* navigation */
.nav { position: absolute; inset: 0; overflow: hidden; }
.nav-view { position: absolute; inset: 0; background: #000; will-change: transform; }
.nav-view::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--dim, 0); pointer-events: none; }
.nbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: calc(var(--sat) + 48px); padding: var(--sat) 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  transition: background .2s, box-shadow .2s; }
.nbar.scrolled, .nbar.solid { background: rgba(20,20,22,.78); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: 0 .5px 0 var(--sep); }
.nb-title { position: absolute; left: 90px; right: 90px; bottom: 13px; text-align: center; font-size: 17px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbar.scrolled .nb-title { opacity: 1; }
.nb-side { min-width: 40px; }
.nb-back { display: flex; align-items: center; gap: 1px; height: 40px; padding: 0 2px 0 10px; color: var(--accent, #0a84ff); font-size: 17px; }
.nb-back .ico { width: 22px; height: 22px; } .nb-back .ico svg { stroke-width: 2.6; }
.nb-back.pressed { opacity: .45; }
.nb-acts { display: flex; gap: 10px; padding-inline-end: 6px; }
.nv-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: none;
  padding: calc(var(--sat) + 48px) 16px calc(var(--sab) + 90px); }
.nv-scroll::-webkit-scrollbar { display: none; }
.ltitle { font-size: 34px; font-weight: 700; letter-spacing: .3px; margin: 2px 4px 10px; line-height: 1.2; }
.search { display: flex; align-items: center; gap: 6px; height: 38px; border-radius: 12px; background: var(--fill); padding: 0 9px; color: var(--label2); margin-bottom: 18px; }
.search .ico { width: 18px; height: 18px; flex: none; } .search .mic { width: 17px; height: 17px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #fff; font: 17px var(--font); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--label2); }
.search input::-webkit-search-cancel-button { display: none; }
.sec-h { display: flex; align-items: center; justify-content: space-between; font-size: 20px; font-weight: 700; margin: 6px 4px 8px; }
.sec-h .ico { width: 16px; height: 16px; color: var(--accent, #0a84ff); transform: rotate(-90deg); }
.ig { background: var(--cell); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.app-notes .empty { text-align: center; color: var(--label2); padding: 60px 0; font-size: 17px; }

/* glass buttons (iOS 26) */
.gbtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(120,120,128,.26); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.22); transition: transform .25s, background .2s; }
.gbtn.sm { width: 36px; height: 36px; }
.gbtn .ico { width: 21px; height: 21px; } .gbtn.sm .ico { width: 18px; height: 18px; }
.gbtn .ico.wide { width: 26px; }
.gbtn.pressed { transform: scale(.9); background: rgba(160,160,168,.4); transition: transform .06s; }
.tbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 0 18px calc(var(--sab) + 8px); pointer-events: none; }
.tbar > * { pointer-events: auto; }
.tbar .count { font-size: 12px; color: var(--label2); position: absolute; left: 0; right: 0; text-align: center; bottom: calc(var(--sab) + 21px); pointer-events: none; }
.tbar.four { justify-content: space-around; }

/* ---------- Notes ---------- */
.app-notes { --accent: #ffd60a; }
.app-notes .ylw { color: #ffd60a; width: 26px; height: 26px; }
.app-notes .row { display: flex; align-items: center; gap: 12px; padding: 0 14px; height: 50px; position: relative; font-size: 17px; }
.app-notes .row + .row::before { content: ""; position: absolute; top: 0; left: 0; right: 52px; height: .5px; background: var(--sep); }
.app-notes .row .rt { flex: 1; }
.app-notes .row .cnt { color: var(--label2); font-size: 17px; }
.app-notes .row .chev { width: 14px; height: 14px; color: var(--label3); }
.app-notes .row .chev svg { stroke-width: 2.8; }
.app-notes .row.pressed, .app-notes .nrow.pressed { background: rgba(255,255,255,.08); }
.app-notes .sec-h .ico { color: #ffd60a; }
.app-notes .grp-h { font-size: 20px; font-weight: 700; margin: 4px 4px 8px; }
.app-notes .nrow { padding: 11px 16px 12px; position: relative; }
.app-notes .nrow + .nrow::before { content: ""; position: absolute; top: 0; left: 0; right: 16px; height: .5px; background: var(--sep); }
.app-notes .nrow .nt { font-size: 17px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-notes .nrow .nsub { display: flex; gap: 7px; font-size: 15px; line-height: 1.35; margin-top: 2px; white-space: nowrap; overflow: hidden; }
.app-notes .nrow .nd { color: #fff; opacity: .92; flex: none; }
.app-notes .nrow .np { color: var(--label2); overflow: hidden; text-overflow: ellipsis; }
.n-note .nv-scroll { padding-left: 20px; padding-right: 20px; }
.app-notes .ndate { text-align: center; font-size: 13px; color: var(--label2); margin: 2px 0 12px; }
.app-notes .editor { outline: none; font-size: 17px; line-height: 1.42; min-height: 60vh; -webkit-user-select: text; user-select: text; caret-color: #ffd60a; word-wrap: break-word; }
.app-notes .editor[contenteditable="true"] { -webkit-user-modify: read-write; }
.app-notes .editor > div { min-height: 1.42em; }
.app-notes .editor .t-title { font-size: 28px; font-weight: 700; line-height: 1.25; margin-bottom: 4px; }
.app-notes .editor .t-head { font-size: 22px; font-weight: 700; }
.app-notes .editor b { font-weight: 700; }
.app-notes .editor a { color: #ffd60a; text-decoration: underline; text-underline-offset: 2px; }
.app-notes .editor .chk { position: relative; padding-right: 34px; margin: 6px 0; }
.app-notes .editor .chk .box { position: absolute; right: 0; top: .1em; width: 23px; height: 23px; border-radius: 50%; box-shadow: inset 0 0 0 1.6px rgba(235,235,245,.38); cursor: pointer; transition: background .15s, box-shadow .15s; }
.app-notes .editor .chk.done .box { background: #ffd60a; box-shadow: none; }
.app-notes .editor .chk.done .box::after { content: ""; position: absolute; left: 7.5px; top: 4px; width: 5px; height: 10px; border: solid #000; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
.app-notes .editor .n-img { margin: 10px 0; }
.app-notes .editor .n-img img { width: 100%; border-radius: 10px; display: block; }

/* ---------- Photos ---------- */
.app-photos .ph-scroll { padding: 0 0 calc(var(--sab) + 110px); }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding-top: calc(var(--sat) + 74px); }
.ph-grid-view .nbar.solid + .ph-scroll .ph-grid { padding-top: calc(var(--sat) + 50px); }
.ph-cell { aspect-ratio: 1; background-size: cover; background-position: center; position: relative; }
.ph-cell.pressed { filter: brightness(.7); }
.ph-cell .fv { position: absolute; left: 6px; bottom: 5px; width: 15px; height: 15px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.ph-cell .fv svg { width: 100%; height: 100%; }
.ph-cell .dur { position: absolute; left: 6px; bottom: 4px; font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ph-foot { text-align: center; font-size: 13px; color: var(--label2); padding: 18px 0; }
.ph-head { position: absolute; top: 0; left: 0; right: 0; z-index: 4; padding: calc(var(--sat) + 4px) 18px 26px; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.35) 70%, transparent); }
.ph-title { font-size: 30px; font-weight: 700; } .ph-sub { font-size: 14px; color: rgba(255,255,255,.75); margin-top: 1px; }
.ph-tabs { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 8px); z-index: 6; display: flex; justify-content: center; pointer-events: none; }
.ph-tabs .seg { pointer-events: auto; display: flex; gap: 2px; padding: 4px; border-radius: 30px; background: rgba(60,60,64,.55); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: inset 0 .5px 0 rgba(255,255,255,.2); }
.ph-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px; padding: 7px 14px 6px; border-radius: 26px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.8); transition: background .2s, color .2s; }
.ph-tabs button .ico { width: 22px; height: 22px; }
.ph-tabs button.on { background: rgba(255,255,255,.14); color: #0a84ff; }
.alb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.alb .cov { aspect-ratio: 1; border-radius: 10px; background: #1c1c1e center/cover; display: grid; place-items: center; color: var(--label3); }
.alb .cov .ico { width: 40px; height: 40px; }
.alb.pressed .cov { filter: brightness(.7); }
.alb .an { font-size: 15px; margin-top: 6px; } .alb .ac { font-size: 14px; color: var(--label2); }
.ph-viewer { position: absolute; inset: 0; z-index: 20; touch-action: none; }
.pv-bg { position: absolute; inset: 0; background: #000; opacity: 0; }
.pv-strip { position: absolute; inset: 0; will-change: transform; }
.pv-page { position: absolute; top: 0; width: var(--W); height: 100%; display: grid; place-items: center; overflow: visible; }
.pv-page img { max-width: 100%; max-height: 100%; display: block; will-change: transform; }
.pv-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--sat) + 2px) 12px 10px; display: flex; align-items: center; justify-content: space-between; transition: opacity .2s; }
.pv-date { text-align: center; line-height: 1.25; } .pv-date b { display: block; font-size: 15px; } .pv-date span { font-size: 12px; color: rgba(255,255,255,.75); }
.pv-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 22px calc(var(--sab) + 8px); display: flex; justify-content: space-between; transition: opacity .2s; }
.pv-fav.on { color: #fff; }
.ph-viewer.bare .pv-top, .ph-viewer.bare .pv-bar { opacity: 0 !important; pointer-events: none; }
.pv-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; pointer-events: none;
  background: rgba(30,30,30,.45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pv-play::after { content: ""; position: absolute; left: 27px; top: 21px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }

/* ---------- Safari ---------- */
.app-safari { background: #1c1c1e !important; }
.sf-page { position: absolute; inset: 0; }
.sf-scroll { position: absolute; inset: 0; overflow-y: auto; touch-action: pan-y; padding: calc(var(--sat) + 24px) 18px calc(var(--sab) + 100px); scrollbar-width: none; }
.sf-h { font-size: 22px; font-weight: 700; margin: 10px 2px 14px; }
.sf-favs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 10px; margin-bottom: 18px; }
.sf-fav { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.sf-ic { width: 66px; height: 66px; border-radius: 15px; background: #2c2c2e; display: grid; place-items: center; overflow: hidden; transition: filter .2s; }
.sf-ic img { width: 100%; height: 100%; }
.sf-fav.pressed .sf-ic { filter: brightness(.65); }
.sf-fn { font-size: 12px; color: rgba(235,235,245,.8); text-align: center; }
.sf-card { display: flex; gap: 12px; align-items: center; background: #2c2c2e; border-radius: 14px; padding: 14px; font-size: 15px; line-height: 1.4; color: rgba(235,235,245,.85); margin-bottom: 18px; }
.sf-card .ico { width: 26px; height: 26px; flex: none; color: #0a84ff; }
.sf-card img { width: 46px; height: 46px; border-radius: 10px; }
.sf-card small { color: var(--label2); }
.sf-read.pressed { filter: brightness(.8); }
.sf-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 14px calc(var(--sab) + 8px); }
.sf-addr { display: flex; align-items: center; gap: 8px; height: 50px; border-radius: 25px; padding: 0 16px; color: rgba(235,235,245,.7);
  background: rgba(70,70,74,.62); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: inset 0 .5px 0 rgba(255,255,255,.2), 0 6px 24px rgba(0,0,0,.35); }
.sf-addr .ico { width: 18px; height: 18px; flex: none; }
.sf-addr input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; font: 17px var(--font); text-align: center; }
.sf-addr input::placeholder { color: rgba(235,235,245,.65); }

/* ---------- launch screens ---------- */
.win-body > .splash { position: absolute; inset: 0; display: grid; place-items: center; }
.win-body > .splash img { width: 96px; height: 96px; border-radius: 23%; }
.win-body > .splash.bare img { width: 120px; height: 120px; border-radius: 0; }
.win-body > .splash .spin { position: absolute; top: calc(50% + 86px); width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.18); border-top-color: rgba(255,255,255,.85); animation: spin .9s linear infinite; }
.win-body > .splash .foot { position: absolute; bottom: calc(var(--sab) + 28px); font-size: 14px; color: rgba(255,255,255,.55); letter-spacing: .3px; direction: ltr; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Settings ---------- */
.app-settings .st-row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; position: relative; font-size: 17px; }
.app-settings .st-row + .st-row::before { content: ""; position: absolute; top: 0; left: 0; right: 56px; height: .5px; background: var(--sep); }
.app-settings .st-row.pressed, .app-settings .st-acc.pressed { background: rgba(255,255,255,.08); }
.app-settings .st-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; object-fit: cover; }
.app-settings .st-ic svg { width: 19px; height: 19px; }
.app-settings .st-l { flex: 1; min-width: 0; }
.app-settings .st-v { color: var(--label2); font-size: 17px; }
.app-settings .st-ch { width: 14px; height: 14px; color: var(--label3); }
.app-settings .st-ch svg { stroke-width: 2.8; }
.app-settings .st-acc { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.app-settings .st-av { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 600; background: linear-gradient(135deg, #f0c808, #7b2fe0); color: #fff; flex: none; }
.app-settings .st-acc > div:nth-child(2) { flex: 1; display: grid; gap: 3px; }
.app-settings .st-acc b { font-size: 20px; } .app-settings .st-acc small { font-size: 13px; color: var(--label2); }
.app-settings .st-sh { font-size: 13px; font-weight: 400; color: var(--label2); text-transform: none; margin: 0 16px 7px; }
.app-settings .st-note { font-size: 13px; color: var(--label2); margin: -14px 16px 24px; line-height: 1.4; }
.app-settings .st-credit { text-align: center; font-size: 13px; color: var(--label2); margin: 8px 0 30px; }
.app-settings .st-usage { padding: 14px 16px 6px; }
.app-settings .su-h { font-size: 13px; color: var(--label2); } .app-settings .su-t { font-size: 30px; font-weight: 700; margin: 2px 0 12px; }
.app-settings .su-r { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.app-settings .su-r img { width: 30px; height: 30px; border-radius: 22%; }
.app-settings .su-b { flex: 1; display: grid; gap: 5px; font-size: 15px; }
.app-settings .su-b i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #5e5ce6, #0a84ff); }
.app-settings .su-r small { font-size: 13px; color: var(--label2); white-space: nowrap; }
.app-settings .su-e { color: var(--label2); padding: 10px 0 16px; }
.app-settings .st-look { display: flex; justify-content: space-around; padding: 16px; }
.app-settings .lk { display: grid; justify-items: center; gap: 8px; font-size: 15px; }
.app-settings .lk i { width: 74px; height: 150px; border-radius: 14px; display: block; border: 2px solid transparent; }
.app-settings .lk-d { background: linear-gradient(#2a0f5e, #120826); } .app-settings .lk-l { background: linear-gradient(#e8e4f4, #c9c2e0); }
.app-settings .lk.on i { border-color: #0a84ff; }
.app-settings .st-bright { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.app-settings .st-bright .ico { width: 16px; height: 16px; opacity: .6; } .app-settings .st-bright .ico.big { width: 24px; height: 24px; opacity: 1; }
.app-settings .st-bright input { flex: 1; accent-color: #fff; touch-action: pan-x; }
.app-settings .st-walls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.app-settings .wl { display: grid; justify-items: center; gap: 8px; font-size: 14px; }
.app-settings .wl-p { width: 100%; aspect-ratio: 9 / 19.5; border-radius: 16px; border: 2.5px solid transparent; display: grid; justify-items: center; padding-top: 22%; font-size: 20px; font-weight: 700; color: rgba(255,255,255,.9); }
.app-settings .wl.on .wl-p { border-color: #0a84ff; }
.app-settings .wl.pressed .wl-p { filter: brightness(.8); }
.app-settings .st-batt { padding: 16px; display: flex; align-items: end; gap: 18px; }
.app-settings .sb-pct { font-size: 34px; font-weight: 700; color: #30d158; }
.app-settings .sb-bars { flex: 1; height: 80px; display: flex; align-items: end; gap: 6px; }
.app-settings .sb-bars i { flex: 1; background: #30d158; border-radius: 3px; opacity: .85; }

/* wallpapers (Settings › الخلفية) */
.wp-night { background: radial-gradient(70% 45% at 78% 18%, rgba(160,92,255,.55), transparent 70%), radial-gradient(65% 40% at 18% 72%, rgba(240,190,40,.28), transparent 70%), radial-gradient(90% 60% at 50% 105%, rgba(95,30,190,.75), transparent 70%), linear-gradient(180deg, #1b0b3c 0%, #2a0f5e 42%, #170834 100%); }
.wp-gold, #screen.wp-gold #wallpaper, #screen.wp-gold #cover .wp { background: radial-gradient(70% 45% at 25% 20%, rgba(255,196,80,.55), transparent 70%), radial-gradient(80% 50% at 80% 80%, rgba(200,90,30,.5), transparent 70%), linear-gradient(180deg, #2a1606 0%, #5a2f0c 45%, #1c0d04 100%); }
.wp-dawn, #screen.wp-dawn #wallpaper, #screen.wp-dawn #cover .wp { background: radial-gradient(70% 40% at 70% 15%, rgba(255,170,140,.5), transparent 70%), radial-gradient(80% 55% at 20% 85%, rgba(40,120,200,.6), transparent 70%), linear-gradient(180deg, #13284a 0%, #2d4f86 50%, #0d1a33 100%); }

/* inputs must stay usable even though the shell blocks selection */
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; touch-action: manipulation; }

/* Safari: recent searches over the start page (tap the address bar) */
.sf-search { position: absolute; inset: 0; background: #1c1c1e; opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.sf-page.searching .sf-search { opacity: 1; pointer-events: auto; }
.sf-s-scroll { position: absolute; inset: 0; overflow-y: auto; touch-action: pan-y; padding: calc(var(--sat) + 18px) 18px calc(var(--sab) + 110px); scrollbar-width: none; }
.sf-s-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 8px; }
.sf-s-head b { font-size: 20px; font-weight: 700; }
.sf-s-clear { color: #0a84ff; font: 16px var(--font); background: none; border: 0; padding: 6px 2px; }
.sf-s-row { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: .5px solid rgba(84,84,88,.6); }
.sf-s-row .ic { width: 20px; height: 20px; flex: none; color: rgba(235,235,245,.45); }
.sf-s-row .q { flex: 1; font-size: 17px; color: #fff; }
.sf-s-row .fill { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: rgba(235,235,245,.45); }
.sf-s-row .fill svg { width: 18px; height: 18px; transform: scaleX(-1); }
.sf-s-row.pressed { background: rgba(255,255,255,.06); }
.sf-s-empty { color: rgba(235,235,245,.5); font-size: 16px; padding: 18px 2px; }
.sf-bar { display: flex; align-items: center; gap: 10px; }
.sf-bar .sf-addr { flex: 1; }
.sf-cancel { display: none; color: #0a84ff; font: 17px var(--font); background: none; border: 0; padding: 0 2px; }
.sf-page.searching .sf-cancel { display: block; }
