/* ══════════════════════════════════════════════════════════════════
   SafePhone, iPhone style — the skin layer.
   Loaded after phone.css and apps.css (both forked unchanged from the
   Android-style SafePhone) and overrides them. Everything is drawn
   here: no Apple logo, icons, fonts (the text font is Inter, OFL),
   symbols or wallpapers. It evokes the layout of an iPhone only.
   ══════════════════════════════════════════════════════════════════ */
:root { --ios-blue: #2f7cf6; --ios-green: #30c55a; --ios-red: #f0443a; --ios-orange: #f59a1b; --ios-sep: rgba(60,60,67,.18); }
body.style-iphone { font-family: 'Inter', 'Roboto Flex', Roboto, 'Segoe UI', Arial, sans-serif; }
body.style-iphone #screen { font-feature-settings: 'cv11', 'ss01'; letter-spacing: -.1px; }
#screen[data-theme="dark"] { --ios-sep: rgba(84,84,88,.6); }

/* ── Frame: rounder, flat-edged; volume buttons on the LEFT, side button on the right ── */
.style-iphone #device { border-radius: 66px; padding: 13px;
  background: linear-gradient(145deg, #4a4d53, #1b1d21 55%, #34373c);
  box-shadow: 0 0 0 3px #6a6e75, 0 0 0 4px #15171a, 0 40px 90px rgba(0,0,0,.55), inset 0 0 4px rgba(255,255,255,.2); }
.style-iphone #screen { border-radius: 54px; }
.style-iphone .hw-power { top: 230px; height: 96px; }
.style-iphone .hw-vol-up, .style-iphone .hw-vol-down { right: auto; left: -5px; border-radius: 4px 0 0 4px; background: linear-gradient(270deg, #2b2e33, #5a5f68); }
.style-iphone .hw-vol-up::after, .style-iphone .hw-vol-down::after { left: auto; right: 0; }
.style-iphone .hw-vol-up:active, .style-iphone .hw-vol-down:active { left: -3px; right: auto; }
.style-iphone .hw-ring { right: auto; left: -5px; top: 150px; height: 34px; border-radius: 4px 0 0 4px; background: linear-gradient(270deg, #2b2e33, #5a5f68); }
.style-iphone .hw-ring::after { left: auto; right: 0; }
.style-iphone .hw-ring.silent { background: linear-gradient(270deg, #2b2e33, #f59a1b); }
body.fullscreen .hw-ring { display: none; }
.style-iphone .hw-vol-up { top: 220px; height: 62px; }
.style-iphone .hw-vol-down { top: 296px; height: 62px; }
.sensor-pill { position: absolute; top: 12px; left: 50%; width: 104px; height: 30px; margin-left: -52px; border-radius: 16px; background: #000; z-index: 96; pointer-events: none; }
body.fullscreen .sensor-pill { display: none; }

/* ── Status bar: time on the left, bars / Wi-Fi / battery on the right ── */
.style-iphone #statusbar { height: 50px; padding: 14px 30px 0 44px; font-size: 16px; font-weight: 650; color: #111; }
.style-iphone #statusbar.light-icons, .style-iphone #screen.is-locked #statusbar, .style-iphone #screen.call-over-lock #statusbar { color: #fff; }
.style-iphone .sb-left, .style-iphone .sb-right { height: 30px; padding: 0 4px; border-radius: 10px; cursor: pointer; }
.style-iphone .sb-left { min-width: 70px; }
.style-iphone .sb-right { gap: 6px; }
.style-iphone .sb-time { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.style-iphone .sb-ic { font-size: 19px; }
.sb-bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 12px; }
.sb-bars i { width: 3px; border-radius: 1px; background: currentColor; opacity: .3; }
.sb-bars i:nth-child(1) { height: 4px; } .sb-bars i:nth-child(2) { height: 6px; } .sb-bars i:nth-child(3) { height: 9px; } .sb-bars i:nth-child(4) { height: 12px; }
.sb-bars i.on { opacity: 1; }
.sb-5g { font-size: 13px; font-weight: 700; }
.sb-battery { position: relative; width: 25px; height: 12px; border-radius: 4px; border: 1.2px solid currentColor; opacity: 1; padding: 1.5px; display: inline-flex; margin-right: 3px; }
.sb-battery::before { content: ''; position: absolute; inset: 0; border-radius: 3px; background: currentColor; opacity: .25; }
.sb-battery::after { content: ''; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: currentColor; opacity: .5; }
.sb-battery i { display: block; height: 100%; border-radius: 2px; background: currentColor; }
.sb-battery.low i { background: var(--ios-red); }
.sb-battery.charging i { background: var(--ios-green); }

/* ── Home indicator (no Back button) ── */
.style-iphone #navbar.gestures { height: 24px; }
.style-iphone .nav-pill { width: 136px; height: 5px; border-radius: 3px; opacity: .9; margin-top: 4px; }
.style-iphone #back-arrow { display: none; }
.style-iphone .edge { top: 110px; bottom: 90px; width: 14px; }

/* ── Home Screen: icons, labels, widgets, Search pill, dock ── */
.style-iphone .home { padding: 58px 0 10px; }
.style-iphone .home-page { grid-template-rows: repeat(6, 1fr); padding: 4px 16px; }
.style-iphone .hicon { width: 78px; gap: 5px; }
.style-iphone .app-ic { border-radius: 23%; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.style-iphone .app-ic.svg { background: #fff; }
.style-iphone .app-ic.svg svg { transform: scale(1.12); }
.style-iphone .app-ic.cal { border-radius: 23%; flex-direction: column; justify-content: center; }
.style-iphone .app-ic.cal::before { content: attr(data-day); }
.style-iphone .app-ic.cal b { color: #111; font-weight: 400; }
.style-iphone .hlabel { font-size: calc(12px * var(--font-scale, 1)); font-weight: 500; letter-spacing: 0; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
/* Page dots just above the Search pill (lessons point at them: "swipe left for the next page"). */
.style-iphone .home-pages { order: 0; } .style-iphone .home-dots { order: 1; } .style-iphone .home-search { order: 2; } .style-iphone .home-dock { order: 3; }
.style-iphone .home-dots { height: 12px; margin-top: 2px; }
.style-iphone .home-dots i { width: 7px; height: 7px; background: rgba(255,255,255,.45); }
.style-iphone .home-dots i.on { background: #fff; }
.style-iphone .home-search { align-self: center; height: 30px; width: auto; margin: 6px auto 12px; padding: 0 14px; gap: 4px; border-radius: 15px;
  background: rgba(255,255,255,.26); color: #fff; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: calc(13px * var(--font-scale, 1)); font-weight: 600; box-shadow: none; }
.style-iphone .home-search .ms { font-size: 16px; }
.style-iphone .home-search .hs-g { color: #fff; }
.style-iphone .home-dock { margin: 0 12px 16px; height: 94px; padding: 0 6px; border-radius: 36px; background: rgba(255,255,255,.26); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); align-items: center; }
.style-iphone .home-dock .app-ic { width: 62px !important; height: 62px !important; }
.w-weather.ios, .style-iphone .w-weather { border-radius: 24px; background: linear-gradient(180deg, #4a8ff0, #2a5fc4); color: #fff; padding: 14px 16px; display: grid; align-content: start; gap: 0; text-align: left; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.style-iphone .ww-city { font-weight: 650; font-size: calc(15px * var(--font-scale, 1)); }
.style-iphone .ww-temp { font-size: calc(44px * var(--font-scale, 1)); font-weight: 400; line-height: 1.05; }
.style-iphone .ww-ic { font-size: 22px; color: #ffe082; margin-top: 8px; }
.style-iphone .ww-desc { font-size: calc(13px * var(--font-scale, 1)); font-weight: 600; }
.w-calendar { width: 100%; height: 100%; border-radius: 24px; background: #fff; color: #111; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.wc-day { color: var(--ios-red); font-size: calc(12px * var(--font-scale, 1)); font-weight: 700; letter-spacing: .3px; }
.wc-num { font-size: calc(44px * var(--font-scale, 1)); font-weight: 400; line-height: 1.05; }
.wc-next { margin-top: auto; font-size: calc(13px * var(--font-scale, 1)); color: #6e6e73; font-weight: 500; }

/* App Library (the Android-style drawer, slid in from the right) */
.style-iphone .drawer { transform: translateX(100%); background: rgba(30,30,40,.55); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); padding: 58px 12px 30px; border-radius: 0; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.style-iphone .drawer.open { transform: translateX(0); }
.style-iphone .drawer-search { height: 40px; border-radius: 12px; background: rgba(255,255,255,.2); color: #fff; margin: 6px 8px 16px; }
.style-iphone .drawer-search input { color: #fff; }
.style-iphone .drawer-search input::placeholder { color: rgba(255,255,255,.8); }
.style-iphone .drawer-search .ds-more { display: none; }
.style-iphone .drawer-grid .hlabel { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }

/* ── Lock screen ── */
.style-iphone .lk-wall { filter: none; }
.style-iphone #lock.bouncing .lk-wall { filter: brightness(.55) blur(14px); }
.style-iphone .lk-top { top: 18px; left: 40px; font-size: calc(14px * var(--font-scale, 1)); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.style-iphone .lk-top .lk-carrier { display: none; }
.lk-padlock { position: absolute; top: 58px; left: 0; right: 0; display: flex; justify-content: center; }
.lk-padlock .ms { font-size: 22px; }
.style-iphone .lk-date { top: 88px; font-size: calc(20px * var(--font-scale, 1)); font-weight: 600; gap: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.style-iphone .lk-weather .ms { font-size: 18px; }
.style-iphone .lk-clock { top: 112px; flex-direction: row; justify-content: center; align-items: baseline; line-height: 1; }
.style-iphone .lk-clock b { font-size: 104px; font-weight: 700; letter-spacing: -3px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.18); }
.style-iphone .lk-clock .lk-colon { margin: 0 -2px; transform: translateY(-8px); }
.style-iphone .lk-notifs { top: auto; bottom: 150px; left: 12px; right: 12px; }
.style-iphone .lk-notif { border-radius: 22px; padding: 12px 14px; background: rgba(250,250,250,.72); color: #111; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); align-items: flex-start; }
.style-iphone .lk-notif .app-ic { border-radius: 23%; }
.style-iphone .lk-notif b { font-weight: 650; }
.style-iphone .lk-notif small { opacity: .85; }
.lk-notif-time { margin-left: auto; font-size: 12px; color: #6e6e73; }
.style-iphone .lk-notif > div { min-width: 0; flex: 1; }
.style-iphone .lk-bottom { bottom: 50px; padding: 0 46px; }
.style-iphone .lk-short { width: 52px; height: 52px; background: rgba(0,0,0,.32); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #fff; }
.style-iphone .lk-short .ms { font-size: 24px; }
.style-iphone .lk-short.on { background: #fff; color: #111; }
.style-iphone .lk-hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); max-width: none; width: 220px; gap: 10px; padding: 6px 0 4px; color: #fff; font-size: calc(14px * var(--font-scale, 1)); font-weight: 600; }
.lk-indicator { display: block; width: 136px; height: 5px; border-radius: 3px; background: #fff; }
.style-iphone .lk-hint-txt.flash { color: #fff; text-decoration: underline; }
/* Passcode */
.style-iphone .lk-bouncer { justify-content: center; padding: 60px 0 40px; gap: 22px; }
.style-iphone .pin-title { gap: 6px; font-size: calc(19px * var(--font-scale, 1)); font-weight: 600; }
.style-iphone .pin-title .ms { font-size: 20px; }
.style-iphone .pin-dots { gap: 22px; height: 16px; }
.style-iphone .pin-dots i { width: 13px; height: 13px; background: transparent; border: 1.5px solid #fff; }
.style-iphone .pin-dots i.on { background: #fff; }
.style-iphone .pin-pad { grid-template-columns: repeat(3, 80px); gap: 16px 24px; }
.style-iphone .pin-pad button { width: 80px; height: 80px; background: rgba(255,255,255,.18); backdrop-filter: blur(10px); flex-direction: column; gap: 0; }
.style-iphone .pin-pad button b { font-size: calc(34px * var(--font-scale, 1)); font-weight: 400; line-height: 1; }
.style-iphone .pin-pad button small { font-size: 10px; font-weight: 700; letter-spacing: 2px; margin-top: 2px; }
.style-iphone .pin-pad .pin-ok { display: none; }
.style-iphone .pin-foot { width: 100%; justify-content: space-between; padding: 0 42px; gap: 0; }
.style-iphone .pin-foot .btn-text { font-size: calc(17px * var(--font-scale, 1)); font-weight: 500; }

/* ── Control Center and Notification Center ── */
.style-iphone .shade-scrim { background: rgba(10,10,20,.38); backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2); }
.style-iphone .shade-panel { background: transparent; box-shadow: none; padding: 0; border-radius: 0; bottom: 0; color: #fff; transform: translateY(-40px); opacity: 0; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.style-iphone #shade:not(.closed) .shade-panel { opacity: 1; }
.cc { padding: 58px 22px 20px; }
.cc-top { display: flex; justify-content: space-between; align-items: center; font-size: calc(14px * var(--font-scale, 1)); font-weight: 600; margin: 0 4px 16px; }
.cc-close { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; color: #fff; }
.cc-grid { display: grid; grid-template-columns: repeat(4, 76px); grid-auto-rows: 76px; gap: 14px; grid-auto-flow: dense; justify-content: center; }
.cc-block { grid-column: span 2; grid-row: span 2; border-radius: 26px; background: rgba(40,40,48,.5); }
.cc-conn { display: grid; grid-template-columns: 1fr 1fr; place-items: center; padding: 10px; }
.cc-btn { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center; }
.cc-btn .ms { font-size: 28px; }
.cc-btn.on.cc-airplane { background: var(--ios-orange); }
.cc-btn.on.cc-cellular { background: var(--ios-green); }
.cc-btn.on.cc-wifi, .cc-btn.on.cc-bluetooth { background: var(--ios-blue); }
.cc-media { display: flex; flex-direction: column; justify-content: space-between; padding: 16px; color: rgba(255,255,255,.85); }
.cc-media small { font-size: calc(14px * var(--font-scale, 1)); font-weight: 600; }
.cc-media-btns { display: flex; justify-content: space-around; }
.cc-media-btns .ms { font-size: 30px; opacity: .55; }
.cc-sq, .cc-wide { border-radius: 22px; background: rgba(40,40,48,.5); color: #fff; display: flex; align-items: center; justify-content: center; }
.cc-sq .ms { font-size: 30px; }
.cc-sq.on, .cc-wide.on { background: #fff; color: #111; }
.cc-wide { grid-column: span 2; justify-content: flex-start; gap: 12px; padding: 0 16px; text-align: left; }
.cc-wide > .ms { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.cc-wide.on > .ms { background: #5b5bd6; color: #fff; }
.cc-wide span b { display: block; font-size: calc(15px * var(--font-scale, 1)); font-weight: 650; }
.cc-wide span small { font-size: calc(12px * var(--font-scale, 1)); opacity: .75; }
.cc-slider { grid-row: span 2; position: relative; border-radius: 24px; overflow: hidden; display: block; }
.cc-slider > .ms { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; margin: 0 auto; z-index: 2; pointer-events: none; color: #6e6e73; font-size: 26px; }
.cc-range { -webkit-appearance: none; appearance: none; writing-mode: vertical-lr; direction: rtl; width: 76px; height: 166px; margin: 0; background: rgba(40,40,48,.5); overflow: hidden; cursor: pointer; border-radius: 24px; }
.cc-range::-webkit-slider-runnable-track { width: 76px; }
.cc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 76px; height: 2px; background: #fff; box-shadow: 0 170px 0 170px #fff; }
.cc-range::-moz-range-thumb { width: 76px; height: 2px; border: 0; background: #fff; box-shadow: 0 170px 0 170px #fff; }
.cc-range:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
/* Notification Center */
.nc { padding: 58px 14px 30px; display: flex; flex-direction: column; min-height: 100%; }
.nc-clock { display: flex; flex-direction: column; align-items: center; color: #fff; margin: 0 0 18px; }
.nc-clock span { font-size: calc(19px * var(--font-scale, 1)); font-weight: 600; }
.nc-clock b { font-size: 88px; font-weight: 700; line-height: 1; letter-spacing: -2px; }
.nc-head { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 0 6px; margin-bottom: 8px; }
.nc-head b { font-size: calc(20px * var(--font-scale, 1)); font-weight: 700; }
.nc-clear { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(255,255,255,.22); color: #fff; font-size: 13px; font-weight: 600; }
.nc-clear .ms { font-size: 16px; }
.style-iphone .nc .notif-list { gap: 8px; border-radius: 0; overflow: visible; }
.style-iphone .nc .notif { border-radius: 22px !important; background: rgba(250,250,250,.78); color: #111; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.style-iphone .nc .notif-meta, .style-iphone .nc .notif-text { color: #3c3c43; }
.style-iphone .nc .notif-empty { margin-top: 30px; color: rgba(255,255,255,.9); font-weight: 600; }
.style-iphone .nc .qs-handle { margin-top: auto; padding-top: 20px; }
.style-iphone .nc .qs-handle i { background: #fff; width: 60px; }
/* Heads-up notifications (banners) */
.style-iphone .notif.heads { border-radius: 22px; background: rgba(250,250,250,.86); color: #111; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); margin-top: 8px; }
.style-iphone .notif-ic { border-radius: 9px; background: var(--ios-green); color: #fff; }

/* ── App windows, top bars and the "‹ Back" link ── */
.style-iphone .appwin > .app { padding-top: 50px; padding-bottom: 28px; }
.style-iphone .appbar.ios-bar { height: 46px; padding: 0 8px; gap: 0; position: relative; justify-content: space-between; }
.style-iphone .appbar.ios-bar h1 { position: absolute; left: 90px; right: 90px; text-align: center; margin: 0; font-size: calc(17px * var(--font-scale, 1)); font-weight: 650; pointer-events: none; }
.style-iphone .appbar.ios-bar.large { height: auto; padding: 0 8px; }
.style-iphone .appbar.ios-bar.large h1 { position: static; text-align: left; font-size: calc(32px * var(--font-scale, 1)); font-weight: 750; margin: 6px 8px 10px; letter-spacing: -.4px; }
.style-iphone .appbar-row { min-height: 44px; }
.ios-back { display: inline-flex; align-items: center; height: 44px; padding: 0 8px 0 0; color: var(--primary); font-size: calc(17px * var(--font-scale, 1)); font-weight: 400; border-radius: 10px; }
.ios-back .ms { font-size: 34px; margin-right: -6px; font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.ios-back-spacer { width: 44px; }
/* Back buttons that apps draw themselves (arrow icons): shown as "‹ Back" links. */
.style-iphone .appwin .icon-btn:is([data-back], [data-album-back], [data-vback]) { width: auto; min-width: 44px; padding: 0 8px 0 0; color: var(--primary); display: inline-flex; align-items: center; border-radius: 10px; background: none; }
.style-iphone .appwin .icon-btn:is([data-back], [data-album-back], [data-vback]) > .ms { width: 0; overflow: hidden; }
.style-iphone .appwin .icon-btn:is([data-back], [data-album-back], [data-vback])::before { content: 'chevron_left'; font-family: 'Material Symbols Rounded'; font-feature-settings: 'liga'; font-size: 34px; line-height: 1; margin-right: -6px; }
.style-iphone .appwin .icon-btn:is([data-back], [data-album-back], [data-vback])::after { content: 'Back'; font-size: calc(17px * var(--font-scale, 1)); }
.style-iphone .appwin .dark-app .icon-btn[data-back], .style-iphone .appwin.dark-app .icon-btn[data-back] { color: #fff; }
.ios-link { color: var(--primary); font-size: calc(17px * var(--font-scale, 1)); display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 10px; }
.ios-link .ms { font-size: 26px; }
.ios-tabtitle { padding: 0 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; flex: 0 0 auto; }
.ios-tabtitle .ios-link:first-child { margin-right: auto; }
.ios-tabtitle h1 { flex: 0 0 100%; margin: 0 4px 8px; font-size: calc(32px * var(--font-scale, 1)); font-weight: 750; letter-spacing: -.4px; }
.ios-tabtitle.hidden-title h1 { visibility: hidden; height: 0; margin: 0; }

/* Grouped lists, separators, switches, buttons */
.style-iphone .list-card { border-radius: 12px; margin: 0 16px 20px; background: var(--surfaceC1); }
.style-iphone .li { min-height: 46px; padding: 10px 16px; gap: 12px; position: relative; }
.style-iphone .list-card > .li + .li::before, .style-iphone .list-card > .li-row + .li-row::before, .style-iphone .list-card > * + .li::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--ios-sep); }
.style-iphone .ios-group > .ios-row + .ios-row::before { left: 58px; }
.style-iphone .li-t b { font-size: calc(17px * var(--font-scale, 1)); font-weight: 400; }
.style-iphone .li-t small { font-size: calc(14px * var(--font-scale, 1)); }
.style-iphone .li-ic.round { border-radius: 9px; width: 32px; height: 32px; background: var(--primary); color: #fff; }
.style-iphone .section-title { color: var(--onSurfaceVar); font-weight: 500; text-transform: uppercase; font-size: calc(13px * var(--font-scale, 1)); margin: 18px 32px 6px; }
.style-iphone .switch { width: 51px; height: 31px; }
.style-iphone .switch i { border: 0; border-radius: 16px; background: #e3e3e8; }
#screen[data-theme="dark"] .switch i { background: #39393d; }
.style-iphone .switch i::after { left: 2px; top: 2px; width: 27px; height: 27px; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.style-iphone .switch input:checked + i { background: var(--ios-green); }
.style-iphone .switch input:checked + i::after { left: 22px; top: 2px; width: 27px; height: 27px; background: #fff; }
.style-iphone .btn-filled { background: var(--primary); border-radius: 14px; height: 46px; font-weight: 600; font-size: calc(16px * var(--font-scale, 1)); }
.style-iphone .btn-tonal { border-radius: 14px; background: var(--primaryContainer); color: var(--primary); font-weight: 600; }
.style-iphone .btn-outline { border-radius: 14px; border-color: var(--outlineVar); }
.style-iphone .btn-text { color: var(--primary); font-weight: 500; }
.style-iphone .search-bar { height: 38px; border-radius: 11px; background: var(--surfaceC3); margin: 4px 16px 10px; padding: 0 10px; gap: 6px; color: var(--onSurfaceVar); }
.style-iphone .search-bar .ms { font-size: 20px; }
.style-iphone .search-bar input { font-size: calc(17px * var(--font-scale, 1)); }
.style-iphone .bottom-nav, .ios-tabbar { height: 82px; padding-top: 6px; background: color-mix(in srgb, var(--surfaceC2) 92%, transparent); border-top: .5px solid var(--ios-sep); backdrop-filter: blur(20px); }
.style-iphone .bn-item { gap: 2px; font-size: calc(10.5px * var(--font-scale, 1)); font-weight: 600; color: #8a8a8e; }
.style-iphone .bn-item .bn-ic { width: auto; height: 30px; background: none !important; color: inherit !important; }
.style-iphone .bn-item .ms { font-size: 27px; }
.style-iphone .bn-item.on { color: var(--primary); }

/* Alerts: centered, buttons across the bottom with hairlines */
.style-iphone .dialog { width: min(290px, calc(100% - 48px)); border-radius: 16px; padding: 20px 16px 0; text-align: center; background: color-mix(in srgb, var(--surfaceC1) 94%, transparent); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); overflow: hidden; }
.style-iphone .dlg-title { font-size: calc(17px * var(--font-scale, 1)); font-weight: 650; margin: 0 0 6px; }
.style-iphone .dlg-text { font-size: calc(14px * var(--font-scale, 1)); color: var(--onSurface); margin: 0 0 14px; }
.style-iphone .dlg-icon { color: var(--primary); margin-bottom: 8px; }
.style-iphone .dlg-buttons { margin: 16px -16px 0; gap: 0; flex-wrap: nowrap; border-top: .5px solid var(--ios-sep); }
.style-iphone .dlg-buttons .btn-text { flex: 1; height: 46px; border-radius: 0; padding: 0 6px; font-size: calc(16px * var(--font-scale, 1)); }
.style-iphone .dlg-buttons .btn-text + .btn-text { border-left: .5px solid var(--ios-sep); }
.style-iphone .dlg-buttons .btn-text:last-child { font-weight: 650; }
.style-iphone .dlg-buttons .btn-text.danger { color: var(--ios-red); }
.style-iphone .dialog:has(.dlg-buttons > :nth-child(3)) .dlg-buttons { flex-direction: column; }
.style-iphone .dialog:has(.dlg-buttons > :nth-child(3)) .dlg-buttons .btn-text + .btn-text { border-left: 0; border-top: .5px solid var(--ios-sep); }
.style-iphone .sheet { border-radius: 14px 14px 0 0; }
.style-iphone .toast { border-radius: 18px; background: rgba(40,40,44,.92); font-weight: 500; }

/* App switcher (swipe up and hold): big cards with rounded corners; above each card, the app's icon and name
   on the left (no "Clear all": on an iPhone you swipe each card up). */
.style-iphone #recents { background: rgba(10,10,18,.35); }
.style-iphone .rec-scroll { gap: 22px; padding: 0 60px; }
.style-iphone .rec-item { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "head name" "card card"; align-items: center; column-gap: 8px; row-gap: 10px; }
.style-iphone .rec-head { grid-area: head; width: 32px; height: 32px; border-radius: 8px; }
.style-iphone .rec-head .app-ic { width: 32px !important; height: 32px !important; border-radius: 23%; }
.style-iphone .rec-name { grid-area: name; justify-self: start; font-size: calc(15px * var(--font-scale, 1)); font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.style-iphone .rec-card { grid-area: card; border-radius: 38px; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.style-iphone .rec-clear { display: none; }
.style-iphone .rec-empty { font-weight: 600; }
.style-iphone #screen.recents-mode #launcher { filter: blur(14px) brightness(.7); }

/* Share sheet: a light rounded sheet, people as round photos, apps as rounded squares, then a list. */
.style-iphone .sheet { background: var(--surface); border-radius: 14px 14px 0 0; padding-top: 4px; }
.style-iphone .sheet-grip { width: 36px; height: 5px; opacity: .3; }
.style-iphone .sheet-title { font-size: calc(17px * var(--font-scale, 1)); font-weight: 650; }
.style-iphone .share-people { gap: 16px; padding: 10px 4px 16px; scrollbar-width: none; }
.style-iphone .share-people .avatar { width: 62px; height: 62px; font-size: 24px; }
.style-iphone .share-people button, .style-iphone .share-apps button { flex: 0 0 70px; font-size: calc(12px * var(--font-scale, 1)); }
.style-iphone .share-apps { justify-content: flex-start; gap: 16px; border-top: .5px solid var(--ios-sep); padding: 14px 4px 6px; overflow-x: auto; scrollbar-width: none; }
.style-iphone .share-apps .ms { width: 62px; height: 62px; border-radius: 23%; background: var(--surfaceC1); color: var(--primary); font-size: 30px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.style-iphone .share-apps [data-share-app="messages"] .ms { background: linear-gradient(180deg,#62d86f,#2bb84a); color: #fff; }
.style-iphone .share-apps [data-share-app="mail"] .ms { background: linear-gradient(180deg,#5fb6ff,#2477f0); color: #fff; }
.style-iphone .share-people button.on { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 50%; }

/* ── Settings ── */
.style-iphone .settings-app .appwin, .style-iphone .appwin[data-app="settings"] { background: var(--surface); }
.style-iphone .settings-title { font-size: calc(32px * var(--font-scale, 1)); font-weight: 750; margin: 6px 20px 8px; letter-spacing: -.4px; }
.ios-settings .practice-banner { border-radius: 12px; background: var(--primaryContainer); color: var(--onPrimaryContainer); }
.ios-row { min-height: 46px; }
.ios-sq { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ios-sq .ms { font-size: 20px; }
.ios-val { color: var(--onSurfaceVar); font-size: calc(16px * var(--font-scale, 1)); white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.ios-chev { color: #c4c4c7; font-size: 24px !important; margin-right: -6px; }
.ios-account { min-height: 76px !important; }
.ios-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(180deg, #b5b5bb, #8e8e94); color: #fff; display: flex; align-items: center; justify-content: center; }
.ios-avatar .ms { font-size: 36px; }
.ios-account .li-t b { font-size: calc(20px * var(--font-scale, 1)); font-weight: 600; }

/* ── Phone ── */
.style-iphone .phone-app { background: var(--surfaceC1); }
.style-iphone .phone-app .phone-body { flex: 1; }
.ios-keypad { display: flex; flex-direction: column; align-items: center; padding-top: 50px; }
/* The Keypad is a tab here, not the Android-style sheet that slid up over the screen. */
.style-iphone .dialpad-sheet.ios-keypad { position: static; background: none; border-radius: 0; box-shadow: none; padding: 30px 24px 10px; z-index: auto; }
.ios-keypad .dp-number { min-height: 64px; width: 100%; }
.ios-keypad .dp-input { font-size: calc(36px * var(--font-scale, 1)); font-weight: 500; }
.ios-keypad .dp-suggest { min-height: 30px; display: flex; gap: 8px; justify-content: center; }
.style-iphone .dp-keys { grid-template-columns: repeat(3, 80px); gap: 16px 26px; justify-content: center; }
.style-iphone .dp-key { width: 80px; height: 80px; border-radius: 50%; background: #e5e5ea; color: #111; gap: 0; }
#screen[data-theme="dark"] .dp-key { background: #333336; color: #fff; }
.style-iphone .dp-key:active { background: #c7c7cc; }
.style-iphone .dp-key b { font-size: calc(34px * var(--font-scale, 1)); font-weight: 400; }
.style-iphone .dp-key small { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: inherit; }
.style-iphone .dp-bottom { grid-template-columns: repeat(3, 80px); gap: 0 26px; justify-content: center; margin-top: 16px; }
.style-iphone .dp-call { width: 80px; height: 80px; border-radius: 50%; background: var(--ios-green); }
.style-iphone .dp-call .ms { font-size: 36px; }
.style-iphone .dp-del { color: #a1a1a6; }
/* Call screens */
.style-iphone .call-screen.ios-call { background: linear-gradient(180deg, #4b5566 0%, #2a3140 55%, #151a22 100%); padding: 86px 30px 46px; }
.style-iphone .ios-call .call-top { gap: 6px; }
.style-iphone .ios-call .call-top h2 { font-size: calc(32px * var(--font-scale, 1)); font-weight: 500; order: 1; }
.style-iphone .ios-call .call-top > small:first-child { order: 0; font-size: calc(14px * var(--font-scale, 1)); opacity: .75; }
.style-iphone .ios-call .call-top .avatar { order: -1; width: 84px; height: 84px; font-size: 34px; margin-bottom: 6px; }
.style-iphone .ios-call .call-top > small:last-child { order: 2; font-size: calc(16px * var(--font-scale, 1)); }
/* Short screens (a small iPhone inside Facebook/Instagram leaves ~550 px): less room above the caller, so the round
   buttons and their "Decline" / "Accept" labels stay on screen; the gap the "Tap here to answer" hint needs stays. */
@media (max-height: 640px) {
  /* ...and the lesson card is shorter ("◀ Previous step", "Read to me" and "Skip step" fit on one line at 375 px,
     still 44 px tall), so it no longer covers "Tap here to answer" above the green button. */
  .style-iphone .ex-card { padding: 10px 12px 6px; }
  .style-iphone .ex-card .ex-text { margin: 6px 0; }
  .style-iphone .ex-card .ex-actions { gap: 0; }
  body.style-iphone.fullscreen .ex-card .ex-actions .btn-text { padding: 0 6px; font-size: calc(14px * var(--font-scale, 1)); }
  .style-iphone .call-screen.ios-call { padding-top: 48px; padding-bottom: 30px; }
  .style-iphone .ios-call .call-top .avatar { width: 64px; height: 64px; font-size: 26px; margin-bottom: 2px; }
  .style-iphone .ios-call .call-top h2 { font-size: calc(28px * var(--font-scale, 1)); }
}
/* Room between "Remind Me / Message" and the round buttons: the trial's "Tap here to answer" hint sits there. */
.ios-call-small { margin-top: auto; display: flex; justify-content: space-between; padding: 0 20px; margin-bottom: 124px; }
.ios-small-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: calc(13px * var(--font-scale, 1)); min-width: 80px; }
.ios-small-btn .ms { font-size: 26px; width: 26px; }
.ios-incoming { margin-top: 0 !important; margin-bottom: 20px !important; justify-content: space-between !important; padding: 0 10px; }
.ios-round-wrap, .ios-opt-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; font-size: calc(14px * var(--font-scale, 1)); }
.style-iphone .ios-call .call-round { width: 78px; height: 78px; }
.style-iphone .ios-call .call-round .ms { font-size: 36px; }
.style-iphone .ios-call .call-round.answer { background: var(--ios-green); animation: none; }
.style-iphone .ios-call .call-round.decline { background: var(--ios-red); }
.style-iphone .ios-call .call-grid { gap: 22px 0; }
.style-iphone .ios-call .call-opt { width: 78px; height: 78px; border-radius: 50%; background: rgba(255,255,255,.2); justify-content: center; color: #fff; }
.style-iphone .ios-call .call-opt .ms { width: auto; height: auto; background: none; font-size: 32px; }
.style-iphone .ios-call .call-opt.on { background: #fff; color: #111; }
.style-iphone .ios-call .call-opt.on .ms { background: none; color: #111; }
.style-iphone .ios-call .call-end-row { margin-top: 40px; position: relative; }
.style-iphone .ios-call .call-hide { position: absolute; right: 10px; color: #fff; }
.style-iphone .ios-call .call-keypad .dp-key { background: rgba(255,255,255,.2); color: #fff; }
/* "slide to answer" */
.slide-answer { --slid: 0; position: relative; height: 78px; border-radius: 39px; background: rgba(255,255,255,.2); backdrop-filter: blur(12px); display: flex; align-items: center; padding: 0 6px; margin: 0 4px 20px; }
.slide-knob { position: relative; z-index: 2; width: 66px; height: 66px; border-radius: 50%; background: #fff; color: var(--ios-green); display: flex; align-items: center; justify-content: center; transition: transform .25s; touch-action: none; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.slide-knob .ms { font-size: 34px; }
.slide-text { position: absolute; left: 80px; right: 20px; text-align: center; color: #fff; font-size: calc(20px * var(--font-scale, 1)); font-weight: 500; opacity: calc(1 - var(--slid) * 1.6);
  background: linear-gradient(90deg, rgba(255,255,255,.45) 0%, #fff 45%, rgba(255,255,255,.45) 60%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ios-shimmer 2.4s linear infinite; }
@keyframes ios-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* "slide to power off" screen (press and hold the side button) */
.style-iphone .power-menu.ios-power { position: absolute; inset: 0; transform: none; width: auto; height: auto; border-radius: 0; padding: 92px 22px 60px; display: flex; flex-direction: column; justify-content: space-between;
  background: rgba(20,20,26,.55); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); box-shadow: none; color: #fff; }
.pw-slide { --slid: 0; position: relative; height: 72px; border-radius: 36px; background: rgba(255,255,255,.22); display: flex; align-items: center; padding: 0 6px; }
.pw-knob { position: relative; z-index: 2; width: 60px; height: 60px; border-radius: 50%; background: #fff; color: var(--ios-red); display: flex; align-items: center; justify-content: center; transition: transform .25s; touch-action: none; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.pw-knob .ms { font-size: 30px; }
.pw-knob.red { background: var(--ios-red); color: #fff; }
.pw-knob.red b { font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.pw-text { position: absolute; left: 76px; right: 16px; text-align: center; font-size: calc(19px * var(--font-scale, 1)); font-weight: 500; opacity: calc(1 - var(--slid) * 1.6); }
.pw-bottom { display: flex; flex-direction: column; gap: 26px; align-items: stretch; }
.pw-cancel { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: calc(15px * var(--font-scale, 1)); }
.pw-cancel .ms { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 30px; }
/* A call over the lock screen: the call takes the place of the lock screen (phone.js overLock). */
#screen.call-over-lock #appstack { z-index: 31; }
#screen.call-over-lock .appwin.front { display: block; }

/* ── Messages ── */
.style-iphone .messages-app .ios-compose .ms { font-size: 26px; }
.style-iphone .thread { padding: 10px 16px; }
.style-iphone .thread .avatar { width: 44px; height: 44px; }
.style-iphone .thread .li-t b { font-weight: 650; }
.style-iphone .bubble { border-radius: 19px; padding: 8px 13px; font-size: calc(16px * var(--font-scale, 1)); }
.style-iphone .bubble.me { background: var(--ios-blue); color: #fff; border-bottom-right-radius: 6px; }
.style-iphone .bubble.them { background: #e9e9eb; color: #111; border-bottom-left-radius: 6px; }
#screen[data-theme="dark"] .bubble.them { background: #262629; color: #fff; }
.style-iphone .composer-field { background: transparent; border: 1px solid var(--outlineVar); border-radius: 20px; min-height: 38px; }
.style-iphone .composer-field textarea { padding: 8px 0; }

/* ── Photos ── */
.style-iphone .photos-bar { height: auto; padding: 0 12px 6px; }
.style-iphone .photos-bar h1 { margin: 0; }
.style-iphone .photos-bar .ph-logo { font-size: calc(32px * var(--font-scale, 1)); font-weight: 750; color: var(--onSurface); letter-spacing: -.4px; }
.style-iphone .photos-bar .sm-av { display: none; }
.style-iphone .photos-bar [data-import] { color: var(--primary); }
.style-iphone .ph-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; }
.style-iphone .ph-day { font-size: calc(17px * var(--font-scale, 1)); font-weight: 700; }

/* ── First-run "Moving around" page ── */
.ios-move-list { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.ios-move-list li { display: flex; gap: 14px; align-items: flex-start; }
.ios-move-list li > .ms { width: 40px; height: 40px; border-radius: 12px; background: var(--primaryContainer); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ios-move-list b { display: block; font-size: calc(16px * var(--font-scale, 1)); }
.ios-move-list small { display: block; color: var(--onSurfaceVar); font-size: calc(14px * var(--font-scale, 1)); line-height: 1.35; }

@media (prefers-reduced-motion: reduce) { .slide-text { animation: none; color: #fff; background: none; } }

/* Contacts: the "+" (new contact) at the top right, as a blue link (not a floating button). */
.style-iphone .contacts-app .search-bar { margin-right: 60px; }
.style-iphone .contacts-app .fab { top: 52px; bottom: auto; right: 8px; width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 10px; background: none; box-shadow: none; color: var(--primary); }
.style-iphone .contacts-app .fab .ms { font-size: 30px; }

/* The photo viewer is dark: its "‹ Back" link is white. */
.style-iphone .appwin .vw-top .icon-btn[data-vback] { color: #fff; }
