/* =====================================================================
   v2 — iPhone-style interface (client direction) · SEVEN font everywhere
   Loaded after app.css and overrides it.
   ===================================================================== */
:root {
  --body: 'SEVEN', -apple-system, 'SF Arabic', Tahoma, system-ui, sans-serif;
  --display: 'SEVEN', -apple-system, Tahoma, system-ui, sans-serif;
  --ios-bg: #f2f2f7; --ios-sep: rgba(60, 60, 67, .18); --ios-gray: #8e8e93; --ios-blue: #007AFF; --ios-green: #34C759; --ios-red: #FF3B30;
}
body, button, input { font-family: var(--body); }
.phone { font-family: var(--body); }
.phone::before { width: 122px; height: 35px; border-radius: 22px; inset-block-start: 11px; }

/* ---------- status bar ---------- */
.statusbar { padding: 17px 34px 0; font-size: 15.5px; }
.sb-right { gap: 6px; }
.sb-batt { display: flex; align-items: center; gap: 3px; font-size: 12px; }
.sb-batt b { width: 25px; height: 12px; border: 1.4px solid currentColor; border-radius: 4px; position: relative; display: block; }
.sb-batt b::after { content: none; }
.sb-batt b i { position: absolute; inset-block: 1.5px; left: 1.5px; border-radius: 1.5px; background: #FF3B30; display: block; }
.sb-batt.charging b i { background: var(--ios-green); }
.sb-signal i { opacity: 1; }

/* ---------- lock screen: time on top, readable note, notifications below (no overlap) ---------- */
.lock-main { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 54px 12px 92px; gap: 14px; transition: opacity var(--t) var(--ease); }
.lock.keypad-open .lock-main { opacity: 0; pointer-events: none; }
.lock-top { padding: 0; position: relative; }
.lock-lockicon { display: flex; justify-content: center; opacity: .9; margin-block-end: 4px; }
.lock-lockicon svg { width: 16px; height: 16px; }
.lock-date { font-size: 17px; }
.lock-time { font-family: var(--display); font-size: 84px; line-height: 1.05; letter-spacing: -1px; direction: ltr; text-shadow: 0 2px 20px rgba(0, 0, 0, .25); }
.lock .sticky { margin: 0 auto; width: 88%; rotate: 0deg !important; flex-shrink: 0; z-index: 2; padding: 14px 16px 12px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .55); }
.lock .sticky p { font-size: 18px; }
.lock .sticky small { font-size: 14px; color: var(--ink); }
.lock-notifs { position: relative; inset: auto; max-height: none; flex: 1; min-height: 0; overflow-y: auto; padding: 0; scrollbar-width: none; }
.lock-foot { inset-block-end: 30px; }
.lock-foot button { animation: none; }
.notif { border-radius: 22px; padding: 11px 13px; grid-template-columns: 38px 1fr auto; background: rgba(245, 245, 245, .8); }
.notif .ic { width: 38px; height: 38px; border-radius: 9px; overflow: hidden; }
.notif .ic svg { width: 100%; height: 100%; }
.notif .ic.freq-ic { background: conic-gradient(#00ADC4, #0057A4, #9D33A3, #E5007A, #F46300, #FABA00, #04A357, #00ADC4); color: #fff; padding: 7px; }
.notif .ic .cal-ic b { font-size: 16px; }
.notif b { font-size: 14px; color: #000; }
.notif > span:not(.ic) { color: #1c1c1e; font-size: 14px; }
.notif time { color: #6c6c70; }
.key { width: 78px; height: 78px; }

/* ---------- home screen ---------- */
.home { background: #111; }
.home-wall { opacity: 1; background: url('../assets/img/kv-bahja-boy.jpg') center/cover no-repeat; }
.home-wall::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .4)); }
.home-inner { padding: 62px 20px 0; gap: 22px; }
.widget { border-radius: 24px; background: rgba(0, 26, 61, .72); backdrop-filter: blur(24px) saturate(1.4); box-shadow: none; }
.grid { gap: 22px 10px; }
.app-icon { color: #fff; font-size: 11.5px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.app-icon .lbl { max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-icon .tile { width: 62px; height: 62px; border-radius: 15px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); overflow: hidden; display: grid; place-items: center; }
.app-icon .tile > svg { width: 100%; height: 100%; }
.tile.freq span { width: 50px; height: 50px; border-radius: 12px; }
.tile.freq span svg { width: 30px; height: 30px; color: #fff; }
.cal-ic { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; background: #fff; line-height: 1; }
.cal-ic em { font-style: normal; color: #FF3B30; font-size: 9px; margin-block-end: 2px; }
.cal-ic b { color: #000; font-size: 28px; font-family: var(--display); }
.app-icon .badge { background: #FF3B30; border: 0; inset-block-start: -6px; inset-inline-end: calc(50% - 40px); }
.page-dots { display: flex; justify-content: center; gap: 8px; margin-block-start: auto; }
.page-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.page-dots i.on { background: #fff; }
.dock { display: flex; justify-content: space-around; padding: 14px 18px; margin: 0 -8px 28px; border-radius: 32px; background: rgba(255, 255, 255, .22); backdrop-filter: blur(26px) saturate(1.5); }
.dock .lbl { display: none; }
.home-bar { --hb: #fff; }
.home-bar:not(.light) { --hb: #000; }

/* ---------- generic iOS app chrome ---------- */
.appbar { background: rgba(249, 249, 249, .94); border-block-end: .5px solid var(--ios-sep); }
.appbar .back { color: var(--accent, var(--ios-blue)); }
.appbar-large { background: #fff; border: 0; padding-block-start: 56px; }
.appbar-large h2 { font-size: 32px; }
.settings { background: var(--ios-bg); }
.ios-dark { background: #000; color: #fff; }
.ios-dark .appbar-large { background: #000; }
.ios-dark .appbar-large h2 { color: #fff; }
.ios-dark .appbar-large .sub { color: #8e8e93; }

/* ---------- WhatsApp-style ---------- */
.wa-search { margin: 0 16px 8px; padding: 8px 12px; border-radius: 10px; background: #f0f0f0; color: #8e8e93; font-size: 15px; }
.wa-search svg { display: none; }
.wa-row .avatar { width: 52px; height: 52px; }
.wa-row .preview { display: flex; align-items: center; gap: 4px; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; }
.wa-row.unread time { color: #25D366; }
.wa-badge { margin-inline-start: auto; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: #25D366; color: #fff; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; }
.ticks { width: 17px; height: 11px; vertical-align: middle; flex-shrink: 0; }
.wa-chat { background: #EFE7DE; }
.wa-head { grid-template-columns: auto 1fr auto; padding-block-start: 52px; background: #f6f6f6; }
.wa-head .chat-head { grid-column: 2; flex-direction: row; justify-content: flex-start; gap: 8px; text-align: start; }
.wa-head .chat-head b { font-size: 15.5px; color: #000; display: block; }
.wa-head .chat-head small { font-size: 11.5px; color: #8e8e93; display: block; }
.wa-head .avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.wa-head .action { color: var(--ios-blue); }
.wa-head .action svg { width: 22px; height: 22px; }
.wa-chat .day { background: #fff; color: #54656f; padding: 4px 12px; border-radius: 8px; font-size: 12px; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); }
.wa-chat .bubble { border-radius: 8px; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); border: 0; padding: 6px 9px 4px; font-size: 15px; color: #111b21; }
.wa-chat .bubble.me { background: #D9FDD3; color: #111b21; }
.wa-chat .bubble.them { background: #fff; }
.wa-chat .bubble time { font-size: 11px; color: #667781; opacity: 1; display: flex; gap: 3px; justify-content: flex-end; align-items: center; }
.wa-chat .composer { background: #f6f6f6; gap: 10px; }
.wa-chat .composer .plus { font-size: 26px; color: var(--ios-blue); line-height: 1; }
.wa-chat .composer button { background: #fff; border-radius: 18px; }

/* ---------- Phone recents ---------- */
.call-row { display: flex; align-items: center; }
.call-row .row { flex: 1; }
.call-row.missed b { color: var(--ios-red); }
.info-btn { color: var(--ios-blue); padding: 0 14px; }
.info-btn svg { width: 22px; height: 22px; }

/* ---------- Clock app ---------- */
.alarms li.alarm-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-block-end: .5px solid #38383a; }
.alarm-row b { display: block; font-family: var(--display); font-size: 44px; line-height: 1.1; }
.alarm-row b small { font-size: 20px; }
.alarm-row span { font-size: 14px; color: #fff; }
.alarm-row.off b, .alarm-row.off span { color: #8e8e93; }

/* ---------- incoming call + alarm (full screen) ---------- */
.callscreen { position: absolute; inset: 0; z-index: 85; display: flex; flex-direction: column; color: #fff; animation: fadeIn .35s var(--ease); overflow: hidden; isolation: isolate; }
.callscreen.out { animation: csOut .3s var(--ease) forwards; }
@keyframes csOut { to { opacity: 0; } }
.cs-bg { position: absolute; inset: -20%; background: radial-gradient(circle at 50% 30%, var(--c), #1c1c1e 70%); filter: blur(30px); z-index: -2; }
.callscreen::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); z-index: -1; }
.cs-top { text-align: center; padding-block-start: 96px; }
.avatar.big { width: 96px; height: 96px; font-size: 38px; margin: 0 auto 14px; }
.cs-top h2 { font-size: 30px; }
.cs-status { opacity: .8; margin-block-start: 6px; unicode-bidi: plaintext; }
.cs-captions { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 8px; }
.cap { background: rgba(255, 255, 255, .16); padding: 9px 13px; border-radius: 16px; max-width: 86%; align-self: flex-start; line-height: 1.6; animation: bubbleIn .3s var(--ease-out); }
.cap.me { align-self: flex-end; background: rgba(52, 199, 89, .4); }
.callscreen:not(.live) .cs-captions { visibility: hidden; }
.cs-choices { display: grid; gap: 8px; padding: 0 22px 10px; }
.cs-choice { padding: 12px 16px; border-radius: 16px; background: #fff; color: #000; font-size: 15px; animation: bubbleIn .3s var(--ease-out); }
.cs-actions { direction: ltr; display: flex; justify-content: space-around; padding: 10px 40px 70px; }
.cs-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
.cs-btn svg { width: 72px; height: 72px; padding: 20px; border-radius: 50%; color: #fff; }
.cs-btn.decline svg { background: var(--ios-red); transform: rotate(135deg); }
.cs-btn.accept svg { background: var(--ios-green); }
.callscreen:not(.live) .cs-btn.accept { animation: nudge 1.4s var(--ease) infinite; }
.alarmscreen { background: #000; text-align: center; justify-content: space-between; }
.al-top { padding-block-start: 110px; }
.al-top > p { color: #FF9F0A; font-size: 17px; }
.al-time { font-family: var(--display); font-size: 88px; direction: ltr; line-height: 1.05; margin: 6px 0 16px; }
.al-top h2 { font-size: 22px; padding: 0 24px; line-height: 1.4; }
.al-sub { color: #8e8e93; margin-block-start: 8px; padding: 0 30px; line-height: 1.6; }
.al-actions { display: grid; gap: 14px; padding: 0 34px 80px; }
.al-snooze { padding: 16px; border-radius: 16px; background: #FF9F0A; color: #000; font-size: 18px; }
.al-stop { padding: 14px; color: #FF9F0A; font-size: 18px; }

/* ---------- worlds: diary + "opening soon" ---------- */
.world .diary { background: #fffdf0; border: 1px solid #f1e9c6; }
.world-title .soon { display: inline-block; margin-block-start: 8px; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--c); font-size: 13px; }
.soon-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: #FFDFD2; text-align: start; }
.soon-card img { width: 86px; height: 60px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.soon-card b { color: #D04E09; font-size: 16px; display: block; }
.soon-card p { color: var(--ink); font-size: 13.5px; margin-block-start: 3px; }

/* ---------- v3: native-feeling motion & gestures ---------- */
.phone { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.phone input, .phone textarea { -webkit-user-select: text; user-select: text; }
.view, .view.enter, .view.leave, .view.closing, .view.app-closing, .view.app-open { transition: none; animation: none; }
.view { touch-action: pan-y; backface-visibility: hidden; overflow: hidden; }
.view:not(.home):not(.lock) { box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
.lock { touch-action: none; }
.lock-notifs { touch-action: pan-y; }
.home-bar { touch-action: none; height: 30px; }
.home-inner { transform-origin: 50% 45%; will-change: transform; }
.app-icon .tile { transition: transform .18s cubic-bezier(.32, .72, 0, 1), filter .18s; }
.app-icon:active .tile { transform: scale(.88); filter: brightness(.8); }
.scroll { scroll-behavior: smooth; }
.avatar.group.logo { background: #fff; box-shadow: inset 0 0 0 1px #e6ebf3; }
.avatar.group.logo img { width: 62%; height: 62%; object-fit: contain; }
.banner { touch-action: none; }
