/* ==========================================================================
   Gadget ID — 3D booking tool
   The phone is built from real 3D planes (CSS transforms): a front glass, a
   back glass, a ring of wall segments, and the parts inside. Sizes are in
   millimetres multiplied by --u (pixels per millimetre).
   ========================================================================== */

@property --sway {
  syntax: "<angle>";
  inherits: true;
  initial-value: 8deg;
}

html:not(.js) .booking > :not(noscript) {
  display: none;
}

.booking noscript p {
  padding: 28px;
  color: var(--text-2);
}

.booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  align-items: start;
  gap: 8px;
  padding: 10px;
  border-radius: var(--r-xl);
}

/* ---------- Stage ---------- */

.bk-stage {
  --u: clamp(1.8px, (100vh - 150px) / 250, 2.5px);
  position: sticky;
  top: 84px;
  height: clamp(440px, 100vh - 110px, 640px);
  overflow: hidden;
  border-radius: 26px;
  background: var(--fill);
  perspective: 1500px;
  perspective-origin: 50% 46%;
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  outline-offset: -4px;
}

.bk-stage.dragging {
  cursor: grabbing;
}

.bk-halo {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 88%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--brand) 62%, transparent),
    transparent 72%
  );
  opacity: 0.5;
  filter: blur(26px);
  pointer-events: none;
}

[data-theme="dark"] .bk-halo {
  opacity: 0.26;
}

.bk-shadow {
  position: absolute;
  left: 50%;
  bottom: 8.5%;
  width: 44%;
  height: 30px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.42), transparent);
  filter: blur(8px);
  pointer-events: none;
}

.bk-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.bk-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass-solid);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.bk-tag[hidden] {
  display: none;
}

.bk-tag.part {
  background: var(--brand);
  color: #111;
}

.bk-tag.part::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111;
  animation: bk-blink 0.9s ease-in-out infinite alternate;
}

.bk-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--fill-strong);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.bk-hint svg {
  width: 15px;
  height: 15px;
}

.bk-stage.touched .bk-hint {
  opacity: 0;
}

/* ---------- Real 3D phone (WebGL canvas) ---------- */

.bk-gl {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* The flat-panel phone below is only shown when WebGL is not available */
.bk-stage.gl .ph-orbit {
  display: none;
}

/* ---------- Phone drawn from flat panels (fallback) ---------- */

.ph-orbit,
.ph-sway {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.ph-orbit {
  left: 50%;
  top: 46%;
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -26deg));
  transition: transform 1.1s var(--ease);
}

.bk-stage.dragging .ph-orbit {
  transition: none;
}

.ph-sway {
  left: 0;
  top: 0;
  animation: ph-sway 6s ease-in-out infinite alternate;
  transition: --sway 1s ease;
}

.bk-stage.dragging .ph-sway,
.bk-stage.off .ph-sway {
  animation-play-state: paused;
}

@keyframes ph-sway {
  from {
    transform: rotateY(calc(var(--sway, 8deg) * -1)) translateY(-5px);
  }
  to {
    transform: rotateY(var(--sway, 8deg)) translateY(5px);
  }
}

.ph {
  --lf: 0;
  --lb: 0;
  position: absolute;
  left: calc(var(--w) * var(--u) / -2);
  top: calc(var(--h) * var(--u) / -2);
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  transform-style: preserve-3d;
}

.ph.swap {
  animation: ph-in 0.8s var(--ease);
}

@keyframes ph-in {
  from {
    transform: scale3d(0.82, 0.82, 0.82) rotateY(-70deg);
  }
}

.ph div {
  position: absolute;
}

/* How far the front and the back glass lift off the body, in millimetres */
.ph[data-mode="open"] {
  --lf: 36;
}

.ph[data-mode="screen"] {
  --lf: 9;
}

.ph[data-mode="back"] {
  --lb: 9;
}

/* Front glass and display */

.ph-front {
  inset: 0;
  overflow: hidden;
  border-radius: calc(var(--r) * var(--u));
  background: #060607;
  box-shadow: inset 0 0 0 calc(0.6 * var(--u)) var(--rim);
  transform: translateZ(calc((var(--t) / 2 + var(--lf)) * var(--u)));
  transition: transform 0.95s var(--ease), opacity 0.7s ease,
    box-shadow 0.5s ease;
}

.ph[data-mode="open"] .ph-front {
  opacity: 0.22;
}

