/* AS Remote live demo: the app's remote screen (Classic Blue theme, Full layout) driving a simulated TV.
   Shared by app pages; markup in the page, behaviour in remote.js.
   Rebuilt from the homepage Lab (assets/home/home.css, "AS Remote (Classic Blue)"). */

.dphone{position:relative;width:min(100%,340px);aspect-ratio:360/720;padding:10px;border-radius:54px;margin:0 auto;
  background:linear-gradient(160deg,#343949,#0d0f16 38%,#20242f);
  box-shadow:0 0 0 1px rgba(255,255,255,.16),0 60px 110px -50px #000,0 40px 90px -45px var(--ac,#2FB8FF)}
.dphone__screen{position:relative;height:100%;border-radius:44px;overflow:hidden;background:#0E131D;isolation:isolate}
.dphone__screen::before{content:"";position:absolute;top:11px;left:50%;z-index:20;width:94px;height:27px;transform:translateX(-50%);border-radius:20px;background:#000}
.dphone__still{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top}
/* the store screenshot already shows an iPhone, so until the live demo takes over the frame steps aside */
.dphone:not(.is-live){padding:0;background:none;border-radius:24px;aspect-ratio:600/1304}
.dphone:not(.is-live) .dphone__screen{border-radius:24px}
.dphone:not(.is-live) .dphone__screen::before{display:none}
.dsprite{position:absolute;width:0;height:0;overflow:hidden}

.demo{position:absolute;top:0;left:0;width:340px;height:700px;transform:scale(var(--fit,1),var(--fity,var(--fit,1)));transform-origin:0 0;overflow:hidden;
  display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Inter',sans-serif;-webkit-font-smoothing:antialiased;line-height:1.3}
.demo[hidden]{display:none}
.demo svg{width:1em;height:1em;flex:none}
.demo button{font:inherit;color:inherit;background:none;border:0}
.ios-bar{position:relative;z-index:21;flex:none;display:flex;align-items:center;justify-content:space-between;height:50px;padding:6px 26px 0 34px;font-size:15px;font-weight:600;letter-spacing:-.01em}
.demo__tag{font-size:9.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;padding:3px 7px;border-radius:999px;border:1px solid currentColor;opacity:.75}
.tabbar{margin-top:auto;flex:none;display:grid;grid-template-columns:repeat(5,1fr);padding:7px 4px 26px;font-size:9.5px;font-weight:500;letter-spacing:.01em}
.tabbar span{display:flex;flex-direction:column;align-items:center;gap:3px;white-space:nowrap}
.tabbar svg{width:23px;height:23px}

.rm{background:#0E131D;color:#fff}
.rm button{display:grid;place-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent}
.rm button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.rm__top{flex:none;display:flex;align-items:center;gap:10px;height:52px;padding:0 17px}
.rm__power{width:42px;height:42px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#FF4A4A,#D60000)!important;color:#fff;box-shadow:0 6px 16px -4px rgba(255,4,4,.55)}
.rm__power svg{width:19px;height:19px}
.rm.is-off .rm__power{background:#2A3142!important;box-shadow:none}
.rm__tv{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;font-weight:600}
.rm__dot{width:7px;height:7px;border-radius:50%;background:#22C55F}
.rm.is-off .rm__dot{background:#FF3B30}
.rm__icons{display:flex;gap:15px;color:#808B9D}
.rm__icons svg{width:19px;height:19px}
.rm__modes{flex:none;margin:6px 17px 0;display:grid;grid-template-columns:repeat(3,1fr);padding:3px;border-radius:12px;background:#111828}
.rm__modes span{height:34px;display:grid;place-items:center;border-radius:10px;color:#808B9D}
.rm__modes .is-on{background:rgba(28,96,236,.3);color:#fff}
.rm__modes svg{width:19px;height:19px}
.rm__center{flex:none;display:flex;align-items:center;justify-content:space-between;padding:14px 22px 0}
.rm__rocker{width:70px;height:108px;border-radius:22px;background:linear-gradient(180deg,#0E1F41,#111724);display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:4px 0;box-shadow:0 10px 20px rgba(0,0,0,.2)}
.rm__rocker button{width:62px;height:34px;border-radius:16px;color:#808B9D}
.rm__rocker button:active,.rm__mini button:active,.rm__nav button:active{background:rgba(28,96,236,.35)}
.rm__rocker svg{width:12px;height:12px}
.rm__rocker .dn,.rm__pad .dn svg{transform:rotate(180deg)}
.rm__rocker b{font-size:11.5px;font-weight:600}
.rm__mini{display:grid;grid-template-columns:repeat(2,44px);gap:7px 10px}
.rm__mini button{width:44px;height:44px;border-radius:50%;background:#0E1F41;color:#fff;box-shadow:0 8px 18px rgba(0,0,0,.25)}
.rm__mini svg{width:17px;height:17px}
.rm__pad{flex:none;position:relative;margin:16px auto 0;width:212px;height:212px;border-radius:50%;
  background:radial-gradient(circle,#131E36,#101622 72%);box-shadow:inset 0 0 0 1px #111928,-14px -14px 15px rgba(29,49,93,.2),14px 14px 17px rgba(0,0,0,.6)}
.rm__pad button{position:absolute;width:56px;height:56px;border-radius:50%;color:#808B9D}
.rm__pad button svg{width:14px;height:14px}
.rm__pad .up{top:6px;left:78px}
.rm__pad .dn{bottom:6px;left:78px}
.rm__pad .lt{left:6px;top:78px}.rm__pad .lt svg{transform:rotate(-90deg)}
.rm__pad .rt{right:6px;top:78px}.rm__pad .rt svg{transform:rotate(90deg)}
.rm__pad button:not(.ok):active{background:rgba(28,96,236,.25)}
.rm__pad .ok{top:62px;left:62px;width:88px;height:88px;background:#0E1F41;color:#fff;font-size:23px;font-weight:700;
  box-shadow:inset 0 0 0 1px #474B54,10px 10px 15px rgba(0,0,0,.75),-8px -8px 11px rgba(19,42,87,.4)}
.rm__pad .ok:active{transform:scale(.95)}
.rm__nav{flex:none;display:flex;justify-content:center;gap:17px;margin-top:16px}
.rm__nav button{width:56px;height:42px;border-radius:14px;background:#0E1F41;color:#fff;box-shadow:0 8px 18px rgba(0,0,0,.25)}
.rm__nav svg{width:15px;height:15px}
.rm__apps{flex:none;display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:12px 17px 0}
.rm__apps button{height:38px;border-radius:10px;background:#0E1F41;color:var(--b);font-size:11.5px;font-weight:800;letter-spacing:-.01em;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.rm__tabs{background:rgba(14,19,29,.94);border-top:.5px solid rgba(255,255,255,.12);color:#808B9D}
.rm__tabs .is-on{color:#1C60EC}

/* the simulated TV */
.tv{position:relative;aspect-ratio:16/9;padding:10px;border-radius:12px;overflow:hidden;background:#05060a;
  box-shadow:inset 0 0 0 3px #1d2230,0 30px 70px -30px var(--ac,#2FB8FF)}
.tv__grid{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:6px;height:100%;transition:opacity .4s}
.tv__tile{display:grid;place-items:center;border-radius:8px;font-size:clamp(11px,1.3vw,15px);font-weight:700;letter-spacing:.02em;color:#fff;
  background:linear-gradient(140deg,var(--a),var(--b));opacity:.5;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .25s,box-shadow .25s}
.tv__tile.is-f{opacity:1;transform:scale(1.07);box-shadow:0 0 0 2px #fff,0 10px 24px -8px #000;z-index:1}
.tv__play{position:absolute;inset:0;z-index:2;display:grid;place-items:center;text-align:center;padding:12px;font-size:clamp(1.1rem,2.4vw,1.8rem);font-weight:800;letter-spacing:-.02em;line-height:1.2;color:#fff;
  background:linear-gradient(140deg,var(--a,#123),var(--b,#000));opacity:0;transform:scale(1.08);pointer-events:none;transition:opacity .35s,transform .5s cubic-bezier(.16,1,.3,1)}
.tv__play small{display:block;font-size:10.5px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;opacity:.75;margin-bottom:6px}
.tv.is-playing .tv__play{opacity:1;transform:none}
.tv.is-paused .tv__play::after{content:"Paused";position:absolute;top:12px;right:14px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;opacity:.8}
.tv__vol{position:absolute;left:12px;right:12px;bottom:9px;height:4px;border-radius:4px;background:rgba(255,255,255,.2);opacity:0;transition:opacity .3s}
.tv__vol i{display:block;height:100%;border-radius:4px;background:#fff;width:calc(var(--v,40)*1%);transition:width .2s}
.tv.is-vol .tv__vol{opacity:1}
.tv.is-off .tv__grid,.tv.is-off .tv__play,.tv.is-off .tv__vol{opacity:0}
.tv.is-off::after{content:"TV is off";position:absolute;inset:0;display:grid;place-items:center;font-size:13px;color:#8A91A2}

@media (prefers-reduced-motion:reduce){.tv__tile,.tv__play,.tv__vol,.tv__vol i{transition:none}}
