.archive-command,
.archive-flyout,
.archive-actions {
  border: 1px solid var(--hud-border, #768470);
  background: var(--hud, #1c302b);
  color: var(--ink);
  box-shadow: var(--hud-shadow, 0 0 0 1px #12241f, 2px 3px 0 #10211ed9);
}
.archive-command {
  width: max-content;
  min-width: min(238px, 100%);
  max-width: 100%;
}
archive-navigation {
  position: relative;
  --ink: #fff1d3;
  --accent: #f5ce76;
}
archive-navigation .brand {
  display: block;
  text-decoration: none;
}
archive-navigation .archive-flyout {
  display: block;
  position: absolute;
  z-index: 1;
  top: calc(100% + 8px);
  left: -1px;
  max-width: calc(100vw - 36px);
  max-height: 65dvh;
  padding-block: 5px;
}
archive-navigation .archive-flyout[hidden] {
  display: none;
}
archive-navigation[section='map'] .archive-flyout {
  padding-block: 13px;
}
.command-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 9px 9px 12px;
}
.command-brand .brand {
  width: auto;
  min-width: 0;
  position: relative;
  padding-inline-start: 34px;
}
.command-brand .brand::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  width: 33px;
  height: 33px;
  transform: translateY(-50%);
  background: url('/brand/archive-mark.svg') center / contain no-repeat;
}
.command-brand .brand > span {
  display: block;
  margin: 0 0 4px 1px;
  color: var(--second, #a5d9bc);
  font:
    700 8px/1.15 ui-monospace,
    Menlo,
    monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.command-brand .brand img {
  display: block;
  width: auto;
  height: 24px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  image-rendering: pixelated;
}
.archive-menu-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #dedfc7;
  cursor: pointer;
}
.archive-menu-toggle:is(:hover, [aria-expanded='true']),
details[open] > .archive-menu-toggle {
  border-color: #65735e;
  background: #344c3f;
  color: #ffe297;
}
.menu-glyph {
  display: block;
  width: 15px;
  height: 2px;
  background: currentColor;
  box-shadow:
    0 -5px currentColor,
    0 5px currentColor;
}
.archive-flyout {
  width: 258px;
  overflow: auto;
  padding: 13px 14px;
  margin: 0;
}
.menu-archive {
  display: grid;
  gap: 3px;
}
.menu-archive a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 5px 0;
  color: var(--ink);
  font:
    600 13px DM,
    'DM Sans',
    sans-serif;
  text-decoration: none;
}
.menu-archive a + a {
  border-top: 1px solid #485e50;
}
.menu-archive a:hover,
.menu-archive a span {
  color: var(--accent, #f7cf69);
}
.archive-actions {
  position: fixed;
  z-index: 5;
  bottom: calc(max(10px, env(safe-area-inset-bottom)) + 14px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 44% 56%;
  box-sizing: border-box;
  width: min(240px, calc(100vw - 18px));
  align-items: stretch;
  gap: 0;
  padding: 3px;
}
.archive-actions .index-button,
.archive-actions .add-button {
  display: grid;
  place-items: center;
  min-height: 37px;
  margin: 0;
  padding: 7px 14px;
  font:
    600 13px/1 DM,
    sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.archive-actions .index-button {
  border: 0;
  background: transparent;
  color: var(--ink);
}
.archive-actions .index-button:hover {
  background: var(--panel-hi, #324a41);
}
.archive-actions .add-button {
  border: 1px solid #19291d;
  background: #f4c961;
  color: #252e23;
  box-shadow:
    inset 0 2px #ffe39a,
    inset 0 -2px #c29845;
}
.archive-actions .add-button:hover {
  filter: brightness(1.08);
}
@media (max-width: 740px) {
  .archive-command {
    min-width: min(169px, 100%);
  }
  .command-brand {
    gap: 3px;
    padding: 5px 4px 5px 8px;
  }
  .command-brand .brand img {
    height: clamp(17px, 4.6vw, 20px);
  }
  .command-brand .brand > span {
    margin-bottom: 3px;
    font-size: 7px;
  }
  .archive-actions {
    width: min(216px, calc(100vw - 18px));
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + 16px);
    padding: 2px;
  }
  .archive-actions .index-button,
  .archive-actions .add-button {
    padding: 8px 10px;
    min-height: 44px;
    font-size: 12px;
  }
}