.scr-display {
  inset: calc(var(--b) * var(--u));
  border-radius: calc((var(--r) - var(--b)) * var(--u));
  /* Wallpaper in the colours of the model's finish: two thin arcs over soft orbs */
  background: radial-gradient(circle at 50% 122%, transparent 0 56%, rgba(255, 255, 255, 0.18) 56.4% 57%, transparent 57.4%),
    radial-gradient(circle at 50% 122%, transparent 0 40%, rgba(255, 255, 255, 0.13) 40.4% 41%, transparent 41.4%),
    radial-gradient(120% 70% at 18% 6%, var(--wp0), transparent 55%),
    radial-gradient(90% 60% at 96% 38%, var(--wp1), transparent 60%),
    radial-gradient(110% 70% at 28% 100%, var(--wp2), transparent 60%),
    radial-gradient(80% 50% at 82% 92%, var(--wp3), transparent 60%),
    var(--wp4);
}

/* Status bar and home indicator */

.scr-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: calc(3.1 * var(--u));
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.01em;
  text-shadow: 0 0 calc(0.8 * var(--u)) rgba(0, 0, 0, 0.45);
}

.st-icons {
  display: flex;
  align-items: center;
  gap: calc(1.1 * var(--u));
}

.st-sig,
.st-bat {
  display: block;
  filter: drop-shadow(0 0 calc(0.5 * var(--u)) rgba(0, 0, 0, 0.4));
}

