@scope (htmlpress-shortcuts) {
  /* Only the script runs a row's key, and a phone has no keyboard to press them on */
  :root:not([data-scripted]) :scope {
    display: none;
  }
  :scope {
    position: relative;
    display: block;
  }
  details {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  summary {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border-radius: 999px;
    color: var(--htmlpress-muted);
    cursor: pointer;
    list-style: none;
  }
  summary::-webkit-details-marker {
    display: none;
  }
  summary:hover,
  details[open] > summary {
    margin: 0;
    background: var(--htmlpress-surface);
  }
  svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  summary + div {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 30;
    min-width: 13rem;
    padding: 0.25rem;
    border: 1px solid var(--htmlpress-border);
    border-radius: 0.75rem;
    background: var(--htmlpress-bg);
    box-shadow: 0 8px 24px color-mix(in oklab, var(--htmlpress-text) 12%, transparent);
  }
  p {
    margin: 0;
    padding: 0.375rem 0.625rem;
    color: var(--htmlpress-muted);
    font-size: 0.75rem;
    font-weight: 500;
  }
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  li,
  li + li {
    margin: 0;
    padding: 0;
  }
  button {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.375rem 0.625rem;
    border: 0;
    border-radius: 0.5rem;
    background: none;
    color: var(--htmlpress-text);
    font: 400 0.875rem/1.25rem var(--htmlpress-font);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
  }
  button:hover:enabled {
    background: var(--htmlpress-surface);
  }
  button:disabled {
    opacity: 0.5;
    cursor: default;
  }
  span {
    flex: 1;
  }
  kbd {
    min-width: 1.25rem;
    padding: 0.125rem 0.25rem;
    border: 0;
    border-radius: 0.25rem;
    box-shadow: none;
    background: var(--htmlpress-surface);
    color: var(--htmlpress-muted);
    font: 500 0.75rem/1rem var(--htmlpress-font);
    text-align: center;
  }

  @media (max-width: 56rem) {
    :scope {
      display: none;
    }
  }
}
