/* AMASO local copy: on the iPhone (below 768px) the desktop becomes the iOS app switcher: AMASO's work as app cards
   over the blurred wallpaper, swipeable, each opening full screen. Geometry comes from laptop.js (--ios-* = the phone's
   screen rectangle in desktop-layer px); everything is clipped to the screen's rounded rectangle. */
.ios-switcher { display: none; }
@media screen and (max-width: 767px) {
  .ios-switcher {
    --W: var(--ios-w, 640px); --H: var(--ios-h, 1390px); --R: calc(var(--W) * .125);
    display: block; position: absolute; z-index: 2147482000; box-sizing: border-box; overflow: hidden;
    left: var(--ios-l, 0px); top: var(--ios-t, 0px); width: var(--W); height: var(--H);
    border-radius: var(--R); clip-path: inset(0 round var(--R)); -webkit-clip-path: inset(0 round var(--R));
    opacity: 0; visibility: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-user-select: none; user-select: none; touch-action: pan-y; cursor: grab;
  }
  .ios-switcher.is-dragging { cursor: grabbing; }
  .ios-switcher img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
  /* shown at once: the services page hands over to the Safari card in the same frame (the card holds the same page,
     same state); the rest comes in with the scroll: wallpaper (--sw-bg), other apps (--sw-fade), Safari's bar (--sb) */
  .ios-switcher-on .ios-switcher { opacity: 1; visibility: visible; }
  .ios-switcher { --sw-fade: 1; --sw-bg: 1; --sb: 1; }
  .ios-sw-bg { opacity: var(--sw-bg); }
  .ios-sw-dock, .ios-sw-island { opacity: var(--sw-fade); }
  .ios-card:not(.ios-card-safari) { opacity: var(--sw-fade); }
  .ios-card-safari .ios-card-head { opacity: var(--sw-fade) !important; }
  /* the macOS desktop and the services window make way */
  .desktop_display.ios-switcher-on > :not(.ios-switcher):not(.display_menu_bar):not(.ios-home):not(.wallpaper) {
    opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transition: none !important;
  }
  /* the wallpaper comes pre-blurred (iphone-wallpaper-soft.jpg = iphone-wallpaper.jpg with blur(.045 W), brightness(.78),
     saturate(1.1) baked in: the box has the picture's own aspect, so the radius is the same at every size). The live
     filter re-rendered a 717 x 1557 blur every frame of the morph in Safari: 150-230 ms frames (perf, 21 Oct 2026) */
  .ios-sw-bg { position: absolute; inset: -6%; background: #2d2116 url(iphone-wallpaper-soft.jpg?v=7997513f55) center / cover no-repeat;
    transform: scale(1.08); }
  .ios-sw-dock { position: absolute; left: 4%; right: 4%; bottom: 2.6%; height: 7.6%; border-radius: calc(var(--W) * .09);
    background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: space-around; padding: 0 6%; filter: blur(calc(var(--W) * .012)); }
  .ios-sw-dock img { width: 15%; aspect-ratio: 1; border-radius: 23%; opacity: .8; filter: blur(calc(var(--W) * .008)); }
  .ios-sw-track { position: absolute; inset: 0; }
  .ios-card { position: absolute; left: 0; top: 0; width: var(--W); height: var(--H); transform-origin: 0 0; will-change: transform; }
  .ios-card-head { position: absolute; left: 0; bottom: 100%; margin-bottom: calc(var(--W) * .05); display: flex; align-items: center; gap: calc(var(--W) * .03);
    color: #fff; font-weight: 600; font-size: calc(var(--W) * .066); letter-spacing: -.01em; white-space: nowrap; text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    transition: opacity .3s ease; }
  .ios-card-head span { overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 1.3; padding: .06em 0 .1em; }
  /* the Dynamic Island stays on top of everything on the screen, as on the real phone */
  .ios-sw-island { position: absolute; z-index: 6000; pointer-events: none; border-radius: 999px; background: #000;
    left: calc(var(--ios-isl-l, 250px) - var(--ios-l, 0px)); top: calc(var(--ios-isl-t, 20px) - var(--ios-t, 0px));
    width: calc(var(--ios-isl-r, 390px) - var(--ios-isl-l, 250px)); height: calc(var(--ios-isl-b, 60px) - var(--ios-isl-t, 20px));
    background: radial-gradient(circle at 78% 50%, #1b2235 0, #0b0f1a 9%, #000 15%) #000; }
  .ios-card-head img { width: calc(var(--W) * .13); height: calc(var(--W) * .13); border-radius: 23%; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
  .ios-card-body { position: absolute; inset: 0; overflow: hidden; border-radius: var(--R); background: #fff;
    box-shadow: 0 calc(var(--W) * .03) calc(var(--W) * .09) rgba(0, 0, 0, .38), 0 0 0 1px rgba(0, 0, 0, .06); }
  .ios-card-shade { position: absolute; inset: 0; border-radius: var(--R); background: #000; opacity: 0; pointer-events: none; }
  /* overscroll containment only while a card is open and scrolls: on a closed card (overflow hidden) it stopped a
     vertical swipe from reaching the page, so on phones /werk/ got stuck at the app switcher (perf, 21 Oct 2026) */
  .ios-card-scroll { position: absolute; inset: 0; overflow: hidden; -webkit-overflow-scrolling: touch; }
  .ios-card-scroll > img { display: block; width: 100%; height: auto; }
  .ios-card.is-open .ios-card-scroll { overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; }
  .ios-card.is-open .ios-card-head { opacity: 0; }
  /* an open app keeps its colour behind the status bar while its page scrolls underneath, as on iOS */
  .ios-card-body::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--W) * .14); background: var(--ios-app-top, #fff);
    opacity: 0; transition: opacity .25s ease; pointer-events: none; }
  .ios-card.is-open .ios-card-body::after { opacity: 1; }
  .ios-switcher.is-open .ios-card:not(.is-open) { opacity: 0; transition: opacity .25s ease; }
  /* status bar space at the top of an opened app (the page starts below the Dynamic Island, as on iOS) */
  .ios-card-scroll::before { content: ""; display: block; height: calc(var(--W) * .14); background: var(--ios-app-top, #fff); }
  .ios-case-pill { position: absolute; left: 50%; bottom: 6.5%; transform: translate(-50%, 20%); opacity: 0; pointer-events: none;
    padding: calc(var(--W) * .028) calc(var(--W) * .06); border-radius: 999px; background: rgba(20, 20, 20, .82); color: #fff; text-decoration: none;
    font-weight: 600; font-size: calc(var(--W) * .045); white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); z-index: 5000;
    transition: opacity .3s ease, transform .3s ease; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .ios-switcher.is-open .ios-case-pill.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; transition-delay: .25s; }
  .ios-home-hit { position: absolute; left: 25%; right: 25%; bottom: 0; height: 6%; z-index: 5001; border: 0; padding: 0; background: transparent;
    cursor: pointer; display: none; touch-action: none; }
  .ios-switcher.is-open .ios-home-hit { display: block; }
}

/* ---- the Safari card: the services page itself (a live copy of .pricing_wrapper, kept in step by ios-switcher.js),
   with iOS Safari's bottom bar over it */
@media screen and (max-width: 767px) {
  .ios-card-safari { --u: calc(var(--W) / 390); }
  .ios-card-safari .ios-card-body { background: #79b8f3; } /* the page's own bottom colour (its blue shapes): a card taller than the page continues it */
  .ios-card-safari .ios-card-scroll::before, .ios-card-safari .ios-card-body::after { display: none; }
  .ios-safari-live { position: absolute; left: 0; top: 0; z-index: 1; transform-origin: 0 0; overflow: hidden; pointer-events: none; }
  .ios-safari-live > .pricing_wrapper { visibility: visible !important; opacity: 1 !important; }
  .ios-safari-live, .ios-safari-live * { transition: none !important; }
  .ios-safari-live .pricing_grabb, .ios-safari-live .pricing_border { display: none !important; } /* desktop window chrome */
  .ios-safari-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; box-sizing: border-box;
    padding: calc(9 * var(--u)) calc(14 * var(--u)) calc(30 * var(--u)); background: rgba(247, 247, 249, .9);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: calc(.5 * var(--u)) solid rgba(0, 0, 0, .14);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; color: #1c1c1e;
    transform: translateY(calc((1 - var(--sb)) * 100%)); opacity: var(--sb); }
  .isb-field { display: flex; align-items: center; justify-content: space-between; height: calc(44 * var(--u)); padding: 0 calc(13 * var(--u));
    border-radius: calc(13 * var(--u)); background: #fff; box-shadow: 0 calc(1 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, .1); }
  .isb-aa { font-size: calc(13 * var(--u)); font-weight: 600; letter-spacing: -.02em; }
  .isb-aa b { font-size: calc(17 * var(--u)); font-weight: 600; }
  .isb-url { display: flex; align-items: center; gap: calc(5 * var(--u)); font-size: calc(16.5 * var(--u)); font-weight: 500; }
  .isb-url svg { width: calc(10 * var(--u)); height: calc(12 * var(--u)); color: #3c3c43; }
  .isb-reload { width: calc(17 * var(--u)); height: calc(17 * var(--u)); color: #1c1c1e; }
  .isb-tools { display: flex; justify-content: space-between; align-items: center; padding: calc(10 * var(--u)) calc(10 * var(--u)) 0; color: #0a7aff; }
  .isb-tools svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
  .isb-tools .isb-dim { color: #b6b6bb; }
}

/* ---- the phone's framing between 480 and 767 px (narrow desktop windows, small tablets). The original photo rule
   (140% wide, 800 px up) left the zoomed-in screen mostly above the viewport, so the switcher sat off screen and the
   zoom-out came from the top. Here the phone's screen always covers the viewport (the body is at least 2.3x the width
   high; the screen is ~0.45 of the body's height wide, ~0.97 high) and the body sits so that the front card with its
   app name is centred in the viewport (that block's centre is 0.051 body heights above the body's centre). */
@media screen and (min-width: 480px) and (max-width: 767px) {
  .amaso-device-ref .retro_mobile { width: auto; height: max(146%, 230vw); margin: 0; top: calc(50% - max(146%, 230vw) * .449); bottom: auto; left: auto; right: auto; }
}
