/* ==========================================================================
   R2.7 — Hero Living Cyber-Pixel Voxel Portal (`iPhone` · `iPad` · `Mac`)
          + Overlapping <mm-ipad> Stage (1:1 Apple DeviceKit / Device Hub M4 13")
   ========================================================================== */

/* Clean headline cadence without artificial promo-badge gaps */
html[lang="zh-CN"] .intro h1 {
  padding-top: 0;
  font-size: clamp(46px, 4.75vw, 72px);
  line-height: 1.11;
  letter-spacing: -.046em;
  font-weight: 615;
}
html[lang="en-US"] .intro h1 {
  padding-top: 0;
  font-size: clamp(40px, 4.25vw, 64px);
  line-height: 1.07;
  letter-spacing: -.048em;
  font-weight: 615;
}
.intro h1 .hero-from-line {
  display: block;
  white-space: nowrap;
}
html[lang="en-US"] .intro h1 .hero-from-line {
  margin-top: .04em;
}
html[lang="zh-CN"] .intro .intro-lead,
html[lang="en-US"] .intro .intro-lead {
  margin-top: clamp(18px, 2.2vh, 24px);
}
@media (max-width: 760px) {
  .intro h1 .hero-from-line {
    white-space: normal;
  }
}

.intro h1 .hero-client-picker,
.intro h1 .hero-client-picker span,
.intro h1 .hero-client-picker b,
.intro h1 .hero-client-picker i {
  display: inline-block;
  max-width: none !important;
  white-space: nowrap !important;
}
.intro h1 .hero-client-picker span + span::before {
  content: none !important;
}

.hero-client-picker {
  --hc-accent: #6ceeff;
  --hc-hot: #ff47c8;
  --hc-glow: rgba(94, 230, 255, .42);
  position: relative;
  display: inline-flex !important;
  align-items: baseline;
  vertical-align: baseline;
  z-index: 12;
}
.hero-client-picker[data-client="ipad"] {
  --hc-accent: #66f7de;
  --hc-hot: #54b8ff;
  --hc-glow: rgba(102, 247, 222, .4);
}
.hero-client-picker[data-client="mac"] {
  --hc-accent: #baa2ff;
  --hc-hot: #56eeff;
  --hc-glow: rgba(186, 162, 255, .44);
}

/* Invisible hover bridge so diagonal cursor travel from word -> menu never drops hover */
.hero-client-picker[data-open]::after {
  content: "";
  position: absolute;
  left: -20px;
  right: -220px;
  top: 0;
  height: calc(100% + 22px);
  z-index: -1;
  pointer-events: auto;
}
html[lang="zh-CN"] .hero-client-picker[data-open]:not([data-flip-down])::after {
  top: auto;
  bottom: 0;
  height: calc(100% + 22px);
}

/* Borderless kinetic cyber-pixel word — zero box, pure pixel-voxel light & motion */
.hero-client-word {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: .1em;
  padding: 0 .03em .07em .01em;
  margin: 0 .02em;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: #f5fbff;
  cursor: pointer;
  vertical-align: baseline;
  transition: filter .2s ease;
}
.hero-client-picker:is(:hover, [data-open]) .hero-client-word {
  filter: drop-shadow(0 0 18px var(--hc-glow));
}

