.rs-phone {
  position: relative;
  width: min(100%, 275px);
  aspect-ratio: 9 / 18.5;
  margin-inline: 0;
  padding: 7px;
  border: 2px solid #a5a5ab;
  border-radius: 42px;
  background: #16171b;
  box-shadow: inset 0 0 0 1px #3b3b43, 0 24px 60px #0008;
}
.rs-phone::before, .rs-phone::after {
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #8e8f96; top: 22%; height: 12%;
}
.rs-phone::before { left: -4px; }
.rs-phone::after { right: -4px; top: 29%; }
.rs-phone-screen {
  height: 100%; position: relative; overflow: hidden; isolation: isolate;
  border-radius: 33px; background: #f5f4f1; color: #181821; color-scheme: light;
}
.rs-phone-screen.home { background: radial-gradient(ellipse at 70% 0%,#b1c2db,transparent 63%),linear-gradient(145deg,#1e4f82,#47527d 55%,#1b274b); color: #fff; }
.rs-phone-status {
  position: absolute; z-index: 3; top: 9px; left: 0; width: 100%;
  display: flex; justify-content: space-between; gap: 4px; padding: 0 14px;
  font-size: .69rem; line-height: 1.4; pointer-events: none;
}
.rs-phone-camera { position: absolute; z-index: 4; top: 6px; left: 50%; transform: translateX(-50%); height: 14px; width: 28%; border-radius: 20px; background: #101115; }
.rs-phone-homebar { position: absolute; z-index: 4; inset: auto 32% 5px; height: 4px; border-radius: 8px; background: currentColor; pointer-events: none; }
.rs-phone-content { position: absolute; inset: 35px 0 0; }
.device-browser-page { min-height: 100%; display: grid; justify-items: center; align-content: start; gap: .25rem; padding: 1.2rem .85rem 4.5rem; font-size: .9rem; background: linear-gradient(#17191dd4,#191b20f5),url(assets/salon-hero.webp) center/cover; color: #fff; text-align: center; }
.device-browser-page img { width: 48px; border-radius: 12px; }
.device-browser-page span { font-size: .75rem; }
.device-preview { width: 100%; margin-top: .7rem; padding: .65rem .35rem; border: 1px solid #ffffff48; border-radius: 7px; font-size: .76rem; }
.device-toolbar { position: absolute; inset: auto 0 0; padding: .6rem .7rem .9rem; display: flex; justify-content: space-between; align-items: center; background: #f6f6f8; font-size: .74rem; }
.device-toolbar button,.device-sheet button { border: 0; background: #e2ecfb; color: #123e86; padding: .35rem .6rem; border-radius: 8px; font-weight: 700; }
.device-sheet { position: absolute; inset: auto 0 0; min-height: 62%; display: grid; align-content: start; gap: .65rem; background: #f3f3f7; border-radius: 18px 18px 0 0; padding: .55rem .75rem 1.1rem; box-shadow: 0 -6px 35px #0005; font-size: .78rem; animation: device-sheet-in .38s ease-out both; }
.device-sheet p { margin: 0; color: #575863; }
.device-grabber { width: 28px; height: 4px; margin: 0 auto; background: #aaaab3; border-radius: 4px; }
.device-sheet-row,.device-confirm-bar { display: flex; align-items: center; justify-content: space-between; gap: .45rem; text-align: left; }
.device-sheet-row,.device-share-action,.device-icon-preview { padding: .55rem .45rem; background: #fff; border-radius: 7px; }
.device-icon-preview { display: flex; align-items: center; gap: .5rem; }
.device-icon-preview img { width: 39px; border-radius: 8px; }
.device-icon-preview small { display: block; }
.device-switch { width: 24px; height: 13px; flex: 0 0 24px; border-radius: 20px; background: #2c8550; }
.device-switch::after { content: ""; display: block; width: 10px; height: 10px; margin: 1.5px 1.5px 0 auto; border-radius: 50%; background: white; }
.device-home { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: .55rem .65rem .85rem; }
.device-app-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem .25rem; text-align: center; font-size: .63rem; }
.device-app-grid span,.device-app-grid a { display: grid; align-content: start; justify-items: center; gap: .2rem; text-shadow: 0 1px 4px #0008; text-decoration: none; line-height: 1.2; }
.device-app-grid i,.device-app-grid img,.device-dock i { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; font: 700 1.15rem/1 system-ui; color: white; }
.device-app-grid .calendar { background: #fff; color: #1c1c20; border-top: 5px solid #d64c45; }
.device-app-grid .clock { background: #25252b; }
.device-app-grid .messages,.device-dock .messages { background: #218349; }
.device-app-grid .camera,.device-dock .camera { background: #394d72; }
.device-app-grid .maps,.device-dock .maps { background: #397e9d; }
.device-dock { display: flex; justify-content: space-around; margin-top: .7rem; padding: .4rem; background: #ffffff39; border-radius: 16px; }
.device-tap { position: relative; }
.device-tap::after { content: ""; position: absolute; inset: -3px; border: 2px solid #ddad4c; border-radius: 10px; pointer-events: none; animation: device-pulse 1.6s infinite; }
@keyframes device-pulse { 60%,100% { transform: scale(1.08); opacity: 0; } }
@keyframes device-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
/* The stage gives the handset the space left by the text and navigation. */
.management:has(#install-guide) {
  min-height: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.management:has(#install-guide) > header {
  flex-wrap: nowrap;
  gap: .5rem;
  padding: .4rem max(3vw, .65rem);
  font-size: .85rem;
}
#install-guide {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .35rem;
  width: calc(100% - max(6vw, 1.3rem));
  height: 100%;
  padding: .25rem 0 max(.4rem, env(safe-area-inset-bottom));
}
#install-guide .actions,
#install-stage .guide-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: .3rem .6rem;
  margin: 0;
  font-size: .8rem;
}
#install-guide .pill { padding: .32rem .6rem; font-size: .8rem; }
#install-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: .25rem;
}
#install-stage progress { height: .22rem; margin: 0; }
#install-stage .rs-install {
  grid-template-columns: minmax(0, min(48%, 279px)) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(.65rem, 3vw, 2rem);
  margin: 0;
}
.rs-phone-space {
  display: grid;
  align-items: center;
  justify-items: start;
  container-type: size;
  height: 100%;
  min-height: 0;
  padding-inline-start: 4px;
}
.rs-phone-space .rs-phone {
  width: min(275px, 100%, calc(100cqh * 9 / 18.5));
}
.rs-install .guide-scene {
  max-width: 54ch;
  min-width: 0;
  text-align: left;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.rs-install .guide-scene .overline { margin: 0 0 .15rem; font-size: .68rem; }
#install-stage .rs-install h2 { margin: 0 0 .2rem; font-size: clamp(1.05rem, 3.8vw, 1.65rem); text-wrap: balance; }
.rs-install .guide-scene [role="status"] {
  margin: 0;
  font-size: .85rem;
  line-height: 1.3;
}
.rs-install .guide-scene .pill { margin-top: .25rem; }

@media (max-width: 620px) {
  .rs-phone-space .rs-phone { width: min(245px, 100%, calc(100cqh * 9 / 18.5)); }
  .rs-phone { border-radius: 32px; padding: 5px; }
  .rs-phone-screen { border-radius: 25px; }
  .rs-phone-content { inset-block-start: 28px; }
  .rs-phone-status { top: 6px; }
  .rs-phone-camera { height: 11px; }
  .device-browser-page { padding: .65rem .5rem 3rem; }
  .device-browser-page img { width: 36px; }
  .device-preview { margin-top: .35rem; padding: .4rem .3rem; }
  .device-sheet { gap: .3rem; padding: .35rem .5rem .8rem; }
  .device-sheet-row, .device-share-action, .device-icon-preview { padding: .32rem; }
  .device-app-grid { row-gap: .4rem; }
  .device-app-grid i, .device-app-grid img, .device-dock i { width: 30px; height: 30px; }
}

@media(prefers-reduced-motion:reduce) { .device-tap::after,.device-sheet { animation: none; } }

.device-dock svg { width: 1.18rem; height: 1.18rem; }
