:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  color: #292b30;
  background: #f4f5f6;
  --time-scale: 1;
  --stack-ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible { outline: 2px solid #25b4e1; outline-offset: 4px; }

.preview {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 20px 88px;
}

.device-viewport {
  position: relative;
  width: 375px;
  height: 812px;
  overflow: hidden;
  background: white;
  box-shadow: 0 12px 60px #202b3c0c, 0 0 0 1px #202b3c05;
}

/* Figma 1125 × 2436 maps to a 375 × 812 logical viewport. */
.screen {
  position: absolute;
  width: 375px;
  height: 812px;
  transform-origin: top left;
  overflow: hidden;
  background: white;
}

.screen img { display: block; pointer-events: none; user-select: none; }
.background { position: absolute; inset: 0; width: 375px; height: 812px; }
.permission-row { position: absolute; left: 85px; top: 319px; width: 205px; height: 42px; }
.permission-row > img { width: 205px; height: 42px; }
.switch {
  position: absolute;
  left: 159px;
  top: 13.125px;
  width: 36px;
  height: 15.75px;
  border: 0;
  border-radius: 60px;
  padding: 0;
  background: rgb(116 116 128 / 8%);
  -webkit-tap-highlight-color: transparent;
}
.switch::before { content: ""; position: absolute; inset: -12px; }
.knob { position: absolute; top: 1.875px; left: 2px; width: 21px; height: 12px; border-radius: 50px; background: #fff; }

.lock-content { position: absolute; opacity: 0; }
.lock-clock { left: 136.6667px; top: 322.3333px; width: 101.3333px; height: 41px; }
.lock-widgets { left: 107.6667px; top: 378px; width: 159.5554px; height: 34px; }

/* This stays fixed; the combined bounds of 1, 2 or 3 cards are centered inside it. */
.notification-region { position: absolute; left: 35px; top: 443.3333px; width: 305px; height: 133.6918px; isolation: isolate; }
.notification {
  position: absolute;
  left: 0;
  top: 0;
  width: 305px;
  height: 83px;
  border: 1px solid rgb(22 21 23 / 5%);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 20px rgb(0 0 0 / 5%);
  transform-origin: top center;
  will-change: transform, opacity;
  transition:
    transform calc(430ms * var(--time-scale)) cubic-bezier(.22, 1.15, .36, 1),
    opacity calc(350ms * var(--time-scale)) ease,
    filter calc(430ms * var(--time-scale)) ease;
}
.notification > img {
  position: absolute;
  inset: -1px;
  width: 305px;
  height: 83px;
  transition: opacity calc(400ms * var(--time-scale)) ease;
}
.notification[data-rank="0"] > img { opacity: 1; }
.notification[data-rank="1"] > img,
.notification[data-rank="2"] > img { opacity: .3; }
.notification[data-rank="3"] > img { opacity: 0; }

.actions { position: absolute; inset: 657px 20px auto; opacity: 0; pointer-events: none; }
.actions button { display: block; border: 0; width: 100%; padding: 0; }
.enable-button { height: 48px; border-radius: 3px; background: #25b4e1; color: #fff; font-size: 16px; font-weight: 600; line-height: 18px; }
.later-button { margin-top: 30px; height: 22.3333px; background: transparent; color: rgb(60 60 67 / 30%); font-size: 16px; font-weight: 500; }

/* Delays below are relative to the moment the switch starts moving. */
.screen.is-started .switch { animation: switch-on calc(260ms * var(--time-scale)) ease forwards; }
.screen.is-started .knob { animation: knob-on calc(260ms * var(--time-scale)) var(--stack-ease) forwards; }
.screen.is-started .permission-row { animation: permission-out calc(280ms * var(--time-scale)) calc(220ms * var(--time-scale)) cubic-bezier(.4, 0, .6, 1) both; }
.screen.is-started .lock-clock { animation: lock-in calc(450ms * var(--time-scale)) calc(300ms * var(--time-scale)) var(--stack-ease) both; }
.screen.is-started .lock-widgets { animation: lock-in calc(450ms * var(--time-scale)) calc(300ms * var(--time-scale)) var(--stack-ease) both; }
.screen.is-started .actions { animation: actions-in calc(450ms * var(--time-scale)) calc(300ms * var(--time-scale)) ease both; pointer-events: auto; }

@keyframes switch-on { to { background: #7ab587; } }
@keyframes knob-on { to { transform: translateX(11px); } }
@keyframes permission-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(22px); opacity: 0; } }
@keyframes lock-in { from { transform: translateY(-22px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes actions-in { from { opacity: 0; } to { opacity: 1; } }

.controls {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 28px max(12px, env(safe-area-inset-bottom));
  background: rgb(250 250 251 / 94%);
  border-top: 1px solid #e8eaed;
  backdrop-filter: blur(16px);
  font-size: 12px;
}
.prototype-label { font-weight: 600; white-space: nowrap; }
.prototype-label span { color: #969ba2; font-weight: 400; margin-left: 10px; }
.control-buttons { display: flex; align-items: center; gap: 8px; }
.control-buttons button, .speed-control { background: #fff; border: 1px solid #e3e5e8; border-radius: 7px; height: 32px; padding: 0 12px; }
.control-buttons button:hover { background: #f3f5f7; }
#pause { min-width: 52px; }
.speed-control { display: flex; align-items: center; gap: 6px; color: #8c9199; }
.speed-control select { border: 0; background: transparent; color: #292b30; cursor: pointer; }
@media (max-width: 540px) {
  .preview { padding: 12px 0 76px; }
  .controls { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .prototype-label span { display: none; }
  .control-buttons { gap: 5px; }
  .control-buttons button, .speed-control { padding: 0 8px; }
}
