/* iphone.css: a realistic iPhone 16 Pro frame (natural titanium), drawn in CSS so the screen holds real, crisp UI.
   Geometry from Apple's published dimensions (71.5 x 149.6 mm, 6.3" display, 402 x 874 pt): the device is 440 x 920
   units, the screen 402 x 874 with a 55-unit corner radius, a 7-unit titanium band and a 12-unit black border.
   Base markup and proportions adapted from devices.css by picturepan2 (MIT); the titanium, glass, buttons, Camera
   Control and status bar are ours.

   <figure class="iph" style="--w:300px">
     <span class="iph-btn is-action"></span><span class="iph-btn is-vol-up"></span><span class="iph-btn is-vol-down"></span>
     <span class="iph-btn is-side"></span><span class="iph-btn is-cam"></span>
     <div class="iph-glass"><div class="iph-screen"> …screen content… </div></div>
   </figure>

   Everything scales from --w (the device width). */
.iph{--w:300px;--u:calc(var(--w) / 440);position:relative;width:var(--w);aspect-ratio:440/920;margin:0;flex:none;
  border-radius:calc(74 * var(--u));padding:calc(7 * var(--u));
  /* natural titanium: brushed, lit from the upper left, with a darker lower right */
  background:
    linear-gradient(135deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,0) 18%,rgba(255,255,255,0) 82%,rgba(0,0,0,.35) 100%),
    linear-gradient(90deg,#8d8983 0%,#c9c4bc 6%,#a8a39b 14%,#bdb8b0 50%,#a39e96 86%,#cfcac2 94%,#86827c 100%);
  box-shadow:
    inset 0 0 0 calc(1 * var(--u)) rgba(255,255,255,.35),
    inset 0 0 0 calc(2 * var(--u)) rgba(0,0,0,.25),
    0 calc(40 * var(--u)) calc(80 * var(--u)) calc(-20 * var(--u)) rgba(0,0,0,.85),
    0 calc(12 * var(--u)) calc(24 * var(--u)) rgba(0,0,0,.5)}
/* antenna bands: thin dark breaks in the titanium near each corner */
.iph::before,.iph::after{content:"";position:absolute;left:calc(46 * var(--u));right:calc(46 * var(--u));height:calc(4 * var(--u));background:
  linear-gradient(90deg,transparent 0 6%,rgba(40,38,36,.55) 6% 7.2%,transparent 7.2% 92.8%,rgba(40,38,36,.55) 92.8% 94%,transparent 94%);pointer-events:none}
.iph::before{top:0}
.iph::after{bottom:0}
.iph-glass{position:relative;width:100%;height:100%;border-radius:calc(67 * var(--u));padding:calc(12 * var(--u));background:#030303;
  box-shadow:inset 0 0 0 calc(1 * var(--u)) rgba(255,255,255,.06),inset 0 calc(1 * var(--u)) calc(2 * var(--u)) rgba(255,255,255,.08)}