.st-sig {
  width: calc(3.8 * var(--u));
  height: calc(2.5 * var(--u));
  background: linear-gradient(#fff, #fff) 0% 100% / 17% 40% no-repeat,
    linear-gradient(#fff, #fff) 33.3% 100% / 17% 60% no-repeat,
    linear-gradient(#fff, #fff) 66.6% 100% / 17% 80% no-repeat,
    linear-gradient(#fff, #fff) 100% 100% / 17% 100% no-repeat;
}

.st-bat {
  width: calc(5.4 * var(--u));
  height: calc(2.6 * var(--u));
  border-radius: calc(0.75 * var(--u));
  background: linear-gradient(#fff, #fff) calc(0.55 * var(--u)) 50% / 66% 54% no-repeat;
  box-shadow: inset 0 0 0 calc(0.28 * var(--u)) rgba(255, 255, 255, 0.7);
}

.scr-home {
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 calc(0.8 * var(--u)) rgba(0, 0, 0, 0.3);
}

.scr-glare {
  inset: 0;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.06) 30%,
    transparent 46%
  );
}

.scr-cut {
  background: #000;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.scr-cut.notch {
  border-radius: 0 0 calc(3.4 * var(--u)) calc(3.4 * var(--u));
}

.scr-cut.island {
  border-radius: 999px;
}

.scr-cut i {
  position: absolute;
  top: 50%;
  aspect-ratio: 1;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #44548c, #0a0c14 62%);
}

/* Rounded inner corners where a notch meets the top of the display */
.scr-ear.l {
  background: radial-gradient(circle calc(1.5 * var(--u)) at 0 100%, transparent 94%, #000 100%);
}

.scr-ear.r {
  background: radial-gradient(circle calc(1.5 * var(--u)) at 100% 100%, transparent 94%, #000 100%);
}

/* Earpiece */
.scr-ear-slit {
  border-radius: 99px;
  background: #24262b;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.ph-front.hot {
  box-shadow: inset 0 0 0 calc(0.9 * var(--u)) var(--brand),
    0 0 0 2px var(--brand), 0 0 44px 8px rgba(254, 242, 0, 0.7);
}

.ph-front.hot .scr-glare {
  background: linear-gradient(
    118deg,
    rgba(254, 242, 0, 0.6),
    rgba(254, 242, 0, 0.14) 42%,
    rgba(254, 242, 0, 0.34)
  );
  animation: bk-blink 1.4s ease-in-out infinite alternate;
}

.scr-cut.hot,
.scr-ear-slit.hot {
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 0 18px 5px rgba(254, 242, 0, 0.85);
}

/* Back glass and camera */

.ph-rear {
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc((var(--t) / -2 - var(--lb)) * var(--u)))
    rotateY(180deg);
  transition: transform 0.95s var(--ease);
}

.ph-rear > div {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.ph-backglass {
  inset: 0;
  border-radius: calc(var(--r) * var(--u));
  background: linear-gradient(155deg, var(--back-a) 0%, var(--back-b) 60%, var(--back-a) 100%);
  box-shadow: inset 0 0 0 calc(0.6 * var(--u)) var(--rim);
  transition: box-shadow 0.5s ease;
}

.ph-backglass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    112deg,
    var(--sheen),
    transparent 34%,
    transparent 68%,
    rgba(0, 0, 0, 0.08)
  );
}

/* Inset glass area below a full-width camera bar */
.ph-panel {
  background: var(--back-a);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--back-a) 84%, #fff),
    color-mix(in srgb, var(--back-b) 92%, #fff)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 0.5px rgba(0, 0, 0, 0.16);
}

.ph-backglass.hot {
  box-shadow: inset 0 0 0 calc(0.9 * var(--u)) var(--brand),
    0 0 0 2px var(--brand), 0 0 44px 8px rgba(254, 242, 0, 0.7);
}

.ph-backglass.hot::after {
  background: rgba(254, 242, 0, 0.3);
  animation: bk-blink 1.4s ease-in-out infinite alternate;
}

.ph-panel,
.ph-bump,
.ph-barrel,
.ph-lens,
.ph-dot {
  transform: translateZ(calc(var(--z) * var(--u)));
  transition: box-shadow 0.4s ease, background 0.4s ease;
}

/* Raised camera area, in the colour of the back */
.ph-bump {
  background: var(--back-a);
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--back-a) 88%, #fff),
    var(--back-b)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset 0 calc(-0.5 * var(--u)) calc(1 * var(--u)) rgba(0, 0, 0, 0.12),
    0 0 0 0.5px rgba(0, 0, 0, 0.24);
}

/* Dark glass pill with a metal ring (X family) */
.ph-bump.black {
  background: linear-gradient(150deg, #23252b, #050506);
  box-shadow: 0 0 0 calc(0.7 * var(--u)) var(--ring-hi),
    0 0 0 calc(0.9 * var(--u)) rgba(0, 0, 0, 0.35);
}

.ph-barrel,
.ph-lens,
.ph-dot {
  border-radius: 50%;
}

.ph-barrel {
  background: var(--ring-lo);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.3);
}

/* Lens: a metal ring, dark glass with coatings, and a small reflection */
.ph-lens {
  background: conic-gradient(
    from 205deg,
    var(--ring-hi),
    var(--ring-lo) 17%,
    var(--ring-hi) 40%,
    var(--ring-lo) 63%,
    var(--ring-hi) 83%,
    var(--ring-lo)
  );
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.45);
}

.ph-lens.in-black {
  background: conic-gradient(from 205deg, #3a3c44, #15161a 25%, #33353c 50%, #121316 75%, #3a3c44);
}

.ph-lens::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #05060a 0 16%,
    #232a52 17% 25%,
    #07080d 26% 44%,
    #1a1d2a 45% 52%,
    #030304 53% 78%,
    #1b1c21 79%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ph-lens::after {
  content: "";
  position: absolute;
  left: 27%;
  top: 22%;
  width: 24%;
  height: 13%;
  border-radius: 50%;
  background: rgba(170, 190, 255, 0.6);
  filter: blur(calc(0.25 * var(--u)));
  transform: rotate(-32deg);
}

.ph-dot.flash {
  background: radial-gradient(
    circle,
    #fffdf2 0 26%,
    #f7e9b6 42%,
    #dccb93 58%,
    #f4ecd4 66%,
    var(--ring-lo) 72% 100%
  );
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25);
}

.ph-dot.mic {
  background: #17181b;
}