/* Word stage: vector text + aligned 3px cyber-voxel canvas x-ray overlay */
.intro h1 .hero-client-picker .hc-word-stage {
  position: relative;
  display: inline-block !important;
  vertical-align: baseline;
}
.intro h1 .hero-client-picker .hc-word-ink {
  position: relative;
  display: inline-block !important;
  padding: 0 .02em;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.08;
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(115deg, #ffffff 8%, #8cf0ff 38%, #6cb4ff 68%, #cba8ff 93%, #ffffff 100%);
  animation: hc-prism-flow 5.6s ease-in-out infinite;
  transition: opacity .08s linear;
}
.hero-client-picker[data-client="ipad"] .hc-word-ink {
  background-image: linear-gradient(115deg, #ffffff 8%, #7ffbe5 38%, #56c8ff 68%, #a8bbff 93%, #ffffff 100%);
}
.hero-client-picker[data-client="mac"] .hc-word-ink {
  background-image: linear-gradient(115deg, #ffffff 8%, #e0d6ff 38%, #96b4ff 68%, #6ef0ff 93%, #ffffff 100%);
}
@keyframes hc-prism-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Punch soft x-ray window into smooth vector text right where the 3px pixel scanbeam passes */
.hc-word-stage[data-scanning] .hc-word-ink {
  -webkit-mask-image: linear-gradient(
    100deg,
    #000 calc(var(--scan-x, -999px) - 28px),
    rgba(0, 0, 0, .14) calc(var(--scan-x, -999px) - 14px),
    rgba(0, 0, 0, 0) var(--scan-x, -999px),
    rgba(0, 0, 0, .14) calc(var(--scan-x, -999px) + 14px),
    #000 calc(var(--scan-x, -999px) + 28px)
  );
  mask-image: linear-gradient(
    100deg,
    #000 calc(var(--scan-x, -999px) - 28px),
    rgba(0, 0, 0, .14) calc(var(--scan-x, -999px) - 14px),
    rgba(0, 0, 0, 0) var(--scan-x, -999px),
    rgba(0, 0, 0, .14) calc(var(--scan-x, -999px) + 14px),
    #000 calc(var(--scan-x, -999px) + 28px)
  );
}
.hc-word-stage[data-morphing] .hc-word-ink {
  opacity: 0 !important;
}

.hc-voxel-canvas {
  position: absolute;
  left: -14px;
  top: -10px;
  width: calc(100% + 28px);
  height: calc(100% + 20px);
  pointer-events: none;
  z-index: 2;
  image-rendering: pixelated;
}

/* Inline 16×16 morphing pixel-LED hologram badge (iPhone -> iPad -> MacBook) */
.intro h1 .hero-client-picker .hc-sprite-badge {
  position: relative;
  display: inline-block !important;
  width: .45em;
  height: .45em;
  min-width: 21px;
  min-height: 21px;
  vertical-align: .12em;
  flex: none;
  filter: drop-shadow(0 0 8px var(--hc-glow));
  transition: transform .18s cubic-bezier(.2, .88, .25, 1), filter .18s ease;
}
.hc-sprite-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.hero-client-picker:is(:hover, [data-open]) .hc-sprite-badge {
  transform: translateY(-1px) scale(1.08);
  filter: drop-shadow(0 0 12px var(--hc-accent));
}

/* Stepped pixel-LED baseline rail + quantized pixel comet synced with scanbeam */
.intro h1 .hero-client-picker .hero-client-rail {
  position: absolute;
  left: .02em;
  right: .04em;
  bottom: .01em;
  height: 3px;
  pointer-events: none;
  overflow: hidden;
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--hc-accent) 44%, transparent) 0 3px,
    transparent 3px 6px
  );
}
.intro h1 .hero-client-picker .hero-client-rail::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--rail-pct, -30) * 1%);
  width: 34px;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--hc-hot) 0 3px,
    transparent 3px 6px,
    #ffffff 6px 9px,
    transparent 9px 12px,
    var(--hc-accent) 12px 15px,
    transparent 15px 18px
  );
  filter: drop-shadow(0 0 6px var(--hc-accent));
  opacity: var(--rail-alpha, 0);
}
.hero-client-picker:is(:hover, [data-open]) .hero-client-rail {
  background: repeating-linear-gradient(
    90deg,
    var(--hc-accent) 0 3px,
    transparent 3px 6px
  );
  filter: drop-shadow(0 0 8px var(--hc-glow));
}

.hero-client-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
}

