/* Week 06 sketches: the mechanics every menu sketch shares, so each file only carries its look.
   .stage is the whole picture (menu and the room its submenu needs), --w by --h, centred in the
   window and shrunk as one picture when the window is smaller, so the small preview shows the
   real layout. Inside: [role=menu] holds [role=menuitem]s; a .has-sub wraps an item and its
   .submenu, which shows while the .has-sub is .is-open. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; text-align: inherit; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
kbd { font: inherit; }

:root { --w: 520px; --h: 420px; --fit: 1; }
.stage { position: absolute; left: 50%; top: 50%; width: var(--w); height: var(--h);
  transform: translate(-50%, -50%) scale(var(--fit)); transform-origin: 50% 50%; }

.has-sub { position: relative; }
.submenu { visibility: hidden; pointer-events: none; }
.has-sub.is-open > .submenu { visibility: visible; pointer-events: auto; }
/* nothing inside a closed submenu shows, even a part a sketch makes visible (a tick) */
.has-sub:not(.is-open) > .submenu * { visibility: hidden !important; }
[aria-disabled="true"] { cursor: default; }

.back-pill { position: fixed; left: 12px; bottom: 12px; z-index: 9; font: 12px/1 system-ui, sans-serif; color: #fff; background: rgba(20, 20, 20, .72); padding: 8px 12px; border-radius: 999px; text-decoration: none; }
