.device-gallery {
  --phone-wine-dark: #2a151d;
  --phone-wine: #6a3546;
  --phone-copper: #bd8c81;
  --phone-width: clamp(13.45rem, 26vw, 19.4rem);
  --phone-edge: .52rem;
  --phone-turn: 820ms;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  min-width: 0;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--radius, .72rem);
  background: var(--surface);
  color: var(--ink);
}

.phone-showcase {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(1.3rem, 4vw, 3.8rem) .9rem;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 84%, #141920 0%, transparent 58%),
    radial-gradient(ellipse at 37% 21%, #4b5360, #303843 53%, #202632 98%);
}
.phone-showcase::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(91%, 33rem);
  height: min(84%, 38rem);
  border-radius: 50%;
  background: radial-gradient(ellipse, #8391a135, transparent 70%);
  pointer-events: none;
}
.phone-device {
  position: relative;
  width: min(100%, var(--phone-width));
  aspect-ratio: .497;
  perspective: 78rem;
}
.phone-device::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -10% -.6rem;
  height: 7%;
  border-radius: 50%;
  box-shadow: 0 .45rem 1.45rem #180c19;
  background: #1c101d90;
  filter: blur(.7rem);
  pointer-events: none;
}
.phone-3d {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  visibility: hidden;
  pointer-events: none;
}
.phone-rotor {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(0);
  transition: transform var(--phone-turn) cubic-bezier(.45, .05, .2, 1);
}
.device-gallery:is([data-face="turning"], [data-face="front"]) .phone-rotor { transform: rotateY(-180deg); }
.phone-face {
  position: absolute;
  inset: 0;
  border-radius: 15.1% / 7.5%;
  backface-visibility: hidden;
  isolation: isolate;
  border: 1px solid #ba9489;
  background: linear-gradient(113deg, #5c3944 1%, #c39485 8%, #734957 16%, #b67a79 65%, #80515b 88%, #452933);
}
.phone-back { transform: translateZ(calc(var(--phone-edge) / 2)); }
.phone-front { transform: rotateY(180deg) translateZ(calc(var(--phone-edge) / 2)); }
.phone-spine {
  position: absolute;
  z-index: -1;
  inset: 7.5% auto;
  width: var(--phone-edge);
  border: 1px solid #9a6f69;
  border-radius: .16rem;
  background: linear-gradient(90deg, #6b444e, #b2877b 30%, #c29386 62%, #64414b);
  backface-visibility: hidden;
}
.phone-spine-left { left: 0; transform: translateX(-50%) rotateY(-90deg); }
.phone-spine-right { right: 0; transform: translateX(50%) rotateY(90deg); }

.phone-back-plate {
  position: absolute;
  inset: .31rem;
  border: 1px solid #b4837c;
  border-radius: 14.7% / 7.35%;
  background:
    linear-gradient(78deg, #f8baa92a, transparent 7%, transparent 91%, #edada015),
    radial-gradient(ellipse at 24% 14%, #a96270, #783849 38%, #512b38 78%),
    #622d3d;
  box-shadow: inset 0 1px 2px #f3c1b288, inset -.2rem -.29rem .7rem #3b202f6e;
}
.phone-back-plate::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  background: repeating-linear-gradient(169deg, transparent 0 2px, #f4cfc105 2px 3px);
}
.phone-camera-block {
  position: absolute;
  z-index: 1;
  inset: 3.4% auto auto 6%;
  width: 49%;
  aspect-ratio: 1;
  border: 1px solid #c38a84;
  border-radius: 23%;
  background: linear-gradient(146deg, #b37479 0, #9b5966 23%, #6b3546 96%);
  box-shadow: inset .12rem .13rem .28rem #edb3a995, inset -.17rem -.2rem .34rem #492b36af, .19rem .33rem .52rem #2c172596;
}
.phone-lens {
  position: absolute;
  display: block;
  width: 39%;
  aspect-ratio: 1;
  border: 1px solid #d5a39a;
  border-radius: 50%;
  background:
    radial-gradient(circle at 41% 38%, #e1bfd2 0 2%, #856982 5%, #453d5c 9%, transparent 14%),
    radial-gradient(circle at 43% 42%, #4f486e 0 12%, #202038 19%, #101521 30%, #3b3348 43%, #101116 55%),
    linear-gradient(147deg, #d6aa9f 0%, #723f50 34%, #583743 60%, #ab7d77 97%);
  background-repeat: no-repeat;
  background-size: 80% 80%, 79% 79%, 100% 100%;
  background-position: center;
  box-shadow: .14rem .18rem .3rem #321c2bcc, inset .095rem .095rem .15rem #efd0c580, inset -.12rem -.14rem .17rem #52313f;
}
.phone-lens::after {
  content: "";
  position: absolute;
  inset: 16%;
  border: 1px solid #9674884a;
  border-radius: 50%;
  background: linear-gradient(150deg, #d0a6bc43, transparent 38%, transparent 66%, #4a637953);
}
.phone-lens-top { top: 8%; left: 9%; }
.phone-lens-middle { top: 30%; right: 8%; }
.phone-lens-bottom { left: 9%; bottom: 8%; }
.phone-flash, .phone-sensor { position: absolute; right: 15%; width: 13%; aspect-ratio: 1; border-radius: 50%; }
.phone-flash {
  top: 10%;
  border: 1px solid #d7a59f;
  background: radial-gradient(circle, #f4e3bf 0, #dcb4a2 42%, #a57273 69%);
  box-shadow: inset 0 0 .19rem #f0d7bba3;
}
.phone-sensor { bottom: 10%; border: 1px solid #be8b82; background: radial-gradient(circle, #4a3449, #241d2a 74%); }
.phone-open {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: .55rem;
  padding: 0 .5rem 1.45rem;
  border: 0;
  border-radius: inherit;
  color: #fff3e7;
  background: transparent;
  cursor: pointer;
}
.phone-open span, .phone-open .icon {
  z-index: 1;
  margin-bottom: .67rem;
  font-size: .79rem;
  font-weight: 720;
  line-height: 1.25;
}
.phone-open::before {
  position: absolute;
  inset: auto 13% 1.45rem;
  height: 2.45rem;
  border: 1px solid #cf9c9b;
  border-radius: 100vw;
  background: #3a2030a3;
  content: "";
  transition: background-color 160ms ease, transform 150ms var(--ease-out);
}
.phone-open:active::before { transform: scale(.97); }
.phone-open:focus-visible { outline: .17rem solid #f7c7bc; outline-offset: .24rem; }
.phone-open[aria-disabled="true"] { cursor: default; }

.phone-screen {
  position: absolute;
  inset: .31rem;
  overflow: hidden;
  border: .29rem solid #090a0d;
  border-radius: 14.5% / 7.1%;
  background: #121523;
  color: #fff;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}
.phone-screen:active { cursor: grabbing; }
.phone-screen:focus-visible { outline: .15rem solid #f1c6b7; outline-offset: .08rem; }
.phone-indicators {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 2.45rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .55rem 1rem 0;
  font-size: .72rem;
  font-weight: 800;
  pointer-events: none;
}
.phone-pill {
  position: absolute;
  width: 31%;
  aspect-ratio: 4.2;
  top: .36rem;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 100vw;
  background: radial-gradient(circle at 87% center, #314058 0 3%, #1c2234 5%, #090a10 10%);
  box-shadow: inset 0 0 .08rem #2c2d38;
}
.phone-battery {
  position: relative;
  width: .87rem;
  height: .39rem;
  margin-top: .23rem;
  border: 1px solid currentColor;
  border-radius: .12rem;
}
.phone-battery::before { content: ""; position: absolute; inset: .08rem .1rem; border-radius: .05rem; background: currentColor; }
.phone-battery::after { content: ""; position: absolute; width: .08rem; height: .18rem; left: 100%; top: .06rem; background: currentColor; }
.phone-home-bar { position: absolute; z-index: 2; inset: auto 30% .33rem; height: .19rem; border-radius: 100vw; background: currentColor; opacity: .7; pointer-events: none; }
.phone-screen[data-screen-tone="light"] { color: #241d23; }
.phone-slides { position: absolute; inset: 0; overflow: hidden; }
.phone-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 2.5rem .76rem 1.05rem;
  font-size: clamp(.69rem, 1.07vw, .88rem);
  line-height: 1.32;
}
.phone-slide > :last-child { margin-block-start: auto; }
.phone-chat { background: linear-gradient(145deg, #192945, #101c34 69%); color: #eff5ff; }
.phone-chat-header { display: flex; align-items: center; gap: .52rem; padding: 0 .05rem .63rem; border-bottom: 1px solid #65718d59; }
.phone-chat-header strong, .phone-chat-header small { display: block; min-width: 0; }
.phone-chat-avatar {
  display: grid;
  width: 1.93rem;
  flex: 0 0 auto;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #c4deff;
  color: #182b47;
  font-style: normal;
  font-weight: 800;
}
.phone-chat-header small { color: #b1c8ec; font-size: .77em; }
.phone-chat-body { display: flex; flex-direction: column; align-items: flex-start; gap: .48rem; padding-top: .55rem; }
.phone-chat-date { align-self: center; margin: .15rem 0; padding: .22rem .58rem; border-radius: 100vw; background: #293d5c; color: #d3e2fb; font-size: .71em; font-weight: 650; }
.phone-message { max-width: 88%; padding: .5rem .62rem; border-radius: .15rem .72rem .72rem .72rem; color: #eef4ff; background: #294164; }
.phone-message small { color: #c9daef; }
.phone-message-out { align-self: flex-end; border-radius: .72rem .16rem .72rem .72rem; background: #2b5286; }
.phone-times { display: flex; flex-wrap: wrap; gap: .23rem; }
.phone-times span { padding: .3rem .44rem; border: 1px solid #637ead; border-radius: .24rem; background: #1d3457; color: #e4efff; font-weight: 650; }
.phone-times span:nth-child(2) { border-color: #b5d4fb; background: #c3d6fc; color: #132d50; }
.phone-app-footer { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 2.18rem; padding: .4rem .59rem; border-radius: .33rem; background: #acc9f7; color: #152943; font-weight: 760; }
.phone-support { background: linear-gradient(150deg, #242034, #151823 72%); }
.phone-support .phone-chat-avatar { color: #39262b; background: #f5bb86; }
.phone-support .phone-chat-header small, .phone-support .phone-message small { color: #e4c4bf; }
.phone-support .phone-message, .phone-support .phone-chat-date { background: #40314a; }
.phone-support .phone-message-out { background: #623e49; }
.phone-support .phone-app-footer { color: #39262b; background: #f4c598; }

.phone-shop { color: #382820; background: #eee2d0; }
.phone-store-header { display: grid; gap: .15rem; padding: .45rem 0 .4rem; }
.phone-store-header span { font-size: .75em; color: #614c41; }
.phone-store-header strong { font: 560 clamp(2.7rem, 4.7vw, 3.7rem)/.92 Georgia, serif; letter-spacing: -.08em; }
.phone-store-tabs { display: flex; gap: .32rem; margin-block: .48rem; color: #4a3329; font-size: .78em; }
.phone-store-tabs > * { padding: .24rem .4rem; border: 1px solid #a68b7c; border-radius: .23rem; white-space: nowrap; }
.phone-store-tabs b { border-color: #5c4135; color: #fff4ea; background: #5c4135; }
.phone-product { margin-bottom: .62rem; overflow: hidden; border: 1px solid #b99d88; border-radius: .37rem; background: #f9f0e2; }
.phone-product img { width: 100%; height: auto; aspect-ratio: 1.35; object-fit: cover; }
.phone-product figcaption { display: flex; justify-content: space-between; gap: .34rem; padding: .44rem; }
.phone-shop .phone-app-footer { color: #fff7eb; background: #543b30; }

.phone-studio { background: #f3e7e2; color: #382631; }
.phone-studio-header {
  display: grid;
  gap: .15rem;
  align-content: end;
  min-height: 7.5rem;
  padding: .6rem .68rem;
  border-radius: .4rem;
  background: radial-gradient(ellipse at top right, #ad6774, transparent 74%), linear-gradient(132deg, #643146, #482636);
  color: #fff2eb;
}
.phone-studio-header strong { font: 600 clamp(2.65rem, 4.65vw, 3.65rem)/.9 Georgia, serif; letter-spacing: -.075em; }
.phone-studio-header small { font-size: .58em; letter-spacing: .13em; }
.phone-studio-header > span { color: #ffdbc8; font-size: .78em; }
.phone-studio-body { display: grid; gap: .42rem; padding-block: .56rem; }
.phone-studio-body p { font-weight: 760; }
.phone-studio-service { display: flex; justify-content: space-between; align-items: center; gap: .27rem; padding: .43rem .47rem; border: 1px solid #bc9ca5; border-radius: .29rem; background: #fbf3ef; font-weight: 700; }
.phone-studio-service small { display: block; color: #6e5261; font-weight: 500; }
.phone-studio-service b { white-space: nowrap; }
.phone-studio-week, .phone-studio-time { display: grid; gap: .28rem; text-align: center; }
.phone-studio-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.phone-studio-time { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.phone-studio-week span, .phone-studio-time span { padding: .29rem .18rem; border: 1px solid #b99aa5; border-radius: .25rem; background: #faefea; }
.phone-studio-week b { display: block; font-size: 1.17em; }
.phone-studio-week span:nth-child(3), .phone-studio-time span:nth-child(2) { background: #743d54; color: #fff1e9; border-color: #743d54; }
.phone-studio .phone-app-footer { background: #69384a; color: #fff1e9; }

.phone-gallery-copy { min-width: 0; align-self: center; padding: clamp(1.4rem, 4.6vw, 4.8rem); }
.phone-gallery-copy h3 { font: 600 clamp(2.2rem, 4.4vw, 4.6rem)/1.02 var(--display, sans-serif); letter-spacing: -.036em; }
.phone-gallery-copy p { margin-block-start: .96rem; color: var(--ink-muted); }
.phone-gallery-copy .phone-gestures { margin: 0 0 .6rem; color: var(--blue); font-size: .82rem; font-weight: 650; }
.phone-gallery-description { min-height: 3.2em; }
.phone-gallery-nav { display: flex; align-items: center; flex-wrap: wrap; margin-block: 1.05rem; }
.phone-arrow, .phone-dot {
  display: grid;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: .39rem;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background-color 145ms ease, transform 140ms var(--ease-out);
}
.phone-arrow { border-color: var(--line); }
.phone-arrow [href="#arrow-right"] { pointer-events: none; }
.phone-arrow[data-phone-step="-1"] .icon { transform: scaleX(-1); }
.phone-dots { display: flex; align-items: center; }
.phone-dot span { width: .45rem; aspect-ratio: 1; border-radius: 50%; background: #7889a1; transition: background-color 145ms ease, transform 145ms var(--ease-out); }
.phone-dot[aria-pressed="true"] span { background: var(--blue); transform: scale(1.42); }
.phone-gallery-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.phone-reset { border-color: var(--line); color: var(--ink); background: transparent; }
.phone-gallery-copy :focus-visible { outline-color: var(--blue); }
.phone-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.phone-fallback { margin-bottom: 0; padding-inline-start: 1.22rem; }
.phone-fallback a { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--blue); text-underline-offset: .18rem; }

@media (hover: hover) and (pointer: fine) {
  .phone-open:not([aria-disabled="true"]):hover::before { background: #482039db; }
  .phone-arrow:hover, .phone-dot:hover, .phone-reset:hover { background: var(--surface-raised); }
  .phone-arrow:active, .phone-dot:active { transform: scale(.94); }
}

.device-gallery[data-renderer="webgl"] .phone-showcase {
  background:
    radial-gradient(ellipse at 49% 38%, #777d8a60, transparent 62%),
    radial-gradient(ellipse at 50% 91%, #111316, transparent 65%),
    linear-gradient(147deg, #343941, #252830 58%, #1b1e24 100%);
}
.device-gallery[data-renderer="webgl"] .phone-showcase::before,
.device-gallery[data-renderer="webgl"] .phone-device::after,
.device-gallery[data-renderer="webgl"] .phone-spine,
.device-gallery[data-renderer="webgl"] .phone-back-plate { display: none; }
.device-gallery[data-renderer="webgl"] .phone-3d { visibility: visible; }
.device-gallery[data-renderer="webgl"] .phone-rotor {
  z-index: 2;
  transform: none;
  transform-style: flat;
  transition: none;
  pointer-events: none;
}
.device-gallery[data-renderer="webgl"] .phone-face {
  transform: none;
  backface-visibility: visible;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.device-gallery[data-renderer="webgl"] .phone-open {
  padding-bottom: .14rem;
  opacity: 0;
  touch-action: pan-y;
  pointer-events: none;
}
.device-gallery[data-renderer="webgl"] .phone-open::before {
  bottom: .17rem;
  height: 2.75rem;
  border-color: #9da2ae;
  background: #171b23e8;
}
.device-gallery[data-renderer="webgl"] .phone-open span,
.device-gallery[data-renderer="webgl"] .phone-open .icon { margin-bottom: .8rem; color: #f0f3f8; }
.device-gallery[data-renderer="webgl"][data-face="back"] .phone-open { opacity: 1; pointer-events: auto; }
.device-gallery[data-renderer="webgl"] :is(.phone-open, .phone-screen):focus-visible { outline: none; }
.device-gallery[data-renderer="webgl"] .phone-open:focus-visible::before {
  outline: .14rem solid #d3ddf2;
  outline-offset: .2rem;
}
.device-gallery[data-renderer="webgl"] .phone-screen:focus-visible::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 11% 11.5%;
  border: .14rem solid #d3ddf2;
  border-radius: 12% / 6%;
  pointer-events: none;
}
.device-gallery[data-renderer="webgl"] .phone-screen {
  border: 0;
  background: transparent;
  pointer-events: none;
}
.device-gallery[data-renderer="webgl"][data-face="front"] .phone-screen { pointer-events: auto; }
.device-gallery[data-renderer="webgl"] :is(.phone-indicators, .phone-slides, .phone-home-bar) { opacity: 0; pointer-events: none; }

@media (hover: hover) and (pointer: fine) {
  .device-gallery[data-renderer="webgl"] .phone-open:not([aria-disabled="true"]):hover::before { background: #303641f0; }
}

@media (max-width: 52rem) {
  .device-gallery { --phone-width: clamp(14.5rem, 32vw, 18.4rem); }
  .phone-slide { font-size: .78rem; }
  .phone-gallery-copy { padding-inline: clamp(1rem, 3.5vw, 2rem); }
}
@media (max-width: 41rem) {
  .device-gallery { --phone-width: clamp(13.4rem, 65vw, 17.4rem); grid-template-columns: minmax(0, 1fr); }
  .phone-showcase { padding-block: 1.25rem 1.6rem; }
  .phone-gallery-copy { min-height: 9.4rem; }
  .phone-gallery-copy h3 { font-size: clamp(2rem, 8.3vw, 3.15rem); }
  .phone-gallery-description { min-height: 0; }
}
@media (max-width: 22rem) {
  .device-gallery { --phone-width: min(100%, 14.45rem); }
  .phone-slide { padding-inline: .5rem; font-size: .69rem; }
  .phone-chat-body { gap: .37rem; }
  .phone-studio-header { min-height: 6rem; }
  .phone-gallery-nav { margin-block: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .phone-rotor, .phone-open::before, .phone-arrow, .phone-dot, .phone-dot span { transition: none; }
  .phone-rotor { transition-duration: 0s !important; }
}