.ph-dot.lidar {
  background: radial-gradient(circle at 40% 35%, #30323c, #050506 62%);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.3);
}

.ph-bump.hot {
  box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 0.5px rgba(0, 0, 0, 0.24);
}

.ph-barrel.hot {
  background: var(--brand);
}

.ph-lens.hot {
  box-shadow: 0 0 0 2px var(--brand), 0 0 20px 6px rgba(254, 242, 0, 0.85);
  animation: bk-glow 1.3s ease-in-out infinite alternate;
}

/* Body: floor, walls, buttons, bottom openings */

.ph-floor {
  inset: 0;
  border-radius: calc(var(--r) * var(--u));
  background: radial-gradient(
      circle at 50% 52%,
      transparent 0 20%,
      rgba(255, 255, 255, 0.2) 20.5% 22.5%,
      transparent 23% 25%,
      rgba(255, 255, 255, 0.14) 25.5% 27%,
      transparent 27.5%
    ),
    linear-gradient(160deg, #70737b, #4b4d54);
  transform: translateZ(calc((var(--t) / -2 + 0.35) * var(--u)));
}

/* Antenna lines and the SIM tray, drawn on the metal band */
.ph-ant {
  top: 0;
  height: 100%;
  background: var(--ant);
  opacity: 0.85;
}

.ph-sim {
  border-radius: 99px;
  box-shadow: inset 0 0 0 0.6px rgba(0, 0, 0, 0.34);
}

.ph-sim i {
  position: absolute;
  right: 7%;
  top: 50%;
  width: calc(0.7 * var(--u));
  height: calc(0.7 * var(--u));
  translate: 0 -50%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
}

.ph-btn {
  border-radius: 99px;
  background: linear-gradient(180deg, var(--btn-lo), var(--btn-hi) 28%, var(--btn-hi) 72%, var(--btn-lo));
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.ph-btn.cc {
  background: linear-gradient(180deg, #3d3f45, #5b5d64 50%, #3d3f45);
}

.ph-btn.hot {
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 0 16px 5px rgba(254, 242, 0, 0.9);
  animation: bk-glow 1.3s ease-in-out infinite alternate;
}

.pb-port {
  border-radius: 99px;
  background: #050506;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.pb-holes {
  background: radial-gradient(circle, #050506 52%, transparent 58%) 0 50% /
    calc(2.3 * var(--u)) 100% repeat-x;
}

.pb-screw {
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #d5d8de, #6b6e76 72%);
  box-shadow: 0 0 0 0.4px rgba(0, 0, 0, 0.45);
}

.pb-port.hot {
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 0 14px 4px rgba(254, 242, 0, 0.9);
}

.pb-holes.hot {
  background-image: radial-gradient(circle, var(--brand) 52%, transparent 58%);
  filter: drop-shadow(0 0 4px var(--brand));
}

/* Parts inside the phone */

.ph-inner {
  inset: calc(1.3 * var(--u));
  border-radius: calc((var(--r) - 1.3) * var(--u));
  background: linear-gradient(170deg, #1a1b20, #0f1013);
  transform-style: preserve-3d;
  transform: translateZ(calc((var(--t) / -2 + 0.7) * var(--u)));
}

.pt {
  overflow: hidden;
  border-radius: calc(1.4 * var(--u));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  font-size: calc(2.7 * var(--u));
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateZ(calc(var(--z) * var(--u)));
  transition: transform 0.8s var(--ease), background 0.4s ease,
    box-shadow 0.4s ease, color 0.4s ease;
}

.pt.hot {
  background: linear-gradient(150deg, var(--brand-hi), var(--brand) 55%, var(--brand-lo));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1.5px var(--brand),
    0 0 26px 6px rgba(254, 242, 0, 0.75);
  color: #111;
  transform: translateZ(calc((var(--z) + 8) * var(--u)));
  animation: bk-glow 1.3s ease-in-out infinite alternate;
}

.pt-bat {
  background: linear-gradient(140deg, #383a42, #1e1f24 70%);
}

.pt-bat span {
  position: absolute;
  left: 9%;
  top: 5%;
}

.pt-bat::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 5%;
  height: 9%;
  border-radius: 3px;
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 2px,
    transparent 2px 5px
  );
  opacity: 0.5;
}

.pt-board {
  background: linear-gradient(160deg, #12304a, #0a1622);
}

.pt-board b {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: linear-gradient(145deg, #d3d6dd, #7d8088);
  color: #16171a;
  font-size: calc(2.6 * var(--u));
  letter-spacing: 0;
}

.pt-board .c1 {
  left: 12%;
  top: 6%;
  width: 64%;
  height: 27%;
}

.pt-board .c2 {
  left: 24%;
  top: 39%;
  width: 62%;
  height: 21%;
  background: linear-gradient(145deg, #2f3138, #111215);
  color: #d0d2d8;
}

.pt-board .c3,
.pt-board .c4 {
  top: 67%;
  height: 13%;
  background: linear-gradient(145deg, #3a3c43, #17181b);
  color: #d0d2d8;
}

.pt-board .c3 {
  left: 12%;
  width: 34%;
}

.pt-board .c4 {
  left: 54%;
  width: 32%;
}

.pt-cam {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6%;
  padding: 6%;
  background: linear-gradient(150deg, #30323a, #17181c);
}

.pt-cam i {
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 36%,
    #7d8fd6 0 6%,
    #1c2140 22%,
    #050609 56%,
    #3c3e45 60%,
    #8c8f97 100%
  );
}

.pt-cam.n1 i {
  width: 64%;
}

.pt-face {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  border-radius: 99px;
  background: linear-gradient(150deg, #30323a, #18191d);
}

.pt-face i {
  width: 8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #5a69a8, #0a0c14 65%);
}

.pt-ear {
  border-radius: 99px;
  background: repeating-linear-gradient(90deg, #5a5c64 0 1px, #1b1c20 1px 3px);
}

.pt-spk {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 1px, transparent 1.4px) 0 0 / 5px 5px,
    linear-gradient(150deg, #33353c, #1a1b1f);
}

.pt-spk.hot,
.pt-ear.hot {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 1px, transparent 1.4px) 0 0 / 5px 5px,
    linear-gradient(150deg, var(--brand-hi), var(--brand) 55%, var(--brand-lo));
}

.pt-tap {
  background: linear-gradient(150deg, #3d3f46, #222327);
}

/* Flex cable from the charging port up to the board */
.pt-flex {
  border-radius: calc(0.8 * var(--u));
  background: repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.28) 0 1px,
      transparent 1px 3px
    ),
    linear-gradient(180deg, #b0763a, #8a5526);
  box-shadow: none;
}

.pt-board {
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 6px),
    linear-gradient(160deg, #12304a, #0a1622);
}

.pt-tap::after {
  content: "";
  position: absolute;
  inset: 22% 14%;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.pt-port {
  border-radius: calc(1 * var(--u)) calc(1 * var(--u)) calc(2.4 * var(--u))
    calc(2.4 * var(--u));
  background: linear-gradient(180deg, #34363d, #1b1c20);
}

.pt-port i {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 14%;
  height: 36%;
  border-radius: 99px;
  background: #050506;
  box-shadow: inset 0 0 0 1px #70737b;
}

@keyframes bk-glow {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.2) saturate(1.1);
  }
}

@keyframes bk-blink {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Panel ---------- */

.bk-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: clamp(14px, 2.2vw, 26px);
}

.bk-steps {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-3);
}

.bk-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  border-radius: 999px;
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.bk-steps li span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fill-strong);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.4s ease, color 0.4s ease;
}

.bk-steps li.on {
  background: var(--glass-solid);
  color: var(--text);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.35);
}

.bk-steps li.on span,
.bk-steps li.done span {
  background: var(--brand);
  color: #111;
}

.bk-steps li.done {
  color: var(--text-2);
}

.bk-view {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bk-view[hidden] {
  display: none;
}

.bk-view.pop {
  animation: bk-pop 0.55s var(--ease);
}

@keyframes bk-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.965);
  }
}

.bk-view h3 {
  font-size: 22px;
}

.bk-label {
  margin-bottom: -6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}

.bk-seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--fill);
}

.bk-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2);
}

