.elf-hotkeys {
  --elf-ink: #f3edf8;
  --elf-muted: #d4c7dc;
  --elf-gold: #f2d092;
  --elf-line: #5b4268;
  --elf-surface: #21182c;
  color: var(--elf-ink);
  font-size: .94rem;
  line-height: 1.55;
}

.elf-hotkeys [hidden] { display: none !important; }

.elf-hotkeys-intro {
  border: 1px solid var(--elf-line);
  border-left: 3px solid #c99b5c;
  border-radius: .65rem;
  background: linear-gradient(120deg, #32203c, var(--elf-surface) 75%);
  padding: .9rem 1rem;
}

.elf-hotkeys :is(.elf-hotkeys-intro p, .elf-hotkeys-intro ol) { margin: .35rem 0; }
.elf-hotkeys-intro ol { padding-inline-start: 1.35rem; }
.elf-hotkeys-intro li + li { margin-top: .25rem; }
.elf-hotkeys a { color: var(--elf-gold); }
.elf-hotkeys :is(a, button, select, input):focus-visible {
  outline: 2px solid var(--elf-gold);
  outline-offset: 3px;
}

.elf-hotkeys-vocations {
  min-inline-size: 0;
  margin: 1.25rem 0 0;
  padding: .65rem .75rem .5rem;
  border: 1px solid var(--elf-line);
  border-radius: .6rem;
  background: var(--elf-surface);
}
.elf-hotkeys-vocations legend { padding-inline: .25rem; color: var(--elf-gold); font-weight: 700; }
.elf-hotkeys-vocations > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.elf-hotkeys-vocations button {
  min-height: 2.35rem;
  border: 1px solid var(--elf-line);
  border-radius: .4rem;
  padding: .25rem .7rem;
  background: #181020;
  color: var(--elf-ink);
  cursor: pointer;
  font: inherit;
}
.elf-hotkeys-vocations button:hover { background: #3d2b4b; }
.elf-hotkeys-vocations button[aria-pressed="true"] {
  background: var(--elf-gold);
  border-color: var(--elf-gold);
  color: #261728;
  font-weight: 700;
}
.elf-hotkeys-vocations p { color: var(--elf-muted); font-size: .84rem; margin: .55rem 0 .1rem; }

.elf-hotkeys-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: .5rem .85rem;
  margin-top: 1.25rem;
}

.elf-hotkeys-controls label { display: block; margin-bottom: .3rem; font-weight: 700; }
.elf-hotkeys-controls :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid var(--elf-line);
  border-radius: .4rem;
  background: #191221;
  color: var(--elf-ink);
  padding: .45rem .75rem;
  color-scheme: dark;
  font: inherit;
}
.elf-hotkeys-controls input::placeholder { color: #baacc3; }
.elf-hotkeys-count {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.4rem;
  color: var(--elf-muted);
  font-size: .82rem;
}

.elf-hotkeys-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0 1.35rem;
}
.elf-hotkeys-jumps a {
  padding: .3rem .6rem;
  border: 1px solid var(--elf-line);
  border-radius: .4rem;
  background: var(--elf-surface);
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
}
.elf-hotkeys-jumps a:hover { background: #3d2b4b; }
.elf-hotkeys-group { margin-block: 1.45rem; scroll-margin-top: 4rem; }
.elf-hotkeys-group h2 {
  margin: 0 0 .65rem;
  border-bottom: 1px solid var(--elf-line);
  padding-bottom: .35rem;
  color: var(--elf-gold);
  font-size: 1.25rem;
}
.elf-hotkeys-grid { display: grid; gap: .6rem; }
.elf-hotkey {
  min-width: 0;
  border: 1px solid var(--elf-line);
  border-radius: .6rem;
  background: var(--elf-surface);
  padding: .8rem .9rem;
}
.elf-hotkey-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .15rem .5rem; }
.elf-hotkey .elf-hotkey-vocation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  list-style: none;
  margin: 0 0 .25rem;
  padding: 0;
}
.elf-hotkey-vocation-tags li {
  border: 1px solid #755a7f;
  border-radius: .3rem;
  color: #efd29d;
  font-size: .75rem;
  padding: .02rem .4rem;
}
.elf-hotkey h3 { margin: 0 0 .2rem; color: var(--elf-ink); font-size: 1rem; }
.elf-hotkey p { margin: 0 0 .4rem; color: var(--elf-muted); }
.elf-hotkey :is(code, pre) {
  font-family: Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}
.elf-hotkey-syntax {
  display: block;
  color: #efd29d;
  font-size: .82rem;
  white-space: pre-wrap;
}
.elf-hotkey-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .55rem;
  margin-top: .5rem;
  padding: .55rem;
  border-radius: .4rem;
  background: #15101c;
}
.elf-hotkey-example pre {
  align-self: center;
  margin: 0;
  color: #f3eaf6;
  white-space: pre-wrap;
  font-size: .82rem;
}
.elf-hotkey-example button {
  min-height: 2.2rem;
  border: 1px solid #b6935d;
  border-radius: .35rem;
  background: #f0cb87;
  color: #221725;
  padding: .3rem .65rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.elf-hotkey-example button:hover { background: #ffdda2; }
.elf-hotkeys-empty { padding: .75rem; border: 1px solid var(--elf-line); }

.elf-hotkeys-feedback {
  position: fixed;
  z-index: 30;
  inset: auto 1rem 1rem auto;
  margin: 0;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: .6rem .75rem;
  border: 1px solid var(--elf-line);
  border-radius: .4rem;
  background: #2d2038;
  color: var(--elf-ink);
}

@media (max-width: 540px) {
  .elf-hotkeys-controls { grid-template-columns: minmax(0, 1fr); }
  .elf-hotkey-example { grid-template-columns: minmax(0, 1fr); }
  .elf-hotkey-example button { justify-self: start; }
}
