.custom-header {
  width: 100%;

  padding-top:    calc(var(--pico-spacing) * 0);
  padding-bottom: calc(var(--pico-spacing) * 0);

  background-color: var(--pico-card-background-color);
  border-bottom: 1px solid var(--pico-muted-border-color);
}

/* Kanji glyph boxing ------------------------------------------------------- */

.kanji-box {
  aspect-ratio: 1/1;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.5em;
  height: 1.5em;

  border: 1px solid;
  border-radius: 12px;
  font-size: 1.5rem;

  vertical-align: middle;

  margin: 0.5rem 0.5rem 0 0;
}

.unlearned .kanji-box:hover {
  border: 2px solid;
  cursor: pointer;
}

.unlearned .kanji-box.selected {
  background: var(--pico-secondary-background);
}

.kbd-badge-cloud kbd {
  display: inline-block;
  margin: 0.2rem;
  font-size: 1.2rem;
  font-weight: normal;
}

/* End kanji glyph boxing --------------------------------------------------- */

/* Kanji glyph review ------------------------------------------------------- */

.large-centered-kanji {
  text-align: center;
  font-size: 6rem;
  font-family:
  /* Apple ecosystem. */
  "Hiragino Mincho ProN", "Hiragino Mincho Pro",
  /* Windows ecosystem. */
  "Yu Mincho", "MS PMincho",
  /* Linux and Android ecosystems. */
  "Noto Serif JP",
  /* Generic fallback. */
  serif;
}

.centered-text {
  text-align: center;
}

/* End kanji glyph review --------------------------------------------------- */

/* Review controls ---------------------------------------------------------- */

/* Unfortunate that we can't use Pico variables in place of hardcoding the
 * width; but nonetheless, this is the width at which Pico currently reflows
 * the layout for narrow displays. We reverse the flow so that more frequently
 * used elements appear higher (when horizontal, they appear to the right). */
@media (max-width: 768px) {
  .reverse-flow-when-vertical {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--pico-spacing);
  }
}

/* End review controls ------------------------------------------------------ */

/* Material presentation ---------------------------------------------------- */

/* Useful with `.classList.toggle(".not-displayed", ...)` as a performance
 * optimization over directly changing `style.display`. */
.not-displayed {
  display: none;
}

.stroke-diagram-container svg {
  width: 200px;
  height: 200px;
  max-width: 100%;
  max-height: 100%;
}

.stroke-diagram-container text {
  fill: var(--pico-primary);
  font-size: 0.6rem;
  opacity: 0.9;
  /* Draw a different-colored outline around the text. */
  stroke: var(--pico-background-color);
  stroke-width: 2px;
  /* Draw numbers over their outline. */
  paint-order: stroke fill;
}

/* End material presentation ------------------------------------------------ */

/* Status banner ------------------------------------------------------------ */

.status-banner {
  position: sticky;
  top: 1rem;
  z-index: 1000;
  width: 100%;

  background-color: var(--pico-card-background-color);
  border: 1px solid var(--pico-primary-border);
  border-radius: calc(var(--pico-border-radius) *4);

  margin-bottom: var(--pico-block-spacing-vertical);

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease-in-out;
}

.status-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--pico-spacing) * 0.4) calc(var(--pico-spacing) * 0.4);
}

#status-close {
  padding: 4px 8px;
  margin-bottom: 0;
  border: none;
}

.status-banner.success #status-text {
  color: var(--pico-ins-color);
}

.status-banner.error #status-text {
  color: var(--pico-del-color);
  color: #b71c1c;
}

/* End status banner -------------------------------------------------------- */