.bk-seg button.on {
  background: var(--glass-solid);
  color: var(--text);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.35);
}

.bk-seg button:disabled {
  color: var(--text-3);
}

.bk-seg small {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--fill-strong);
  font-size: 11px;
  font-weight: 700;
}

.bk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bk-chip {
  height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, scale 0.3s var(--ease);
}

.bk-chip:hover {
  background: var(--fill-strong);
}

.bk-chip:active {
  scale: 0.96;
}

.bk-chip[aria-pressed="true"],
.bk-chip[aria-checked="true"] {
  background: var(--brand);
  color: #111;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 6px 16px -8px rgba(228, 190, 0, 0.9);
}

.bk-models {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.bk-model {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px 8px 18px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s ease, scale 0.3s var(--ease);
}

.bk-model svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  transition: translate 0.3s var(--ease), color 0.25s ease;
}

.bk-model:hover {
  background: var(--fill-strong);
}

.bk-model:hover svg {
  translate: 3px 0;
  color: var(--text);
}

.bk-model:active {
  scale: 0.98;
}

.bk-change {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.bk-change svg {
  width: 16px;
  height: 16px;
}

.bk-change:hover {
  background: var(--fill-strong);
  color: var(--text);
}

/* Service table */

.bk-table {
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--fill);
}

.bk-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.bk-row:hover {
  background: var(--fill);
}

.bk-row .ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--fill-strong);
  transition: background 0.25s ease, color 0.25s ease;
}

.bk-row .ico svg {
  width: 19px;
  height: 19px;
}

.bk-row b {
  display: block;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.bk-row small {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-3);
}

.bk-row .radio {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--text-3);
  color: transparent;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.bk-row .radio svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

.bk-row[aria-pressed="true"] {
  background: var(--glass-solid);
  box-shadow: 0 4px 14px -8px rgba(0, 0, 0, 0.45);
}