/* Floating cyber-pixel accented dark glass client switcher pill */
.hero-client-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 9px);
  width: max-content;
  z-index: 40;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background-color: rgba(13, 18, 27, .97);
  background-image:
    radial-gradient(rgba(124, 218, 255, .12) 1px, transparent 1px),
    linear-gradient(165deg, rgba(24, 32, 46, .96), rgba(12, 16, 24, .99));
  background-size: 4px 4px, 100% 100%;
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  border: 1px solid rgba(150, 224, 255, .32);
  box-shadow:
    0 20px 46px rgba(2, 6, 14, .76),
    0 0 22px rgba(82, 206, 255, .14),
    inset 0 1px 0 rgba(255, 255, 255, .2);
  font: 560 13.5px/1 var(--ui, -apple-system, BlinkMacSystemFont, sans-serif);
  letter-spacing: -.015em;
  color: #dbe5f2;
  transform-origin: 24px top;
  animation: hc-pop .18s cubic-bezier(.2, .88, .25, 1) both;
}
html[lang="zh-CN"] .hero-client-menu {
  top: auto;
  bottom: calc(100% + 10px);
  transform-origin: 24px bottom;
  animation-name: hc-pop-up;
}
html[lang="zh-CN"] .hero-client-picker[data-flip-down] .hero-client-menu {
  top: calc(100% + 10px);
  bottom: auto;
  transform-origin: 24px top;
  animation-name: hc-pop;
}
.intro .intro-lead {
  transition: opacity .18s ease, filter .18s ease;
}
html[lang="en-US"] .intro:has(.hero-client-picker[data-open]) .intro-lead {
  opacity: .28;
  filter: blur(1.5px);
}
.hero-client-menu[hidden] {
  display: none !important;
}
@keyframes hc-pop {
  from { opacity: 0; transform: translateY(-5px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hc-pop-up {
  from { opacity: 0; transform: translateY(5px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-client-menu .hc-menu-thumb {
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: var(--hc-thumb-w, 84px);
  border-radius: 999px;
  background: linear-gradient(165deg, #f8fdff 0%, #dfeefb 100%);
  box-shadow:
    0 3px 10px rgba(4, 10, 22, .42),
    inset 0 1px 0 #ffffff;
  transform: translate3d(var(--hc-thumb-x, 5px), 0, 0);
  transition:
    transform .28s cubic-bezier(.22, 1, .36, 1),
    width .28s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
  z-index: 0;
}
.hero-client-menu[data-no-anim] .hc-menu-thumb {
  transition: none !important;
}

.hero-client-menu button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: transparent;
  color: #b7c4d6;
  font: 600 13px/1 var(--ui, -apple-system, sans-serif);
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: color .18s ease;
}
.hero-client-menu button:hover {
  color: #f4f8ff;
}
.hero-client-menu button[aria-selected="true"] {
  color: #0e1826;
  font-weight: 600;
}
.hero-client-menu .hc-ico {
  width: 15px;
  height: 15px;
  display: inline-grid !important;
  place-items: center;
  flex: none;
}
.hero-client-menu .hc-ico svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
  stroke: none;
  shape-rendering: crispEdges;
  image-rendering: pixelated;
}

@media (max-width: 760px) {
  .hero-client-menu {
    left: 0;
    top: calc(100% + 7px);
  }
  html[lang="zh-CN"] .hero-client-menu {
    top: calc(100% + 8px);
    bottom: auto;
    transform-origin: 24px top;
    animation-name: hc-pop;
  }
  html[lang="en-US"] .hero-client-menu {
    left: -18px;
  }
  .hero-client-menu button {
    height: 30px;
    padding: 0 11px 0 9px;
    font-size: 12.5px;
  }
  .route-tabs button {
    padding: 3px 11px;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hc-word-ink,
  .hc-sprite-badge,
  .hero-client-menu {
    transition: none !important;
    animation: none !important;
  }
}
@media (forced-colors: active) {
  .hc-word-ink {
    background: none !important;
    -webkit-text-fill-color: CanvasText !important;
    color: CanvasText !important;
  }
  .hc-voxel-canvas {
    display: none !important;
  }
}

/* ==========================================================================
   Hero Overlapping Stage Layout for `data-route="ipad"` + Hover-to-Front
   ========================================================================== */
.hero-ipad {
  display: none;
  transform-origin: top left;
}
.hero-ipad[hidden] {
  display: none;
}
.demo-caption .demo-ipad-label {
  display: none;
}
#devices[data-route="ipad"] .demo-caption .demo-phone-label,
#devices[data-route="ipad"] .demo-caption .demo-peer-label,
#devices[data-route="phone"] .demo-caption .demo-ipad-label,
#devices[data-route="mac"] .demo-caption .demo-ipad-label {
  display: none;
}
#devices[data-route="ipad"] .demo-caption .demo-ipad-label {
  display: inline;
}

.devices[data-route="ipad"] .hero-phone,
.devices[data-route="ipad"] .hero-peer {
  display: none;
}
.devices[data-route="ipad"] .hero-mac {
  left: 0;
  right: auto;
  top: 45%;
  width: min(59%, 496px);
  transform: translateY(-50%);
  z-index: 1;
}
.devices[data-route="ipad"] .hero-ipad {
  display: block;
  position: absolute;
  right: 0;
  top: 53%;
  width: min(74%, 612px);
  transform: translateY(-50%);
  z-index: 3;
}
.devices[data-route="ipad"] .hero-mac > mm-host,
.devices[data-route="ipad"] .hero-ipad > mm-ipad {
  transition: transform .24s cubic-bezier(.22, .78, .24, 1), filter .24s ease;
}
.devices[data-route="ipad"]:not(.host-focus)[data-front="mac"] .hero-mac {
  z-index: 5;
}
.devices[data-route="ipad"]:not(.host-focus)[data-front="mac"] .hero-mac > mm-host {
  transform: translateY(-4px);
  filter: drop-shadow(0 24px 48px rgba(2, 6, 16, .64));
}
.devices[data-route="ipad"] .device-focus {
  left: var(--pair-left, 0px);
  right: auto;
  bottom: 3.5%;
}
.devices[data-route="ipad"].ipad-large .device-focus {
  left: auto;
  right: 0;
  bottom: 2%;
}
.devices.ipad-large .hero-mac {
  opacity: .22;
  filter: blur(1px);
  pointer-events: none;
}
.devices.ipad-large .hero-ipad {
  right: 50%;
  top: 50%;
  width: min(98%, 760px);
  transform: translate(50%, -50%);
  z-index: 4;
}
.devices.host-focus .hero-ipad {
  visibility: hidden;
  pointer-events: none;
}
.devices[data-route] .hero-ipad[data-retiring] {
  display: block !important;
  position: absolute !important;
  pointer-events: none !important;
  inset: auto !important;
  left: var(--old-left) !important;
  top: var(--old-top) !important;
  width: var(--old-width) !important;
  height: var(--old-height) !important;
  transform: none !important;
  visibility: visible !important;
  z-index: 2;
}

@media (min-width: 761px) {
  .devices[data-route="ipad"]:not(.host-focus) {
    min-height: var(--route-stage-height, 0px);
  }
}
@media (max-width: 760px) {
  .devices[data-route="ipad"] {
    height: clamp(380px, 98vw, 540px);
  }
  .devices[data-route="ipad"] .hero-mac {
    width: 74%;
    top: 32%;
    left: 0;
    transform: translateY(-30%);
  }
  .devices[data-route="ipad"] .hero-ipad {
    width: 90%;
    right: 0;
    top: 64%;
    transform: translateY(-40%);
  }
  .devices[data-route="ipad"]:not(.ipad-large) .device-focus {
    right: auto;
    left: 0;
    bottom: 6%;
  }
  .devices[data-route="ipad"].ipad-large {
    height: clamp(420px, 108vw, 580px);
  }
  .devices[data-route="ipad"].ipad-large .hero-ipad {
    width: 98%;
    right: 50%;
    top: 52%;
    transform: translate(50%, -50%);
  }
}

/* ==========================================================================
   <mm-ipad> — Genuine Apple DeviceKit (`Device Hub`) iPad Pro 13-inch (M4)
               Landscape Hardware Shell + 1:1 `live-ipad-hub.png` HUD
   ========================================================================== */
mm-ipad {
  display: block;
  min-width: 0;
  color-scheme: dark;
}

/* Exact 1472 × 1128 pt (184 : 141) artboard from `tablet5.devicechrome` */
.ipd-frame {
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  aspect-ratio: 184 / 141;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter:
    drop-shadow(-18px 24px 48px rgba(2, 6, 15, .64))
    drop-shadow(0 8px 20px rgba(0, 0, 0, .42));
  --ipad-zoom: 1;
}

.ipd-case-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* Exact screen aperture inside 1472 × 1128 artboard: top 50, right 46, bottom 46, left 50 */
.ipd-screen {
  position: absolute;
  inset: 4.4326% 3.125% 4.078% 3.3967%;
  overflow: hidden;
  background: #000000;
  mask: url("assets/ipad-pro13-display-landscape.svg") center / 100% 100% no-repeat;
  -webkit-mask: url("assets/ipad-pro13-display-landscape.svg") center / 100% 100% no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* 4:3 iPad OLED canvas: centers 1470:956 Mac desktop edge-to-edge horizontally (zero inline-size grid collapse!) */
.ipd-surface {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}
.ipd-surface > .os-desktop {
  inset: auto !important;
  position: relative !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1470 / 956;
  max-height: none !important;
  transform: scale(var(--ipad-zoom, 1));
  transform-origin: center;
  transition: transform .26s cubic-bezier(.2, .82, .24, 1);
}

/* Top black letterbox band (`6.65%` height): `<` back circle + `[👁 仅查看 | ↖ 可控制]` capsule */
.ipd-tl {
  position: absolute;
  top: 1.08%;
  left: 1.75%;
  z-index: 6;
  display: flex;
  align-items: center;
}

.ipd-tc {
  position: absolute;
  top: 1.08%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
}

.ipd-glass-circle,
.ipd-mode-switch,
.ipd-rail {
  background: linear-gradient(180deg, rgba(36, 39, 46, .88), rgba(20, 22, 28, .93));
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, .46),
    inset 0 1px 0 rgba(255, 255, 255, .16);
  color: rgba(244, 247, 253, .94);
}

.ipd-glass-circle {
  width: clamp(20px, 3.15cqw, 27px);
  height: clamp(20px, 3.15cqw, 27px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color .16s ease, transform .18s ease;
}
.ipd-glass-circle:hover {
  background: rgba(58, 64, 78, .92);
}
.ipd-glass-circle svg {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ipd-mode-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  gap: 2px;
  border-radius: 999px;
}
.ipd-mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  height: clamp(19px, 2.85cqw, 24px);
  padding: 0 clamp(8px, 1.35cqw, 11px);
  border-radius: 999px;
  color: rgba(220, 228, 240, .74);
  font: 580 clamp(9.5px, 1.38cqw, 11.5px)/1 var(--ui, -apple-system, sans-serif);
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.ipd-mode-switch button:hover {
  color: #fff;
}
/* 1:1 `live-ipad-hub.png` slate-cobalt Control thumb */
.ipd-mode-switch button[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(66, 118, 194, .92) 0%, rgba(44, 86, 154, .95) 100%);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(170, 210, 255, .62),
    0 2px 7px rgba(14, 32, 68, .45);
}
.ipd-mode-switch button[data-ipd="view"][aria-pressed="true"] {
  background: rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
}
.ipd-mode-switch svg {
  width: clamp(10.5px, 1.52cqw, 13px);
  height: clamp(10.5px, 1.52cqw, 13px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Bottom black letterbox band (`6.65%` height): 6-tool Liquid Glass HUD + `[>]` collapse disc */
.ipd-br {
  position: absolute;
  right: 1.65%;
  bottom: .85%;
  z-index: 6;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .6cqw;
}

.ipd-rail {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 2px 3.5px;
  gap: 2px;
  border-radius: 999px;
  transform-origin: right center;
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .85, .25, 1);
}
.ipd-frame.is-rail-tucked .ipd-rail {
  opacity: 0;
  transform: translateX(10px) scale(.88);
  pointer-events: none;
}
.ipd-frame.is-rail-tucked .ipd-collapse svg {
  transform: rotate(180deg);
}
.ipd-collapse svg {
  transition: transform .22s cubic-bezier(.2, .85, .25, 1);
}

.ipd-rail button {
  width: clamp(19px, 2.95cqw, 25px);
  height: clamp(19px, 2.95cqw, 25px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(242, 246, 252, .9);
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.ipd-rail button:hover,
.ipd-rail button[aria-pressed="true"],
.ipd-rail button[aria-expanded="true"] {
  background: rgba(68, 120, 196, .42);
  box-shadow: inset 0 0 0 1px rgba(170, 210, 255, .45);
  color: #e4f2ff;
}
.ipd-rail svg {
  width: 54%;
  height: 54%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Crisp white Home indicator bar inside bottom black letterbox band */
.ipd-home-bar {
  position: absolute;
  bottom: 1.05%;
  left: 50%;
  width: 22.5%;
  height: .48%;
  min-height: 3px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(255, 255, 255, .84);
  z-index: 5;
  pointer-events: none;
}

/* Input mode chooser (`Direct Touch` vs `Trackpad`) anchored above `Input` button */
.ipd-input-pop {
  position: absolute;
  right: 17%;
  bottom: 6.8%;
  z-index: 8;
  width: clamp(152px, 25cqw, 196px);
  padding: 5px;
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(34, 38, 48, .95), rgba(20, 23, 30, .98));
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .54), inset 0 1px 0 rgba(255, 255, 255, .16);
  color: #edf2fa;
  font: 530 11px/1.25 var(--ui, -apple-system, sans-serif);
}
.ipd-input-pop[hidden] {
  display: none !important;
}
.ipd-input-pop button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 9px;
  color: #dce4f0;
  text-align: left;
}
.ipd-input-pop button:hover {
  background: rgba(255, 255, 255, .08);
}
.ipd-input-pop button[aria-checked="true"] {
  background: rgba(68, 120, 196, .34);
  color: #fff;
}
.ipd-input-pop button i {
  font-style: normal;
  color: #7cc4ff;
  font-weight: 700;
}

/* Floating iPad text input capsule */
.ipd-kbd-bar {
  position: absolute;
  left: 50%;
  bottom: 7.4%;
  transform: translateX(-50%);
  width: min(68%, 410px);
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(28, 34, 46, .92), rgba(16, 20, 29, .95));
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  border: 1px solid rgba(214, 232, 255, .22);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.ipd-kbd-bar[hidden] {
  display: none !important;
}
.ipd-kbd-keys {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.ipd-kbd-keys button {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .12);
  font: 550 10.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #dce7f7;
}
.ipd-kbd-keys button:hover {
  background: rgba(132, 196, 255, .22);
  color: #fff;
}
.ipd-kbd-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ipd-kbd-row input {
  flex: 1;
  min-width: 0;
  height: 27px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(9, 12, 18, .72);
  color: #f4f7fc;
  font: 450 12px/1 var(--ui, -apple-system, sans-serif);
}
.ipd-kbd-row button {
  height: 27px;
  padding: 0 11px;
  border-radius: 9px;
  background: linear-gradient(160deg, #4ca2ff, #2875ea);
  color: #fff;
  font: 600 11.5px/1 var(--ui, -apple-system, sans-serif);
  white-space: nowrap;
}

/* Floating PTY Terminal Modal on iPad */
.ipd-term-modal {
  position: absolute;
  right: 2.6%;
  bottom: 7.4%;
  z-index: 8;
  width: clamp(230px, 44cqw, 330px);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 18, 24, .95);
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .14);
  color: #e6edf7;
}
.ipd-term-modal[hidden] {
  display: none !important;
}
.ipd-term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ipd-term-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ipd-term-head i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #32d74b;
}
.ipd-term-head button {
  color: rgba(235, 242, 255, .65);
  font-size: 11px;
  padding: 2px 4px;
}
.ipd-term-log {
  margin: 0;
  padding: 8px 10px;
  max-height: 110px;
  overflow-y: auto;
  font: 450 10.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #dbe6f5;
  white-space: pre-wrap;
}
.ipd-term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .26);
}
.ipd-term-bar input {
  flex: 1;
  min-width: 0;
  font: 450 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #fff;
  background: none;
  border: 0;
  outline: none;
}
.ipd-term-bar button {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(74, 158, 255, .24);
  color: #a9d6ff;
  font: 600 11px/1 ui-monospace, monospace;
}

/* Authentic frosted iPadOS 26 More menu popover */
.ipd-more-pop {
  position: absolute;
  right: 2.0%;
  bottom: 7.2%;
  z-index: 8;
  width: clamp(168px, 28cqw, 214px);
  padding: 6px;
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(245, 248, 253, .94), rgba(226, 233, 244, .92));
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 16px 38px rgba(6, 10, 18, .44), inset 0 1px 0 #fff;
  color: #18212e;
  font: 520 11.5px/1.25 var(--ui, -apple-system, sans-serif);
}
.ipd-more-pop[hidden] {
  display: none !important;
}
.ipd-more-pop button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  color: #192230;
  text-align: left;
}
.ipd-more-pop button:hover {
  background: rgba(24, 38, 62, .08);
}
.ipd-more-pop .ipd-more-sep {
  height: 1px;
  margin: 4px 6px;
  background: rgba(24, 34, 48, .1);
}
.ipd-more-pop kbd {
  font: 500 10px/1 var(--ui, -apple-system, sans-serif);
  color: #5d6b7e;
}

