.app-header {
  gap: 10px;
  padding-inline: max(14px, env(safe-area-inset-left));
}

.brand {
  gap: 8px;
  flex: 0 1 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.brand-mark svg {
  width: 27px;
  height: 27px;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  box-shadow: 0 5px 18px rgba(20, 25, 34, .06);
}

.theme-cycle {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-cycle-dot {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: conic-gradient(
    from -30deg,
    #2563eb 0deg 120deg,
    #dc2626 120deg 240deg,
    #15803d 240deg 360deg
  );
  border: 2px solid var(--surface-solid);
  box-shadow:
    0 0 0 1px var(--line),
    0 2px 7px rgba(0, 0, 0, .16);
  transition: transform .12s ease;
}

.theme-cycle:active .theme-cycle-dot {
  transform: scale(.86) rotate(18deg);
}

.theme-cycle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.header-actions > .icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 17px;
}

@media (max-width: 560px) {
  .app-header {
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: 10px;
    padding-inline: max(12px, env(safe-area-inset-left));
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .brand-mark svg {
    width: 25px;
    height: 25px;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand small {
    display: none;
  }

  .header-actions {
    padding: 3px;
  }

  .theme-cycle,
  .header-actions > .icon-button {
    width: 32px;
    height: 32px;
  }

  .theme-cycle-dot {
    width: 20px;
    height: 20px;
  }

  .header-actions > .icon-button {
    font-size: 16px;
  }
}
