.screen-key {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: clamp(.8rem, 1.3vw, 1.35rem);
  margin: .75rem 0 0;
  background: #f0f4f5;
  color: #203138;
  border-radius: .55rem;
  text-align: start;
  line-height: 1.5;
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}
.screen-key .screen-key-heading {
  color: #25464d;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 700;
  margin: 0 0 .45rem;
}
.screen-key dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: .6rem 1.4rem;
  margin: 0;
}
.screen-key dl > div { min-width: 0; }
.screen-key dt { color: #3c555e; font-size: .95rem; font-weight: 600; }
.screen-key dd { color: #172b33; font-size: 1rem; margin: .1rem 0 0; }
.screen-key details { margin-top: .55rem; }
.screen-key summary { cursor: pointer; color: #215565; font-size: 1rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.screen-key details[open] dl { margin-top: .5rem; }
.screen-key .screen-key-panel a { display: block; background: transparent; margin-top: .6rem; }
.screen-key .screen-key-panel img { width: auto; max-width: 100%; max-height: 55dvh; height: auto; margin: 0; object-fit: contain; }
.screen-key-viewer {
  box-sizing: border-box;
  width: fit-content;
  max-width: min(92rem, 96vw);
  max-height: 93dvh;
  overflow: auto;
  padding: 1rem;
  border: 0;
  border-radius: .6rem;
  background: white;
  color: #172b33;
}
.screen-key-viewer::backdrop { background: rgb(11 18 22 / .8); }
.screen-key-viewer form { margin: 0 0 .5rem; text-align: right; }
.screen-key-viewer button { padding: .45rem .9rem; cursor: pointer; }
.screen-key-viewer img { display: block; max-width: 100%; max-height: 72dvh; margin: auto; object-fit: contain; }
.screen-key-viewer .screen-file { display: inline-block; margin-top: .5rem; color: #215565; text-decoration: underline; }
dialog:has(> .screen-key) { overflow-y: auto; }
dialog .screen-key { max-width: 82rem; margin-inline: auto; }
@media (max-width: 600px) {
  .screen-key-viewer { max-width: 96vw; padding: .7rem; }
}
