html.hq-menu-demo-open, html.hq-menu-demo-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

.hq-menu-demo {
  --top-gap: max(54px, env(safe-area-inset-top));
  --bottom-gap: max(36px, env(safe-area-inset-bottom));
  --menu-scale: .8;
  --room: calc(100vh - var(--top-gap) - var(--bottom-gap));
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  max-width: none;
  max-height: none;
  padding: var(--top-gap) 0 var(--bottom-gap);
  margin: 0;
  border: 0;
  background: transparent;
  color: white;
  overscroll-behavior: contain;
  overflow: hidden;
}
.hq-menu-demo[open] { display: grid; place-items: center; }
.hq-menu-demo::backdrop {
  background: rgb(9 8 10 / 61%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
@supports (height: 100dvh) {
  .hq-menu-demo { height: 100dvh; --room: calc(100dvh - var(--top-gap) - var(--bottom-gap)); }
}
.hq-menu-demo-stage {
  position: relative;
  width: min(402px, calc(var(--room) * .505), calc(100vw - 154px));
  aspect-ratio: 378 / 748;
}
.hq-menu-demo-phone {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 1px solid #b8a69d;
  border-radius: 15% / 7.6%;
  background: linear-gradient(126deg, #524641, #dfc2b2 6%, #4c4140 15%, #9b8172 36%, #443b36 57%, #d4b6a3 77%, #49403c 90%, #a99284);
  box-shadow: inset 0 0 0 1px #463d38, inset 0 0 0 2.5px #c8b3a8,
    0 1px 2px 2px #161311, 0 14px 36px -7px #000c;
}
.hq-menu-demo-phone::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #161516;
  border-radius: inherit;
  background: #030303;
}
.hq-menu-demo-phone::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 18%;
  width: 2px;
  height: 3.8%;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(90deg, #61534d, #b6a395, #3f3431);
  box-shadow: 0 38px 0 #796c64, 0 74px 0 #796c64;
}
.hq-menu-demo-glass {
  direction: ltr;
  position: absolute;
  inset: 9px;
  box-sizing: border-box;
  padding-top: clamp(18px, 2.7vh, 25px);
  border-radius: 13% / 6.8%;
  overflow: hidden;
  background: #141518;
  isolation: isolate;
}
.hq-menu-demo-glass::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: clamp(18px, 2.7vh, 25px);
  border-radius: 0 0 15px 15px;
  background: radial-gradient(circle at 84% 47%, #243a52 0 1px, #0a0c11 2px, #020202 4px);
  pointer-events: none;
}
.hq-menu-demo-glass iframe {
  display: block;
  box-sizing: border-box;
  width: calc(100% / var(--menu-scale));
  height: calc(100% / var(--menu-scale));
  transform: scale(var(--menu-scale));
  transform-origin: top left;
  border: 0;
  background: #141518;
}
.hq-menu-demo-close {
  position: absolute;
  top: 11px;
  left: calc(100% + 25px);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1.5px solid #c6c2c0;
  border-radius: 50%;
  background: rgb(22 22 24 / 86%);
  box-shadow: 0 2px 8px #0006;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.hq-menu-demo-close:hover { background: #343436; border-color: white; }
.hq-menu-demo-close:focus-visible { outline: 2px solid white; outline-offset: 4px; }
.hq-menu-demo-close svg { width: 23px; height: 23px; }
.hq-menu-demo-scroll-hint { display: none; }
@media(min-width: 561px) and (hover:hover) and (pointer:fine) {
  .hq-menu-demo-scroll-hint { display: block; position:absolute; top:100%; left:50%; transform:translateX(-50%); margin:8px 0 0; padding:3px 10px; color:#e7e1e2; background:#171517d9; border:1px solid #4c4447; border-radius:16px; font:500 12px/1.3 Inter,"Segoe UI",Arial,sans-serif; white-space:nowrap; pointer-events:none; }
}

@media (max-width: 560px) {
  .hq-menu-demo {
    --menu-scale: 1;
    --top-gap: calc(59px + env(safe-area-inset-top));
    --bottom-gap: max(12px, env(safe-area-inset-bottom));
  }
  .hq-menu-demo-stage {
    width: min(385px, calc(100vw - 24px), max(282px, calc(var(--room) * .505)));
    height: min(762px, var(--room), calc((100vw - 24px) * 1.98));
    aspect-ratio: auto;
  }
  .hq-menu-demo-close { top: -52px; right: 1px; left: auto; width: 44px; height: 44px; }
  .hq-menu-demo-glass { inset: 7px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .hq-menu-demo {
    --menu-scale: 1;
    --top-gap: max(8px, env(safe-area-inset-top));
    --bottom-gap: max(8px, env(safe-area-inset-bottom));
  }
  .hq-menu-demo-stage {
    width: min(346px, calc(100vw - 130px));
    height: var(--room);
    aspect-ratio: auto;
  }
  .hq-menu-demo-phone, .hq-menu-demo-glass { border-radius: 36px; }
  .hq-menu-demo-close { top: 8px; left: calc(100% + 14px); right: auto; width: 44px; height: 44px; }
}

/* The pricing-page demo uses the same phone, with a compact theme browser. */
.hq-menu-demo--themes { --top-gap: calc(154px + env(safe-area-inset-top)); --bottom-gap: max(34px,env(safe-area-inset-bottom)); }
.hq-menu-demo-picker { position:absolute; inset-block-start:calc(10px + env(safe-area-inset-top)); inset-inline:0; margin-inline:auto; box-sizing:border-box; width:min(760px,calc(100% - 24px)); padding:8px 11px 10px; border:1px solid #4a4145; border-radius:15px; background:#171517f5; box-shadow:0 8px 28px #0008; color:#f5f2f2; font:500 13px/1.3 Inter,"Segoe UI",Arial,sans-serif; }
.hq-menu-demo-picker-head { display:flex; align-items:center; gap:10px; min-width:0; margin-block-end:6px; }
.hq-menu-demo-picker-head strong { font-size:15px; font-weight:700; }
.hq-menu-demo-picker-head > span { color:#b9afb4; font-size:12px; white-space:nowrap; }
.hq-menu-demo-picker .hq-menu-demo-close { position:static; flex:none; margin-inline-start:auto; width:30px; height:30px; border:1px solid #6a5e65; }
.hq-menu-demo-picker .hq-menu-demo-close svg { width:17px;height:17px; }
.hq-menu-demo-groups,.hq-menu-demo-themes { display:flex; align-items:stretch; gap:6px; min-width:0; }
.hq-menu-demo-groups { overflow-x:auto; scrollbar-width:none; padding-block:2px 5px; }
.hq-menu-demo-groups::-webkit-scrollbar { display:none; }
.hq-menu-demo-picker button:not(.hq-menu-demo-close) { display:flex; align-items:center; justify-content:center; gap:6px; min-height:34px; padding:5px 10px; border:1px solid #463d42; border-radius:8px; background:#262226; color:#e8e3e6; font:inherit; cursor:pointer; touch-action:manipulation; }
.hq-menu-demo-groups button { flex:1 0 auto; white-space:nowrap; }
.hq-menu-demo-groups .icon { font-size:15px; color:#b9afb4; }
.hq-menu-demo-themes button { flex:1 1 0; min-width:0; text-align:start; }
.hq-menu-demo-themes button > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hq-menu-demo-picker button[hidden] { display:none; }
.hq-menu-demo-picker button:not(.hq-menu-demo-close)[aria-pressed=true] { background:#351c22; border-color:#e73951; color:#fff; }
.hq-menu-demo-code { padding:3px 5px; border-radius:4px; background:#ffffff15; color:#ffadb9; font-weight:750; flex:none; font-size:11px; }
.hq-menu-demo-picker button:focus-visible { outline:2px solid #ffacb6; outline-offset:1px; }
@media (max-width:560px){.hq-menu-demo--themes { --top-gap:calc(162px + env(safe-area-inset-top));--bottom-gap:max(12px,env(safe-area-inset-bottom)); }.hq-menu-demo-picker{width:calc(100% - 16px);padding-inline:8px}.hq-menu-demo-picker button:not(.hq-menu-demo-close){font-size:12px;padding-inline:7px}.hq-menu-demo-themes button{justify-content:flex-start;gap:4px;min-height:42px}.hq-menu-demo-themes button > span:last-child{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;line-height:1.15}.hq-menu-demo-picker-head strong{font-size:14px}}
@media (max-height:480px) and (orientation:landscape){.hq-menu-demo--themes[open]{display:block;overflow-y:auto;padding:8px 0 24px}.hq-menu-demo--themes .hq-menu-demo-picker{position:relative;inset-block-start:auto}.hq-menu-demo--themes .hq-menu-demo-stage{margin:12px auto 0;width:282px;height:558px;aspect-ratio:378/748}}
