.scene-library-anchor { position: relative; }
.scene-library__toggle {
  display: inline-flex;
  width: auto;
  min-width: 40px;
  padding-inline: 9px;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}
.scene-library__toggle svg { width: 20px; height: 20px; }
.scene-library__toggle[aria-expanded="true"] { background: #faf4dd29; }
.scene-library__panel {
  position: absolute;
  z-index: 1;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  display: grid;
  gap: 12px;
  width: min(340px, calc(100vw - 20px));
  max-height: calc(100dvh - 80px - env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border-radius: 13px;
  background: #303d33f5;
  box-shadow: 0 8px 24px #17261850;
  color: #fff9eb;
  font-size: 14px;
}
.scene-library__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scene-library__toolbar h2 { font-size: 16px; }
.scene-library__dismiss {
  width: 32px;
  min-height: 32px;
  border-radius: 8px;
  font-size: 23px;
  line-height: 1;
}
.scene-library__dismiss:hover { background: #faf4dd29; }
.scene-library__group, .scene-library__field, .scene-library__confirmation { display: grid; gap: 7px; }
.scene-library__field span { font-weight: 650; }
.scene-library__field input, .scene-library__field select, .scene-library__game-fields :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding-inline: 9px;
  border: 1px solid #fffbe333;
  border-radius: 7px;
  background: #243228;
  color: #fff9eb;
  color-scheme: dark;
}
.scene-library__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.scene-library__actions :is(button, a), .scene-library__accent {
  min-height: 35px;
  padding: 4px 10px;
  border-radius: 7px;
  background: #fffbe325;
  color: inherit;
  font-weight: 700;
}
.scene-library__actions button:hover:not(:disabled) { background: #fffbe340; }
.scene-library__actions .scene-library__accent, .scene-library__accent { background: #c5aa72; color: #181e15; }
.scene-library__actions .scene-library__accent:hover:not(:disabled), .scene-library__accent:hover:not(:disabled) {
  background: #e1c58b;
}
.scene-library__actions .scene-library__delete { color: #ffd6ce; }
.scene-library__actions .scene-library__confirm-delete { background: #a63c36; color: #fff7f3; }
.scene-library__actions .scene-library__confirm-delete:hover:not(:disabled) { background: #b7473e; }
.scene-library__panel :focus-visible, .scene-library__toggle:focus-visible { outline-color: #ffe4a6; }
.scene-library__confirmation { padding: 7px 9px; background: #222d24; border-radius: 7px; }
.scene-library__confirmation p, .scene-library__status { overflow-wrap: anywhere; }
.scene-library__status { font-size: 13px; color: #f4e6c7; }
.scene-library__status:empty { display: none; }
:is(.scene-library__game-maps, .scene-library__flat-maps) > summary { cursor: pointer; padding-block: 6px; font-weight: 700; }
.scene-library__game-fields { padding-block-start: 4px; }
.scene-library__game-actions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.scene-library__game-actions a:hover { background: #fffbe340; }
.scene-library__game-actions [hidden] { display: none; }

@media (max-width: 720px) {
  .scene-library__toggle { min-width: 34px; padding-inline: 5px; }
  .scene-library__toggle span { display: none; }
}
