/* veryimportantmeeting.com shared game menu (2026-10-01), see menu.js.
   Deliberately thin: buttons use each game's own button class, so the menu wears the game's look.
   Games tune it with these variables on the menu root (or any ancestor):
     --vm-gap      space between items (default .5rem)
     --vm-accent   slider and highlight colour (default currentColor)
     --vm-muted    secondary text colour (default inherit at 75% opacity)
     --vm-danger   delete/replace colour (default #d9534f)
     --vm-width    max width of the menu column (default 22rem) */
.vm-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: var(--vm-width, 22rem);
  margin-inline: auto;
}
.vm-list,
.vm-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--vm-gap, 0.5rem);
}
.vm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
}
.vm-item .vm-sub {
  display: block;
  font-size: 0.72em;
  line-height: 1.25;
  margin-top: 0.15em;
  opacity: 0.8;
  font-weight: normal;
  letter-spacing: normal;
  text-transform: none;
}
.vm-item[disabled],
.vm-item[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
.vm-h {
  margin: 0 0 0.25rem;
  text-align: center;
  font-size: 1.25em;
}
.vm-note {
  margin: 0;
  text-align: center;
  font-size: 0.85em;
  color: var(--vm-muted, inherit);
  opacity: 0.85;
}
.vm-note a { color: inherit; }
.vm-back { margin-top: 0.35rem; }

/* Save slots */
.vm-slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--vm-gap, 0.5rem);
}
.vm-slot {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.vm-slot > .vm-slot-btn { flex: 1 1 12rem; width: auto; align-items: flex-start; text-align: left; }
.vm-slot > .vm-note { flex: 1 1 100%; text-align: left; }
.vm-slot .vm-slotnum { opacity: 0.7; margin-right: 0.35em; }
.vm-slot.is-active .vm-slotnum::after { content: " (last played)"; font-size: 0.8em; }
.vm-row { display: flex; gap: 0.4rem; flex: 1 1 100%; }
.vm-row > * { flex: 1 1 0; }
.vm-del {
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.8em;
  padding: 0 0.75em;
  min-height: 2.75rem;
  border-radius: 0.35em;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--vm-danger, #d9534f);
  cursor: pointer;
  opacity: 0.85;
}
.vm-del:hover, .vm-del:focus-visible { opacity: 1; }
.vm-danger { color: var(--vm-danger, #d9534f) !important; }

/* Volume sliders */
.vm-slider {
  display: grid;
  grid-template-columns: 5.5em 1fr 3.2em;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
}
.vm-slider label { text-align: left; }
.vm-slider output { text-align: right; font-variant-numeric: tabular-nums; }
.vm-slider input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 1.75rem;
  margin: 0;
  accent-color: var(--vm-accent, currentColor);
  cursor: pointer;
  background: transparent;
}

/* Credits */
.vm-credits .vm-maker { margin: 0.25rem 0 0; text-align: center; font-size: 1.35em; font-weight: bold; }
.vm-credits .vm-role { margin: 0 0 0.5rem; text-align: center; opacity: 0.85; letter-spacing: 0.04em; }

.vm-credlist {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0.45rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(28vh, 13rem);
  overflow-y: auto;
  border-top: 1px solid rgba(127, 127, 127, 0.3);
  border-bottom: 1px solid rgba(127, 127, 127, 0.3);
  text-align: inherit;
  line-height: 1.25;
}
.vm-credlist li { display: flex; flex-direction: column; }
.vm-cred-who { font-weight: bold; }
.vm-cred-who a { color: inherit; text-underline-offset: 3px; }
.vm-cred-what { font-size: 0.78em; opacity: 0.85; }
.vm-cred-what b { font-weight: normal; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.9em; opacity: 0.8; }
@media (max-height: 520px) {
  .vm-credits .vm-maker { margin-top: 0; font-size: 1.15em; }
  .vm-credits .vm-role { margin-bottom: 0.2rem; }
  .vm-credlist { max-height: 24vh; }
}

@media (max-width: 420px) {
  .vm-slider { grid-template-columns: 4.5em 1fr 2.8em; gap: 0.4rem; }
}

/* Mistfall Studios logo at the top of the Credits panel (drawn by /assets/mistfall/mistfall.js) */
.vm-credits .vm-logo { background: #000; border-radius: 6px; padding: 5px 4px 2px; margin: 0.2rem auto 0.5rem; width: 100%; max-width: 360px; box-sizing: border-box; align-self: center; }
.vm-credits .vm-logo canvas { display: block; width: 100%; height: auto; image-rendering: crisp-edges; image-rendering: pixelated; }
@media (max-height: 520px) { .vm-credits .vm-logo { max-width: 220px; margin-bottom: 0.3rem; } }
