/* Native shell silhouette and controls share one viewport coordinate space. */
.try-edge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.try-edge-row .text-link {
  font-size: 12px;
  color: #6b6b6b;
}
.try-edge-row .icon {
  width: 15px;
  height: 15px;
}
.detached-preview {pointer-events:none}
.page-edge-demo {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  overflow: hidden;
  color: #f2f0eb;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.page-edge-demo[hidden],
.page-edge-demo [hidden] {
  display: none !important;
}
.edge-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: #222;
}
.edge-surface path {
  transition: d 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.edge-folded,
.edge-cell,
.edge-move,
.edge-rail-hit {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  pointer-events: auto;
  border: 0;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: transparent;
  padding: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-variant-numeric: tabular-nums;
}
.edge-folded {
  gap: 8px;
  cursor: pointer;
}
.edge-compact-time {
  font-size: 16px;
  font-weight: 550;
}
.edge-folded i {
  width: 28px;
  height: 3px;
  background: #c0c0ba;
  border-radius: 2px;
}
.edge-cell {
  gap: 7px;
  border-radius: 16px;
  cursor: pointer;
}
.edge-cell:hover,
.edge-cell.is-selected {
  background: #ffffff0d;
}
.edge-cell small {
  font-size: 10px;
  color: #a7a7a7;
}
.edge-cell .icon {
  width: 23px;
  height: 23px;
}
.edge-cell > span:not(.edge-rail-time) {
  font-size: 10px;
  color: #aaa;
}
.edge-cell .edge-rail-time {
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.edge-notes i {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a7ddc9;
}
.edge-move {
  border-radius: 50%;
  background: #222;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.edge-move:before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid #c1c1c1;
  border-radius: 50%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
}
.edge-move span {
  opacity: 0;
  font-size: 27px;
  line-height: 1;
}
.edge-move:hover,
.edge-move:focus-visible,
.is-dragging .edge-move {
  background: #000;
}
.edge-move:hover:before,
.edge-move:focus-visible:before,
.is-dragging .edge-move:before {
  opacity: 0;
}
.edge-move:hover span,
.edge-move:focus-visible span,
.is-dragging .edge-move span {
  opacity: 1;
}
.is-dragging .edge-move {
  cursor: grabbing;
}
.page-edge-panel {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.is-page-docked.native-app {
  position: relative;
  top: 0;
  right: auto;
  width: 390px;
  transform-origin: left top;
}
.is-page-docked .app-shell {
  width: 390px;
  gap: 0;
  background: transparent;
  border-radius: 22px;
}
.is-page-docked .app-rail,
.is-page-docked .app-shell:before,
.is-page-docked .app-shell:after {
  display: none;
}
.is-dragging .edge-surface path,
.is-dragging .edge-cell,
.is-dragging .edge-move,
.is-dragging .page-edge-panel,
.is-dragging .edge-rail-hit {
  transition: none;
}
.edge-demo-controls {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  border: 1px solid #e4e4e4;
  background: #fffffff5;
  box-shadow: 0 5px 25px #00000012;
  border-radius: 30px;
  padding: 10px 15px;
  white-space: nowrap;
  font-size: 12px;
  color: #777;
}
.edge-demo-controls button {
  border-radius: 20px;
  padding: 8px 12px;
  background: #f2f2f2;
  font-size: 11px;
  color: #292929;
}
.edge-demo-controls .edge-return {
  background: #292929;
  color: white;
}
.edge-demo-controls select {
  border: 0;
  background: none;
  font-size: 11px;
  color: #777;
  padding: 5px;
}
.page-edge-demo[data-edge="bottom"] .edge-demo-controls {
  bottom: auto;
  top: 16px;
}
.motion-demo-clip {
  position: absolute;
  inset: 45px 0 0;
  overflow: hidden;
  pointer-events: none;
}
.motion-code-app.native-app {
  top: 18px;
  transform: scale(0.7);
  transform-origin: right top;
  will-change: transform;
}
.motion-code-app .app-shell {
  pointer-events: none;
}
.motion-demo-timer {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 104px;
  border-radius: 12px 0 0 12px;
  background: #222;
  color: #f2f0eb;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.motion-code-app.is-folded {
  transform: translate3d(350px, 0, 0) scale(0.7);
  opacity: 0;
}
.motion-demo-timer.is-visible {
  opacity: 1;
}
.motion-code-app,
.motion-demo-timer {
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.18s ease;
}
.native-motion-stage .native-caption {
  bottom: 25px;
}
.native-motion-stage {
  isolation: isolate;
}

@media (max-width: 760px) {
  .edge-demo-controls {
    max-width: calc(100% - 24px);
    gap: 5px;
    padding: 7px 10px;
    border-radius: 20px;
  }
  .edge-demo-controls > span {
    display: none;
  }
  .edge-demo-controls button {
    padding: 8px 9px;
    font-size: 10px;
  }
  .edge-demo-controls select {
    font-size: 10px;
    max-width: 93px;
  }
  .detached-preview {pointer-events:none}
  .motion-code-app.native-app {
    transform: scale(0.59);
    top: 24px;
  }
  .motion-code-app.is-folded {
    transform: translate3d(295px, 0, 0) scale(0.59);
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-edge-demo *,
  .motion-code-app,
  .motion-demo-timer {
    transition: none !important;
  }
}

.edge-stacked-time {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.edge-stacked-time strong {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}
.edge-stacked-time small {
  font-size: 7px;
  letter-spacing: 1px;
  color: #999;
}
.edge-stacked-time i {
  height: 1px;
  width: 15px;
  background: #ffffff2e;
  margin: 3px 0;
}
.edge-folded .edge-stacked-time strong,
.motion-demo-timer .edge-stacked-time strong {
  font-size: 18px;
}
.motion-demo-timer .edge-stacked-time {
  display: flex;
}
.has-timer:is([data-edge="right"], [data-edge="left"]) .edge-stacked-time {
  display: flex;
}
.has-timer:is([data-edge="right"], [data-edge="left"])
  :is(.edge-compact-time, .edge-rail-time, .edge-rail-unit) {
  display: none;
}
.edge-progress {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 2px;
  background: #ffffff20;
  overflow: hidden;
}
.edge-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: #ccc;
  transform: scaleX(var(--progress, 1));
  transform-origin: left;
}
:is([data-edge="right"], [data-edge="left"]) .edge-progress i {
  transform: scaleY(var(--progress, 1));
  transform-origin: top;
}

.page-edge-demo:not(.has-timer) .edge-folded > *,
.page-edge-demo:not(.has-timer) .edge-progress {
  display: none;
}