.bk-row[aria-pressed="true"] .ico,
.bk-row[aria-pressed="true"] .radio {
  background: var(--brand);
  color: #111;
  box-shadow: none;
}

/* Estimate card */

.bk-quote {
  display: grid;
  gap: 4px;
  padding: 18px 20px 20px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--brand) 16%, var(--glass-solid));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-lo) 55%, transparent);
}

.bk-quote[hidden] {
  display: none;
}

.bk-quote.pop {
  animation: bk-pop 0.5s var(--ease);
}

.bk-quote small {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.bk-price {
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.bk-price.ask {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.bk-quote p {
  font-size: 14px;
  color: var(--text-2);
}

.bk-sample {
  justify-self: start;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--fill-strong);
  font-size: 12.5px;
  font-weight: 600;
}

.bk-sample[hidden] {
  display: none;
}

.bk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.bk-actions .btn {
  flex: 1 1 140px;
}

.bk-ghost {
  background: var(--fill);
  color: var(--text);
}

.bk-ghost:hover {
  background: var(--fill-strong);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: saturate(0.6);
}

/* Appointment */

.bk-summary {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--fill);
  font-size: 14.5px;
  color: var(--text-2);
}

.bk-summary b {
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}

.bk-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}

.bk-day {
  display: grid;
  gap: 1px;
  height: auto;
  padding: 9px 4px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  text-align: center;
  line-height: 1.2;
}

.bk-day span {
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.7;
}

.bk-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
}

.bk-slots .bk-chip {
  padding: 0;
}

.bk-note {
  font-size: 13.5px;
  color: var(--text-3);
}

.bk-done {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--brand) 16%, var(--glass-solid));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-lo) 55%, transparent);
  font-size: 14.5px;
  color: var(--text-2);
}

.bk-done[hidden] {
  display: none;
}

.bk-done b {
  font-size: 16px;
  color: var(--text);
}

.bk-done a {
  justify-self: start;
  margin-top: 4px;
  font-weight: 650;
  color: var(--text);
  border-bottom: 1px solid currentColor;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .booking {
    /* Height of the pinned stage: smaller on short screens, so the list
       below it stays visible */
    --bk-sh: clamp(210px, 42vh, 318px);
    grid-template-columns: 1fr;
  }

  .bk-stage {
    --u: calc(var(--bk-sh) / 205);
    top: 78px;
    z-index: 3;
    height: var(--bk-sh);
    /* Solid, so the list scrolling underneath does not show through */
    background: var(--glass-solid);
    box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.5),
      inset 0 0 0 1px var(--hairline);
    perspective: 1100px;
  }

  /* Compact service grid: the whole list fits under the pinned phone */
  .bk-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bk-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px 6px;
  }

  .bk-row b {
    white-space: nowrap;
  }

  .bk-row:last-child {
    grid-column: 1 / -1;
  }

  .bk-row .ico {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .bk-row b {
    font-size: 14px;
  }

  .bk-row small,
  .bk-row .radio {
    display: none;
  }

  .bk-row:last-child small {
    display: block;
  }

  /* The stage stays pinned above the panel, so steps scroll to just below it */
  .bk-panel {
    scroll-margin-top: calc(var(--bk-sh) - 14px);
  }

  /* One tag is enough on a small stage: the part and its price */
  .bk-caption:has(.part:not([hidden])) #bk-model-tag {
    display: none;
  }

  .bk-hint span {
    display: none;
  }

  .bk-hint {
    padding: 8px;
  }

  .bk-tag {
    padding: 5px 10px;
    font-size: 12.5px;
  }
}

/* Very short screens (a phone held sideways): let the stage scroll away
   instead of covering the steps */
@media (max-width: 860px) and (max-height: 480px) {
  .bk-stage {
    position: relative;
    top: auto;
  }

  .bk-panel {
    scroll-margin-top: 0px;
  }
}

@media (min-width: 861px) and (max-height: 600px) {
  .bk-stage {
    position: relative;
    top: auto;
  }
}

@media (max-width: 480px) {
  .bk-models {
    grid-template-columns: 1fr;
  }

  .bk-steps {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-sway,
  .ph.swap,
  .bk-view.pop,
  .bk-quote.pop,
  .pt.hot,
  .ph-btn.hot,
  .ph-lens.hot,
  .bk-tag.part::before,
  .ph-front.hot .scr-glare,
  .ph-backglass.hot::after {
    animation: none;
  }

  .ph-orbit,
  .ph-front,
  .ph-rear,
  .pt {
    transition-duration: 0.01s;
  }
}