.iph-screen{position:relative;width:100%;height:100%;border-radius:calc(55 * var(--u));overflow:hidden;background:#000;isolation:isolate;
  font-family:-apple-system,"SF Pro Display","SF Pro Text",var(--i-font,system-ui),sans-serif;color:#fff}
/* glass: a soft diagonal reflection over everything on the screen */
.iph-screen::after{content:"";position:absolute;inset:0;z-index:30;pointer-events:none;border-radius:inherit;
  background:linear-gradient(118deg,rgba(255,255,255,.10) 0%,rgba(255,255,255,.03) 28%,rgba(255,255,255,0) 42%)}
/* Dynamic Island */
.iph-island{position:absolute;z-index:20;top:calc(11 * var(--u));left:50%;width:calc(126 * var(--u));height:calc(37 * var(--u));margin-left:calc(-63 * var(--u));border-radius:calc(19 * var(--u));background:#000}
.iph-island::after{content:"";position:absolute;right:calc(14 * var(--u));top:50%;width:calc(11 * var(--u));height:calc(11 * var(--u));margin-top:calc(-5.5 * var(--u));border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#2b3550 0 20%,#0b0e18 45%,#000 70%)}
/* buttons on the titanium band */
.iph-btn{position:absolute;width:calc(4 * var(--u));border-radius:calc(2 * var(--u));background:linear-gradient(90deg,#77736d,#c4bfb7 60%,#8d8983)}
.iph-btn.is-action{left:calc(-3 * var(--u));top:calc(196 * var(--u));height:calc(34 * var(--u))}
.iph-btn.is-vol-up{left:calc(-3 * var(--u));top:calc(262 * var(--u));height:calc(64 * var(--u))}
.iph-btn.is-vol-down{left:calc(-3 * var(--u));top:calc(340 * var(--u));height:calc(64 * var(--u))}
.iph-btn.is-side{right:calc(-3 * var(--u));top:calc(290 * var(--u));height:calc(100 * var(--u));background:linear-gradient(270deg,#77736d,#c4bfb7 60%,#8d8983)}
/* Camera Control: a sapphire crystal set nearly flush into the frame */
.iph-btn.is-cam{right:calc(-1.5 * var(--u));top:calc(560 * var(--u));height:calc(62 * var(--u));width:calc(3 * var(--u));background:linear-gradient(270deg,#3d3b38,#6b6863)}

/* status bar */
.iph-status{position:absolute;z-index:21;left:0;right:0;top:0;height:calc(54 * var(--u));display:flex;align-items:center;justify-content:space-between;padding:0 calc(34 * var(--u)) 0 calc(48 * var(--u));
  font-size:calc(17 * var(--u));font-weight:600;letter-spacing:-.01em}
.iph-status svg{display:block;height:calc(12 * var(--u));width:auto;fill:#fff}
.iph-status-r{display:flex;align-items:center;gap:calc(6 * var(--u))}
.iph-status-r .bat{height:calc(13 * var(--u))}

/* lock screen */
.iph .iph-wall{position:absolute;inset:0;z-index:0;max-width:none;object-fit:cover;object-position:var(--wall-x,22%) 50%;width:100%;height:100%}
.iph-wall-shade{position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(0,0,0,.35),rgba(0,0,0,0) 35%,rgba(0,0,0,.25) 70%,rgba(0,0,0,.55))}
.iph-lock{position:absolute;z-index:2;left:0;right:0;top:calc(76 * var(--u));text-align:center}
.iph-date{font-size:calc(21 * var(--u));font-weight:600;opacity:.92}
.iph-time{font-size:calc(104 * var(--u));line-height:1;font-weight:600;letter-spacing:-.02em;margin-top:calc(2 * var(--u))}
.iph-notes{position:absolute;z-index:3;left:calc(10 * var(--u));right:calc(10 * var(--u));bottom:calc(150 * var(--u));display:grid;gap:calc(8 * var(--u))}
.iph-note{display:grid;grid-template-columns:auto 1fr auto;gap:0 calc(10 * var(--u));align-items:start;padding:calc(13 * var(--u)) calc(14 * var(--u));border-radius:calc(22 * var(--u));
  background:rgba(32,32,36,.58);-webkit-backdrop-filter:blur(calc(24 * var(--u))) saturate(1.6);backdrop-filter:blur(calc(24 * var(--u))) saturate(1.6);
  box-shadow:inset 0 0 0 calc(.5 * var(--u)) rgba(255,255,255,.12);font-size:calc(15 * var(--u));line-height:1.3}
.iph-note-ic{grid-row:span 2;width:calc(38 * var(--u));height:calc(38 * var(--u));border-radius:calc(9 * var(--u));display:grid;place-items:center;background:#fff}
.iph-note-ic svg{width:62%;height:auto}
.iph-note-t{font-weight:600;font-size:calc(15 * var(--u))}
.iph-note-time{font-size:calc(13 * var(--u));opacity:.55}
.iph-note-b{grid-column:2 / 4;opacity:.92}
.iph-note.is-quiet{opacity:.72;transform:scale(.96);transform-origin:50% 0}
.iph-dock{position:absolute;z-index:3;left:calc(46 * var(--u));right:calc(46 * var(--u));bottom:calc(54 * var(--u));display:flex;justify-content:space-between}
.iph-dock span{width:calc(50 * var(--u));height:calc(50 * var(--u));border-radius:50%;background:rgba(40,40,44,.55);-webkit-backdrop-filter:blur(calc(14 * var(--u)));backdrop-filter:blur(calc(14 * var(--u)));display:grid;place-items:center}
.iph-dock svg{width:calc(22 * var(--u));fill:#fff}
.iph-home{position:absolute;z-index:3;left:50%;bottom:calc(9 * var(--u));width:calc(140 * var(--u));height:calc(5 * var(--u));margin-left:calc(-70 * var(--u));border-radius:calc(3 * var(--u));background:#fff}
/* a light page on the screen (a light website behind the status bar): dark status glyphs and home bar */
.iph-screen.is-light-ui{color:#111}
.iph-screen.is-light-ui .iph-status svg{fill:#111}
.iph-screen.is-light-ui .iph-home{background:#111}