/* Obsidian Manual Clipboard Sheet on iPad (`RemoteClipboardView.swift`) */
.ipd-clip-sheet {
  position: absolute;
  right: 2.2%;
  bottom: 7.2%;
  z-index: 8;
  width: clamp(210px, 37cqw, 272px);
  padding: 11px 12px;
  border-radius: 18px;
  background: #111215;
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .66), inset 0 1px 0 rgba(255, 255, 255, .08);
  color: #f3f5f9;
  font: 500 11.5px/1.35 var(--ui, -apple-system, sans-serif);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ipd-clip-sheet[hidden] {
  display: none !important;
}
.ipd-clip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ipd-clip-head b {
  font-size: 12px;
  font-weight: 640;
  color: #f5f7fb;
}
.ipd-clip-head button {
  padding: 4px 9px;
  border-radius: 999px;
  background: #212328;
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 10.2px;
  color: #eef2f8;
  font-weight: 600;
}
.ipd-clip-head button:hover {
  background: #2b2e35;
}
.ipd-clip-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 9px;
  border-radius: 13px;
  background: #212328;
  border: 1px solid rgba(255, 255, 255, .06);
  color: #e8ecf4;
}
.ipd-clip-card:hover {
  background: #282b31;
}
.ipd-clip-card small {
  display: block;
  font-size: 9.5px;
  color: rgba(235, 235, 245, .56);
  margin-bottom: 2px;
}
.ipd-clip-card span {
  display: block;
  font-size: 10.8px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ipd-clip-compose {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 9px;
  border-radius: 999px;
  background: #212328;
  border: 1px solid rgba(255, 255, 255, .08);
}
.ipd-clip-compose input {
  flex: 1;
  min-width: 0;
  height: 23px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  outline: none;
}
.ipd-clip-compose button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0a84ff;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}

.ipd-watch-pill,
.ipd-off {
  position: absolute;
  z-index: 6;
}
.ipd-watch-pill {
  bottom: 7.4%;
  left: 50%;
  transform: translateX(-50%);
  padding: .42cqw 1.25cqw;
  border-radius: 999px;
  background: rgba(24, 30, 42, .88);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #e9eff8;
  font: 540 clamp(10px, 1.5cqw, 11.5px)/1.2 var(--ui);
  white-space: nowrap;
}
.ipd-off {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2cqw;
  background: rgba(13, 16, 23, .94);
  color: #e7ecf5;
}
.ipd-off b {
  font-size: clamp(14px, 2.8cqw, 20px);
}
.ipd-off button {
  padding: .65cqw 1.8cqw;
  border-radius: 999px;
  background: #2f74e8;
  color: #fff;
  font-size: clamp(11px, 1.8cqw, 13px);
}
.ipd-watch-pill[hidden],
.ipd-off[hidden] {
  display: none !important;
}
