@font-face {
  font-family: AlperHeader;
  src: url("dm.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

/* Each screen controls when its own header is visible. */
.alper-bar.alper-bar {
  box-sizing: border-box;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  min-height: 62px;
  padding: 8px clamp(10px, 2vw, 30px);
  background: #103762;
  color: white;
  font: 500 16px/1.25 AlperHeader, "Segoe UI", sans-serif;
}
.alper-bar .alper-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.alper-bar .alper-mark img {
  width: 42px;
  height: 38px;
  flex: none;
  object-fit: contain;
}
.alper-bar .alper-mark strong {
  color: white;
  font: 700 clamp(1rem, 2vw, 1.55rem)/1.12 AlperHeader, "Segoe UI", sans-serif;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.alper-bar .alper-mark .alper-view {
  display: inline;
  margin: 0 0 0 4px;
  padding-left: 14px;
  border-left: 1px solid #91a9c3;
  color: white;
  font: inherit;
  white-space: nowrap;
}
.mast.alper-bar #setup { margin-left: auto; }
.alper-bar .alper-account {
  position: relative;
  display: block;
  margin-left: auto;
  padding: 0;
}
.alper-account summary {
  max-width: min(36vw, 320px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #98b2ce;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
}
.alper-account summary::after { content: " ▾"; }
.alper-account summary::-webkit-details-marker { display: none; }
.alper-account .alper-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 160px;
  padding: 6px;
  background: white;
  border: 1px solid #bdd2e4;
  border-radius: 10px;
  box-shadow: 0 5px 18px #032c562f;
}
.alper-menu .study-logout { width: 100%; }
.alper-account .alper-menu button {
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 5px;
  background: white;
  color: #103762;
  text-align: left;
}
.alper-account .alper-menu button:hover { background: #edf5fa; }
@media (max-width: 540px) {
  .alper-bar.alper-bar { gap: 4px; min-height: 52px; padding: 5px 8px; }
  .alper-bar .alper-mark { gap: 4px; }
  .alper-bar .alper-mark img { width: 28px; height: 28px; }
  .alper-bar .alper-mark .alper-view { display: none; }
  .mast.alper-bar .mast-button { min-width: 0; padding: 6px; }
}

/* The embedded arena uses the enclosing mission bar. */
@media (max-width: 730px) {
  .alper-bar .mission-title { flex: 1; }
  .alper-bar .mission-title .alper-view { display: none; }
  .alper-bar .mission-title h1 { display: none; }
}
